Population vs Sample Standard Deviation: When to Use Which, Explained

Standard deviation measures how spread out numbers are around their average. The confusion is that two formulas exist: population and sample. They differ by one number in the final division, yet they give different answers. Choosing the right one depends on a single question: is your data the whole group or a sample of it?

The two formulas

Population standard deviation (sigma): divide the sum of squared deviations by N, the number of values. Sample standard deviation (s): divide by n – 1 instead. In both cases, take the square root at the end to return to the original units. Variance is the same calculation without the final square root, so it is in squared units.

Population: sigma = square root of (sum of (x – mean) squared / N). Sample: s = square root of (sum of (x – mean) squared / (n – 1)).

Worked example: the same data, both ways

Data: 2, 4, 4, 4, 5, 5, 7, 9. Sum = 40, count = 8, mean = 5. Deviations: -3, -1, -1, -1, 0, 0, 2, 4. Squared: 9, 1, 1, 1, 0, 0, 4, 16. Sum of squares = 32.

Population variance = 32 / 8 = 4, so sigma = 2. Sample variance = 32 / 7 = 4.571, so s = about 2.138. Everything up to the last division is identical; the divisor is the only difference. The sample version is always a little larger, which is the point of the correction.

When to use each

Use population when your data is every member of the group you care about: all employees in a company, all deliveries today, every student in one class when you only care about that class. Use sample when your data is a subset drawn from a larger group and you want to estimate that group’s spread: 200 surveyed customers standing in for all customers, 30 products sampled from a production line.

The decision rule in one sentence: if you will generalise beyond the data, use sample; if the data is the whole story, use population. Most real analysis generalises, which is why most software defaults to the sample version.

Why n – 1: Bessel’s correction

The sample mean is calculated from the same data, and it is chosen to minimise the squared deviations. That makes the sample look slightly less spread out than the population really is. Dividing by n – 1 instead of n corrects that downward bias. It is called Bessel’s correction.

In software: Excel and Google Sheets use STDEV.P for population and STDEV.S for sample. Python’s statistics module uses pstdev and stdev the same way. NumPy’s std defaults to population (ddof=0); set ddof=1 for sample. Checking which default your tool uses prevents the classic mismatch where two tools disagree on the same column of numbers.

What one standard deviation means

For roughly normal data, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. This is the 68-95-99.7 rule, and it turns an abstract spread number into a concrete expectation.

Example: test scores with mean 50 and sample standard deviation 14. About 68% of students score between 36 and 64. About 95% score between 22 and 78. A score of 90 is nearly three standard deviations above the mean, which marks it as genuinely exceptional, not just good. The rule assumes a bell-shaped distribution; for skewed data, treat it as a rough guide, not a law.

Try it faster with the tool

You can follow every step above by hand, but the free Standard Deviation Calculator — Population & Sample SD, Variance and Mean does the arithmetic for you. Enter your numbers and it gives the answer right away, so you can check your hand calculation or skip straight to the result.

Quick tips

  • Population divides by N; sample divides by n – 1.
  • Generalising beyond the data means sample.
  • STDEV.S and stdev are sample; STDEV.P and pstdev are population.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top