## The Difference Between Population and Sample Standard Deviation

There are several formulae for the standard deviation and this can be confusing, but the fundamental distinction that must be made is between the 'population standard deviation', and the 'sample standard deviation'.
Suppose you have some apples. You can weigh every apple, and write down all the masses. The apples in this circumstance constitute a population. If the apples have masses
$x_1, \: x_2, \: x_3,..., \: x_n$
.
The population standard deviation is
\begin{equation} \begin{aligned} \sigma = \sigma_n &= \sqrt{\frac{\sum_i^n x_i^2 - (\sum_i^n x_i)^2/n}{n}} \\ &=\sqrt{\frac{\sum_i^n x_i^2 - n {\bar{x}}^2}{n}} \\ &= \sqrt{\frac{\sum_i^n x_i^2}{n} - (\frac{\sum_i^n x_i}{n})^2} \end{aligned} \end{equation}
.
Suppose however that we were to take a sample of
$m$
apples. If we wanted to find the standard deviation of these apples, we would be finding the sample standard deviation
$s=\sigma_{n-1}$
.
The sample standard deviation is
\begin{equation} \begin{aligned} s &= \sigma_{m-1} \\ &= \sqrt{\frac{\sum_i^m x_i^2 - (\sum_i^m x_i)^2/m}{m-1}} \\ &=\sqrt{\frac{\sum_i^m x_i^2 - m {\bar{x}}^2}{m-1}} \\ &= \sqrt{\frac{\sum_i^m x_i^2}{m-1} - \frac{(\sum_i^m x_i)^2}{m(m-1)}} \end{aligned} \end{equation}
.
The difference between the two definitions is the presence of
$n-1$
$n$