Why divide by n - 1 for sample standard deviation?
By Jude Wallis · Published
You divide by n - 1 because the deviations are measured from the sample mean, which sits inside your own data and therefore closer to it than the true population mean does. That makes the squared deviations come out too small, and n - 1 corrects the bias in the variance.
AP Statistics: Unit 1 (topics 1.7 Summary Statistics for One Quantitative Variable). Standard deviation is Unit 1 topic 1.7, where the Fall 2026 CED gives the sample formula with the n - 1 divisor and calls s squared the sample variance; the definition of an unbiased estimator appears in Unit 3 topic 3.1.
The sample mean sits inside your own data
When you calculate a sample standard deviation you do not know the population mean ("mu"), so you use the sample mean ("x-bar") in its place. Everything that follows comes from that one substitution.
The value of is computed from the same numbers whose spread you are about to measure, so it always lands in the middle of them. The true mean sits wherever the population puts it, which for any particular sample is usually a little off to one side. Distances measured to a point inside your data are shorter than distances measured to a point off to the side.
So the sum of squares comes out systematically smaller than would. Dividing that too-small total by would hand you a spread estimate that runs low on average, sample after sample. Dividing by makes the result slightly larger and cancels the shortfall.
How much too small: a concrete look
Take a sample of five values: 4, 6, 8, 10, and 12. The sample mean is . Measured from 8, the squared deviations are 16, 4, 0, 4, and 16, which total 40.
Now suppose you also knew that the population mean was . Measured from 10, the squared deviations are 36, 16, 4, 0, and 4, which total 60. Same five numbers, same squaring, but 40 against 60.
That gap is not an accident of these particular values. For any constant , the sum of squared deviations splits like this:
The added term is never negative, so no center beats : the sum of squares around the sample mean is the smallest one available. Check it on the numbers above, with : .
The same five values under both divisors
Nothing about the data changes when you switch divisors. Only the last two steps of the calculation change.
| Divisor | Variance | Standard deviation |
|---|---|---|
The version is larger by a factor of , about 11.8% here. That correction shrinks fast as samples grow, because the factor is : at it is about 1.0102, a difference of roughly 1%.
Neither number is wrong on its own. They answer different questions. The value is the spread of these five numbers treated as a complete population, and is an estimate of the spread of the larger population the five came from. The step-by-step calculation is identical until that divisor.
Degrees of freedom: only n - 1 deviations are free
Here is the same idea told through counting. Deviations from the sample mean always add to zero, and that is a constraint the data has to satisfy.
For 4, 6, 8, 10, 12 with mean 8, the deviations are -4, -2, 0, 2, and 4. Add them: . Now suppose you know only the first four, -4, -2, 0, and 2. The fifth is not free to be anything at all: it has to be 4, because the five are forced to sum to zero.
So five deviations carry only four independent pieces of information about spread. That count, , is the degrees of freedom of the sample standard deviation. Estimating one quantity from the data, the mean, uses up one of the pieces, and the divisor is set to what is left.
The two explanations are one fact seen from two sides. The constraint that makes the fifth deviation predictable is exactly the constraint that pulls into the middle of the data and shrinks the sum of squares.
What n - 1 fixes, and what it does not
Be precise about the claim, because the loose version of it is false. Dividing by makes the sample variance an unbiased estimator of the population variance ("sigma squared"). The AP course defines an unbiased estimator as one that on average neither underestimates nor overestimates the parameter. Averaged over every possible sample, lands on exactly.
It does not make an unbiased estimator of ("sigma"). Averaging and square-rooting do not commute: the average of the roots is not the root of the average. In practice runs a little below on average, and no fixed divisor repairs that for every distribution. The second worked example below shows both halves of this on a population small enough to check by hand.
This is why it is worth saying "unbiased variance" rather than "correct standard deviation". The divisor fixes the quantity the algebra can fix, and that quantity is the variance.
When you divide by n instead
Divide by when your values are the entire population you care about rather than a sample from something larger. Then the mean you subtract really is , no estimation happened, and there is no bias to correct.
- The 12 monthly totals for one year, when the question is about that year only.
- The scores of all 28 students in a class, when the class itself is the population.
- Any set where you can honestly say nothing was left unmeasured.
Almost every data set in AP Statistics is a sample, so is the default, and the version is the formula printed on the exam formula sheet. Calculators report both: (or ) divides by , and divides by . Reading the wrong line is a common way to lose a point on an otherwise clean calculation.
Where n - 1 turns up again
Once you have , the same count follows you into inference. For a single sample mean, the procedures use a -distribution with degrees of freedom, the same number for the same reason: one parameter, the mean, was estimated from the data.
The value of also feeds the standard error , which measures how much a sample mean bounces around from sample to sample rather than how much individual values spread out. Those two ideas get swapped constantly, and the guide on standard error against standard deviation separates them.
To see both divisors on your own numbers, enter a data set in the standard deviation calculator and compare the and it reports. The gap between them is the correction this page is about.
Both divisors on the same five values
A sample of five values is 4, 6, 8, 10, and 12. Calculate the variance and standard deviation with the divisor and with the divisor, and compare them.
Find the mean: .
Find the deviations : , , , , and . As a check they sum to .
Square them: , , , , and .
Add the squares: .
Divide by : the sample variance is , so .
Divide by : the population variance is , so .
Compare: , so the answer is about 11.8% larger.
With : and . With : and . The sample version is larger by the factor , roughly 11.8%.
Averaging the variance over every possible sample
A population has just three members: 2, 4, and 6. Draw a sample of size 2 at random with replacement, so all 9 ordered pairs are equally likely. Averaged over those 9 samples, does the variance or the variance hit the true population variance?
Find the population values. The population mean is . The population variance divides by : , so .
List the 9 equally likely samples: (2,2), (2,4), (2,6), (4,2), (4,4), (4,6), (6,2), (6,4), and (6,6).
For a sample of size 2 the sum of squared deviations is easy: the two deviations are each half the difference, so the sum of squares is . For (2,6): the mean is 4, the deviations are and , and the squares add to , matching .
Sums of squares for the 9 samples, in the order listed: 0, 2, 8, 2, 0, 2, 8, 2, 0.
Divide each by , so the nine values of are 0, 2, 8, 2, 0, 2, 8, 2, 0. Their average is , which is exactly .
Divide each by instead: 0, 1, 4, 1, 0, 1, 4, 1, 0. Their average is , exactly half of . Too small, on average, by a factor of 2.
Now take square roots of the variances: 0, , , and so on. Four samples give , two give , and three give 0, so the average of is .
Compare that with . Even with the divisor, falls short of on average.
The variance averages , exactly the population variance , so is unbiased. The version averages , only half as large. The standard deviation is a different story: the average of is about 1.2571 while , so removes the bias in the variance, not in the standard deviation.
Frequently asked questions
Does dividing by n - 1 make the standard deviation unbiased?
No. It makes the sample variance unbiased for the population variance , which is the precise claim. The standard deviation is the square root of an unbiased estimator, and square roots do not preserve averages, so still tends to land a little below . In the tiny-population worked example the average of is about 1.2571 while .
Why n - 1 and not n - 2?
Because exactly one quantity was estimated from the data: the mean. Each quantity you estimate costs one degree of freedom. When two are estimated, as with the slope and intercept of a least-squares regression line, the matching divisor is . Inference for regression slopes was removed from the AP exam in the Fall 2026 redesign, so that version is college content rather than exam content.
Does the choice still matter for a large sample?
Less and less. The variance changes by a factor of , so at that is and the standard deviation changes by , about half a percent. At the same factor is , closer to 12%. Small samples are where the divisor earns its keep.
Which version does my calculator report?
Both. One-variable statistics output lists (or ), which divides by , and , which divides by . Use for sample data, and note that it is the version printed on the AP formula sheet.