Home›Math›Statistics Guide

Sample vs population: the n−1 story (Bessel’s correction)

Here is a small scandal in statistics. Take one dataset — eight days of sales at a bakery — and ask ten honest people for its standard deviation, and you may get two different answers: 4.27 and 4.57. Nobody made an arithmetic mistake; the difference is dividing by n versus dividing by n−1, and I explain which one your data deserves.

12 min readUpdated October 2026Statistics Calculator

Here is a small scandal in statistics. Take one dataset \u2014 eight days of sales at a bakery \u2014 and ask ten honest people for its standard deviation, and you may get two different answers: 4.27 and 4.57. Nobody made an arithmetic mistake. The difference between the sample standard deviation vs population standard deviation is a single character in the formula \u2014 dividing by n versus dividing by n \u2212 1 \u2014 and behind that character sits Bessel’s correction, one of the most elegant fixes in all of statistics. This is the whole story, with every number computed in the open.

Key takeaways
  • The deciding question: is your data all of it, or a stand-in? Populations divide by n; samples divide by n−1.
  • Dividing a sample by n cheats a little — it underestimates the spread — and Bessel’s correction is the fix.
  • The gap shrinks as n grows: with enough data the two answers nearly meet, so the choice matters most on small samples.

One week of muffins, two standard deviations

The bakery sells muffins, and for eight days the owner counted them: 38, 42, 45, 41, 47, 52, 44, 39. The total is 348, so the mean is 43.5 muffins a day. The standard deviation starts, as always, by measuring how far each day sits from that mean:

Day’s salesDistance from mean (x \u2212 43.5)Squared distance
38\u22125.530.25
42\u22121.52.25
45+1.52.25
41\u22122.56.25
47+3.512.25
52+8.572.25
44+0.50.25
39\u22124.520.25
Total0 (always)146

Every route to a standard deviation passes through this table. Only the final division differs.

Now the fork in the road. Divide 146 by 8 (the count itself) and the variance is 18.25, whose square root is \u03c3 = 4.27 \u2014 the population standard deviation. Divide 146 by 7 instead and the variance is 20.86, whose square root is s = 4.57 \u2014 the sample standard deviation. Same data, same table, and the sample answer is 6.9% larger, purely because of one unit in the divisor. Which one is right? Both \u2014 depending on a question about your intentions, not your arithmetic.

The question that decides: all of it, or a stand-in?

A population, in statistics, is the complete group you care about \u2014 every member, no exceptions. A sample is a portion of a bigger group, measured because the whole group is too large, too expensive, or partly in the future. The eight days of muffin sales can be either, depending on what the owner wants to say:

  • If the question is “how variable was this particular week?” \u2014 the eight days are the whole story. They are a population of eight. The honest summary divides by 8: \u03c3 = 4.27.
  • If the question is “how variable are this bakery’s sales, in general?” \u2014 the eight days are a stand-in for thousands of unobserved days, past and future. They are a sample of eight. The honest estimate divides by 7: s = 4.57.

That is the entire decision. Population formula (\u00f7 N) for describing a complete group you hold in your hand; sample formula (\u00f7 n \u2212 1) for estimating a bigger group from a part of it. But it raises the obvious follow-up: why should estimating deserve a smaller divisor at all? Why not just use the same formula and accept the answer? Because, as the next section proves with real numbers, the plain formula is rigged to come out too small whenever the data is a sample.

Why dividing by n cheats (a little)

The bias hides in a place nobody suspects: the mean itself. When you compute a sample’s standard deviation, you measure each value’s distance from the sample’s own mean. But the sample mean is not some neutral reference point \u2014 it is, by the arithmetic of how means work, the exact point that sits as close as possible to those particular sample values. Measure distances from it, and the distances come out systematically smaller than distances from the true population mean would be. Small distances, divided by n, produce a spread that is too small \u2014 on average, every time.

