Population vs sample: the n vs n−1 decision
By MathSolver Editorial Team · Published October 7, 2026 · Updated October 7, 2026
Published October 2026.
Two formulas for standard deviation differ by one symbol, divide by n or by n−1, and picking wrong is the single most common statistics homework error. Here is the decision, once and for all.
The flowchart
- Is your data literally everything you care about? All 30 students in the class, every measurement from the experiment → population, divide by n.
- Is your data a subset standing in for something bigger? 30 voters representing a city, a sample predicting a batch → sample, divide by n−1.
- Still unsure? In school problems, the word “sample” (or any hint of estimation) means n−1. When in doubt, most textbooks default to sample.
Why n−1 exists
A sample tends to underestimate the true spread, the sample mean sits in the middle of the sample, so deviations look smaller than they are. Dividing by n−1 instead of n inflates the result just enough to correct that bias. It is called Bessel’s correction, and it matters most for small samples: with n = 5, the correction changes the answer by about 12%.
Worked example
Data: 4, 8, 6, 5, 7 (n = 5, mean = 6). Squared deviations: 4, 4, 0, 1, 1 → sum = 10.
- Population: 10 ÷ 5 = 2 → SD = √2 ≈ 1.414
- Sample: 10 ÷ 4 = 2.5 → SD = √2.5 ≈ 1.581
Same data, different question, different answer. The standard deviation calculator computes both side by side so you can see the gap.
What changes in practice
For large datasets the difference shrinks, with n = 1000, dividing by 999 vs 1000 barely matters. The correction bites hardest in small samples, exactly where introductory statistics lives: lab groups of 5–10 measurements, class surveys, pilot studies. That is why textbooks emphasize it early. As a rule of thumb: if n < 30, choosing wrong can shift your answer by several percent, enough to lose the mark.