Z Table

Sample vs Population Standard Deviation

Use the population standard deviation (divide by n) when your data include every member of the group, and the sample standard deviation (divide by n − 1) when your data are a sample from a larger group. For 2, 4, 4, 4, 5, 5, 7, 9 the sum of squared deviations is 32: the population value is √(32 ÷ 8) = 2 and the sample value is √(32 ÷ 7) = 2.1381.

Example: 2, 4, 4, 4, 5, 5, 7, 9

  • Sum of squared deviations = 32
  • Population: σ² = 32 ÷ 8 = 4, σ = √4 = 2
  • Sample: s² = 32 ÷ 7 = 4.5714, s = √4.5714 = 2.1381

The two formulas

Population: σ = √( Σ(x − μ)² ÷ N ). Sample: s = √( Σ(x − x̄)² ÷ (n − 1) ). The steps are the same: find the mean, subtract it from each value, square, add, divide, then take the square root. Only the divisor differs. The squared version, the variance, is σ² or s², and the standard deviation is its square root so that it is in the original units.

Why n − 1?

A sample’s own mean is, by construction, the point closest to its values, so deviations from x̄ are on average a bit smaller than deviations from the unknown true mean. Dividing by n would therefore underestimate the population variance. Dividing by n − 1, called Bessel’s correction, makes the sample variance an unbiased estimator of the population variance. Another way to see it: once the mean is fixed, only n − 1 of the values are free to vary, so the sum has n − 1 degrees of freedom.

The correction matters most for small samples. With n = 5 the sample variance is 25% larger than the n version; with n = 100 the difference is 1%.

Which one should I use?

Almost always the sample version. Test scores from one class, lab measurements, survey answers and a week of sales are samples of a larger process. Use the population version when the numbers really are the whole group, such as the ages of every employee of a company you are describing. Calculators label the buttons s or Sx (sample) and σ or σx (population); spreadsheets use STDEV.S and STDEV.P. If a textbook problem does not say, it normally means the sample version unless it says "the population".

Frequently asked questions

Is the sample standard deviation always larger?
For the same data, yes: dividing by n − 1 instead of n always gives a larger result, with the gap shrinking as n grows.
What is the sample standard deviation of one number?
It is undefined, because n − 1 is 0. You need at least two values.
Which Excel function is which?
STDEV.S is the sample version and STDEV.P is the population version.
Does the sample SD give an unbiased estimate of σ?
The sample variance is unbiased. The square root of an unbiased variance is slightly biased low, but s is still the standard choice.

Sources and references