Let me prove it on a population we can hold completely: a class of 20 exam scores \u2014 62, 68, 70, 71, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 88, 90, 92, 95. Their true mean (\u03bc) is 79.45 and their true standard deviation (\u03c3) is 8.17. Now I draw four different samples of five scores each and compute both formulas on each:

Sample of 5Sample meanSD dividing by nSD dividing by n \u2212 1
62, 68, 70, 71, 7368.803.764.21
62, 73, 78, 83, 9077.209.4510.57
76, 77, 78, 79, 8078.001.411.58
85, 88, 90, 92, 9590.003.413.81
True population \u03c379.45 (\u03bc)8.17

Four samples, one known truth. Individual samples bounce around wildly \u2014 that is sampling noise. The divisor’s effect is separate and one-directional.

Study the last two columns. Small samples are noisy \u2014 one estimate hits 10.57, another 1.58, and no formula can fix luck. But notice what never changes: in every row, the \u00f7 n answer is exactly the same fraction below the \u00f7 n \u2212 1 answer \u2014 at n = 5, precisely 10.6% smaller, always in the same direction. That is not noise; that is a systematic shave. You can watch its cause in the second sample: its squared distances around its own mean (77.20) total 446.8, while the very same five scores measured around the true population mean (79.45) total 472.11. The sample’s own mean flatters it, pulling the total down by construction. Dividing by n \u2212 1 instead of n inflates the result by exactly the factor needed to cancel that flattery on average \u2014 not for any single sample, but across all the samples you might have drawn. Statisticians call an estimator with that property unbiased, and it is the reason the sample formula exists.

Bessel’s correction and the one you already spent

The fix has a name \u2014 Bessel’s correction, after the astronomer Friedrich Bessel \u2014 and a beautifully concrete justification called degrees of freedom. Look back at the muffin table: the eight deviations (\u22125.5, \u22121.5, +1.5, \u22122.5, +3.5, +8.5, +0.5, \u22124.5) sum to exactly zero. They must \u2014 that is what it means for 43.5 to be their mean. And that constraint has teeth: if I tell you any seven of those deviations, you can deduce the eighth with certainty, because the eight are chained to total zero. So the dataset does not contain eight independent pieces of information about spread; it contains seven. One degree of freedom was already spent the moment we used the data to compute its own mean. Dividing by the number of independent pieces \u2014 n \u2212 1 \u2014 is simply honest accounting.

The extreme case makes it unforgettable. Take a sample of exactly one value: n = 1. The population formula would report a standard deviation of 0, claiming perfect consistency from a single observation. The sample formula divides by zero and refuses to answer at all \u2014 which is correct. One point contains no information about spread, and a formula that admits it beats one that lies about it.

The gap shrinks as n grows

How much does any of this matter in practice? The correction factor between the two answers is \u221a(n \u00f7 (n \u2212 1)), and it collapses toward 1 remarkably fast. The bakery again: after a full month, the owner has 30 days of sales, totaling 1,345 muffins, mean 44.83 a day. Treated as a complete record of the month, \u03c3 = 5.08; treated as a sample of the bakery’s ongoing trade, s = 5.17. The two answers now differ by only 1.7%, down from 6.9% at n = 8.

Sample size nCorrection \u221a(n/(n\u22121))How much bigger s is than \u03c3
21.4142+41.4%
31.2247+22.5%
51.1180+11.8%
81.0690+6.9%
101.0541+5.4%
201.0260+2.6%
301.0171+1.7%
501.0102+1.0%
1001.0050+0.5%
1,0001.0005+0.1%

Bessel’s correction by sample size. Below about n = 30 the choice changes your answer meaningfully; above it, the two formulas nearly merge.

My practical rule follows straight from the table: with small samples \u2014 a week of sales, five test items, eight lab measurements \u2014 the divisor decision is a real decision worth 5\u201340% of your answer, and getting it wrong understates your uncertainty exactly when your evidence is thinnest. With hundreds of observations the debate becomes academic, which is why reports based on large surveys rarely mention it. The correction matters most precisely when you can least afford extra error.

Which one should you report? A field guide

