Why is 1n∑i(xi−xˉ)2 a biased estimator of σ2, and why does dividing by n−1 instead remove the bias?

Probability and statistics, Estimation
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can compute an expectation with the add-and-subtract trick, and explain the lost degree of freedom.

Key idea

An estimator is unbiased if its expected value equals the true value. Here ∑i(xi−xˉ)2=∑i(xi−μ)2−n(xˉ−μ)2, and E[(xˉ−μ)2]=σ2/n, so its expectation is nσ2−σ2=(n−1)σ2.

Steps

  1. Add and subtract the true mean μ, because expectations around μ are the ones we know: xi−xˉ=(xi−μ)−(xˉ−μ).
  2. Square, sum, and use ∑i(xi−μ)=n(xˉ−μ): ∑i(xi−xˉ)2=∑i(xi−μ)2−2n(xˉ−μ)2+n(xˉ−μ)2=∑i(xi−μ)2−n(xˉ−μ)2.
  3. Take expectations. E∑i(xi−μ)2=nσ2 by the definition of variance. E(xˉ−μ)2=Var⁡(xˉ)=σ2/n, because the xi are independent.
  4. So E∑i(xi−xˉ)2=(n−1)σ2. Dividing by n gives expectation n−1nσ2, which is too small. Dividing by n−1 gives exactly σ2.
  5. Give the intuition. xˉ is computed from the same data, so the points are closer to xˉ than to the true μ. Estimating the mean uses up one degree of freedom.

Common mistakes

How long your answer should be

Half a page; 3–4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probability and statistics: What are the maximum likelihood estimates of μ and σ2 from independent samples x1,…,xn of N(μ,σ2), and how do you derive them?
Next in Probability and statistics: You can draw samples from Uniform(0,1), and you have Φ−1, the inverse CDF of the standard normal N(0,1). How do you generate samples from a 2D normal distribution N(μ,Σ), and how do you show that they have the right mean and covariance?