fundamentals · 5 min read
Sample vs population standard deviation
The population and sample standard deviations are two formulas that differ by one denominator, yet they answer different questions. Dividing the squared deviations by n describes a complete population; dividing by n − 1 estimates the spread of a larger population from the sample you actually measured.
Choosing between them is not a matter of taste. This comparison walks through the algebra with a worked example, explains why the sample version is larger, and covers the labels software uses so a report does not quote σ when it means s.
The two formulas and a worked example
Both formulas start the same way: find the mean, subtract it from every value, square the deviations and add them. The population variance σ² divides that sum by n; the sample variance s² divides it by n − 1. The standard deviations are the square roots of those variances, so σ = √(Σ(x − mean)² / n) and s = √(Σ(x − mean)² / (n − 1)).
Take the list 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5 and the squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, summing to 32. Dividing by 8 gives a population variance of 4.0 and σ = 2.0. Dividing by 7 gives a sample variance of about 4.571 and s = √(32/7) ≈ 2.138. Both calculations are correct; they describe the same data under different assumptions.
Why the sample version divides by n − 1
The sample mean is calculated from the sample itself, so it sits at the centre of those particular values. Deviations measured from it are slightly too small compared with deviations from the unknown population mean, and averaging with n would systematically underestimate the true spread. Dividing by n − 1, a correction credited to Bessel, removes that bias.
The gap between σ and s is largest for small samples and shrinks as n grows, but the choice of formula never depends on the sample size. What decides it is whether the data is the whole population you are describing or a sample used to estimate something larger.
When each version is appropriate
Use the population formula when the list really is the population: every student in a class, every unit in a production batch, every page in a fixed archive. Use the sample formula when the measurements estimate a wider population, which is the usual situation in a lab, a clinical study or a class experiment.
If the status is ambiguous, report the sample value and state n, because an honest label is more useful than a confident guess. Software defaults differ — a spreadsheet may offer STDEV.P and STDEV.S, while calculators show σ or s — so check which one a reported number came from before comparing results across tools.
The difference matters in a report. With the eight values above, writing σ = 2.0 tells a reader you described those eight values as the complete set, while s = 2.138 tells them you are estimating a wider population from a sample. Same data, different claim; quote the version that matches your sampling and the ambiguity disappears.
Misconceptions that survive the formulas
A larger sample does not change which formula applies; it only narrows the difference between the two results. Neither version is an error, and the sample value is not automatically more accurate — it is an estimate with its own sampling variability. A single value makes the sample version undefined, since n − 1 is zero.
Standard deviation is also not the same as the standard error. The standard deviation describes the spread of the measurements; the standard error of the mean is s divided by √n and describes how precisely the mean is known. Labelling an error bar with the wrong one changes what the figure claims.
Reporting the value without ambiguity
State the number, the unit, the sample size and whether it is σ or s. Round it to the precision the data supports, normally the same significant figures as the measurement, and keep the unrounded value for further calculations. If the mean is the headline result, consider reporting the standard error or a confidence interval as well.
The standard-deviation calculator shows both versions side by side with the intermediate sums, so the arithmetic can be checked before it goes into a report. Writing 'sample standard deviation, s = 2.138, n = 8' removes the ambiguity that a bare 'SD' leaves.
- Say whether the number is σ (divide by n) or s (divide by n − 1).
- Give the sample size; one value has no sample standard deviation.
- Keep enough digits during the calculation and round at the end.
- Do not compare an s from one tool with a σ from another.
- For the precision of a mean, report the standard error too.