The sample standard deviation vs population standard deviation choice is never about which formula is “better” — it is about matching the formula to the claim. This table is the one I check before reporting either number:

SituationYour data is\u2026Divide byReport
Every item a factory made today, inspected in fullThe whole populationN\u03c3
30 parts pulled from a production run to judge the runA samplen \u2212 1s
Final grades of the 20 students in this class, describing this classThe whole populationN\u03c3
The same 20 students, used to estimate the whole districtA samplen \u2212 1s
1,200 survey respondents standing in for a country’s votersA samplen \u2212 1s
Visitors in an A/B test, standing in for all future visitorsA samplen \u2212 1s
A complete log of last week’s temperatures, describing last weekThe whole populationN\u03c3

Notice the class-grades pair: the identical dataset flips from \u03c3 to s the moment the claim grows beyond it. The data did not change; the claim did.

The symbols, sorted once and for all

Half the confusion in this subject is notation, so here is the whole cast in one place. Greeks describe populations and truths; Latin letters describe samples and estimates.

ConceptPopulation (the truth)Sample (the estimate)
How many valuesNn
Mean\u03bc (“mu”)x\u0304 (“x-bar”)
Variance\u03c3\u00b2s\u00b2
Standard deviation\u03c3 (“sigma”)s
DivisorNn \u2212 1

When software asks you to choose between STDEV.P and STDEV.S (Excel) or pstdev and stdev (Python), it is asking exactly this table’s question: population or sample?

The sentence I keep in my head: dividing by N describes the data in front of you; dividing by n \u2212 1 estimates the world it came from. Bessel’s correction is the small price of honesty for generalizing beyond the evidence.

See both answers side by side

Our statistics calculator reports the population and sample standard deviations together for any list you paste in \u2014 along with the mean, median, mode, variance, and range \u2014 so you can watch the n \u2212 1 gap shrink as your dataset grows.

Open the Statistics Calculator

Frequently asked questions

What is the difference between sample and population standard deviation?

The population standard deviation (σ) describes a complete group — every member you care about — and its formula divides by N. The sample standard deviation (s) estimates a larger group’s spread from a smaller part of it, and its formula divides by n − 1 instead, which deliberately makes the estimate a little larger. On the bakery data in this article, the same eight days give σ = 4.27 muffins with one formula and s = 4.57 with the other. The difference is not in the data; it is in the claim you are making about it.

Why do we divide by n − 1 for a sample?

Because a sample’s deviations are measured from the sample’s own mean, and that mean is — by construction — the point closest to the sample’s values. The deviations therefore come out systematically too small, and dividing by n would underestimate the true spread on average. Dividing by n − 1 (Bessel’s correction) inflates the result by just enough to cancel that shrinkage on average, which is why the n − 1 version is called unbiased.

What is Bessel’s correction?

Bessel’s correction is the practice of dividing by n − 1 instead of n when computing the variance or standard deviation of a sample. The − 1 reflects the degrees of freedom you have already spent: because a dataset’s deviations from its own mean must sum to zero, only n − 1 of them carry independent information. It is named after the astronomer Friedrich Bessel, and its effect shrinks with sample size — worth 6.9% at n = 8, but only 0.5% at n = 100.

Should I use sample or population standard deviation?

Ask whether your data is the whole group or a stand-in for a bigger one. If you measured every member of the group you care about — this class, this month’s production, this week recorded in full — use the population formula (÷ N). If your data is a portion meant to describe something larger — survey respondents standing in for voters, a sample of parts standing in for a production run — use the sample formula (÷ n − 1). When genuinely unsure, the sample version is the safer, more conservative choice because it reports the larger spread.

Sources: every figure in this article was computed directly from the datasets shown and independently recomputed (the bakery squared deviations total 146; the 20-score population has μ = 79.45 and σ = 8.17). The treatment of Bessel’s correction, degrees of freedom, and the unbiased sample variance follows the NIST/SEMATECH e-Handbook of Statistical Methods and standard descriptive-statistics references.

Related guides
↑

Similar Posts