The primary difference between a population standard deviation and a sample standard deviation is the nature of the observations being measured. When an entire group, or population, is being measured, the population standard deviation is used. When it is impractical or impossible to measure an entire population, researchers and surveyors will measure a sample group of the population and extrapolate those results to make a prediction for the entire population. The sample standard deviation recognizes that only a sample of the population is really being measured.
The formulas for finding the two types of standard deviation are almost (but not quite) identical. The first step is to find the mean, or average, of the set of observations. Add the values of all observations and divide by the total number of observations. In other words, μ={Σ(x)}/N, where μ is the population mean, x is the value of each observation, and N is the number of observations. When we are looking at a sample group instead of an entire population, the sample mean is usually written as x¯.
The second step is to find the difference between each observation of the population or sample and the mean, square that difference and add up all the squares of the differences. Divide that sum by the number of observations, to get the population variance: σ²={Σ(x-μ)²}/N. The formula for the sample variance is almost the same, except that you divide the sum of the squares of the differences by N-1, instead of N, and the variance is usually denoted as s² instead of σ²: s²={Σ(x-x¯.)²}/(N-1).
Take the square root of the variance to get the standard deviation. The formula for the population standard deviation is σ=√[{Σ(x-μ)²}/N]. The formula for the sample standard deviation is s=√[{Σ(x-x¯)²}/(N-1)]. The reason for the difference between the two formulas (N-1 as the denominator instead of N) is that, if we use a denominator of N for the sample, we end up with a variance that is biased and does not represent the variance of the total population. We subtract 1 from the denominator in order to correct that bias.