# why sample variance has has n-1 in the denominator? [duplicate]

Sample variance is calculated according to:

$s^2=\frac{\sum{(x-\bar{x})^2}}{n-1}$

Population variance is calculated according to:

$\sigma^2=\frac{\sum{(x-\mu)^2}}{n}$

Why denominator for sample variance is $n-1$ and not $n$?

Any help is appreciated.

To put it simply $(n-1)$ is a smaller number than $(n)$. When you divide by a smaller number you get a larger number. Therefore when you divide by $(n-1)$ the sample variance will work out to be a larger number.

Let's think about what a larger vs. smaller sample variance means. If the sample variance is larger than there is a greater chance that it captures the true population variance. That is why when you divide by $(n-1)$ we call that an unbiased sample estimate. Whereas dividing by $(n)$ is called a biased sample estimate.

Because we are trying to reveal information about a population by calculating the variance from a sample set we probably do not want to underestimate the variance. Basically by just dividing by $(n)$ we are underestimating the true population variance, that is why it is called a biased estimate.

Basically comes down to calculating a biased vs. unbiased sample variance estimate.

Also because you asked what as estimator is.

There was a good post here on CV that will give you some good insight. Hope this helps!

• This doesn't explain for example why dividing by $(n - 2), (n - 3), \dots, 1,$ would not be even better. Nor does it explain why dividing by $n$ gives a biased estimator in the first place; that is just asserted. So, while you rightly focus on bias versus unbiased, the thread marked as duplicate is more precise. Feb 25, 2016 at 9:23
• You are absolutely correct, the linked threads are more precise. They give great, well articulated answers. Like you said, I do not go into detail about why $(n-2)$ etc would lead to overestimating population variance. We can agree Fashburn should go through and read the other threads for a more complete answer. However I would argue there is quite a bit of math/higher level explanations found in those threads. I simply wanted to provide Flashburn with a really high level idea to chew on. As he said he is very new to stats. Thanks for the comment. Feb 25, 2016 at 10:59