Calculators
Home › Learn › Sample vs Population SD

Sample vs Population Standard Deviation

Same data, two divisors, two right answers to two different questions.

Quick answer: For 2, 4, 4, 4, 5, 5, 7, 9: squared deviations sum to 32. Divide by 8 for the population SD of exactly 2; divide by 7 for the sample SD of 2.138.

One dataset, two standard deviations

Divide the squared deviations by N and you get the population standard deviation; divide by n − 1 and you get the sample version. Same data, two answers, each correct for its own question. If your numbers are the entire population you care about, divide by N. If they are a sample standing in for a larger population, divide by n − 1.

Worked example

The classic teaching dataset: 2, 4, 4, 4, 5, 5, 7, 9. Mean 5. Deviations: −3, −1, −1, −1, 0, 0, 2, 4. Squares sum to 32. Population variance: 32 / 8 = 4, so σ = 2 exactly. Sample variance: 32 / 7 = 4.571, so s = 2.138. The sample version is larger, deliberately: it compensates for the fact that deviations were measured from the sample's own mean, which sits closer to the data than the true population mean does.

Why n minus 1 (Bessel's correction)

The sample mean is computed from the same values whose spread you are measuring, and it is the point that minimizes their squared deviations. So raw squared deviations around x̄ are systematically a bit too small as estimates of spread around μ. Dividing by n − 1 instead of n inflates the result by exactly the factor that fixes the bias on average. One degree of freedom was spent estimating the mean; the divisor keeps the count honest.

Watch out

Software defaults differ: spreadsheet STDEV.S divides by n − 1, STDEV.P by N; many calculators and programming libraries default differently again. On small samples the choice moves the answer by a visible amount (here, 2.00 vs 2.14, a 7% gap). Know which one your tool returned, and state it.

When the difference stops mattering

The correction factor is n / (n − 1) on the variance: at n = 8 it is 14%; at n = 30, 3.4%; at n = 100, 1%. Large samples make the argument academic. Small samples, exact work and exams are where the distinction earns its keep.

Frequently asked questions

Which standard deviation does this site's calculator use?

Both, with a toggle: the standard deviation calculator shows sample (n - 1) and population (N) values side by side, because the right choice depends on whether your data are a sample or the whole population.

Why is the sample variance called unbiased?

Because with the n - 1 divisor, its expected value over repeated samples equals the true population variance. The standard deviation s is still slightly biased for sigma (a smaller, subtler effect), but the variance is the quantity the correction fixes.

If I have the whole population, why is n - 1 wrong?

There is nothing to estimate: the population mean is known, deviations are measured from the true centre, and no correction is owed. Dividing by n - 1 would overstate the spread of a completely known set.