Why We Divide by n-1 in Sample Variance
You have i.i.d. samples $X_1, \ldots, X_n$ from a distribution with mean $\mu$ and variance $\sigma^2$. The sample variance is defined as
$S^2 = \frac{1}{n-1}\sum_{i=1}^{n}(X_i - \bar{X})^2$
Prove that $E[S^2] = \sigma^2$ -- that is, dividing by $n-1$ instead of $n$ makes $S^2$ an unbiased estimator of the population variance.
As part of your proof, give a clear explanation of why the factor is $n-1$ and not $n$ in terms of degrees of freedom.
Open the full interactive solver, hints, and worked solution →