Im looking through my notes in class and see that it is written that $$S = \sqrt{\frac{1}{n-1}\sum(X_i - \bar{X})^2} $$ which is then equal to $$S = \sqrt{\frac{1}{n-1}\left(\sum X_i ^2 - n*\bar{X}^2\right)} $$
how is this possible? I tried expanding but don't see how it works
$\endgroup$ 11 Answer
$\begingroup$Note: In order to be correct the second expression should read $$S = \sqrt{\frac{1}{n-1}\left(\sum X_i ^2 - n*\bar{X}^2\right)} $$
To see this we proceed by direct computation:
$$\sum (X_i-\overline X)^2=\sum X_i^2 -2\overline X\sum X_i+n\overline X^2$$
$$=\sum X_i^2-2n\overline X^2+n\overline X^2=\sum X_i^2-n\overline X^2$$
$\endgroup$ 2