Why sample variance divides by n - 1
An intuitive guide to degrees of freedom in applied statistics
Why does sample variance use n-1 as the degrees of freedom in its denominator? Why not use n? Let’s first define the concept of degrees of freedom, and then I will answer that original question in an intuitive but non-technical way.
In statistics, the degrees of freedom (df) refers to the number of independent values or quantities that can be assigned to a statistical distribution. Think of it as the number of “free” data points that aren’t fixed.
Suppose that you begin with n data points. When you calculate the sample mean, you’re using up 1 degree of freedom. Once you know the mean, you can obtain one of the sample values if you have all the others.
Let’s illustrate this with an example data set: [1, 9, 8].
The sample mean is (1 + 9 + 8) ÷ 3 = 6.
If you know that
the sample mean is 6,
2 of the original data points (for example: [1, 9]),
then you can determine what the remaining data point is.
3×6−(1+9) = 18−10 = 8.
Notice that the sample variance includes the sample mean in its formula, so it is already using 1 degree of freedom in that calculation. Hence, in calculating sample variance, you have n−1 degrees of freedom left.
When we calculate the variance of a sample, we want it to be an unbiased estimator of the population variance. By using n-1 instead of n, we correct for the fact that we’re working with a sample and not the entire population. This adjustment ensures that our variance estimate isn’t biased.



