Hexa Scholar

Why the sample variance divides by n − 1

A cream bowl holds gold and navy spheres, with an empty scoop resting beside it on a wooden table.
A bowl and a scoop: collecting a sample from a larger population.

The question

Move the observations, compare the scores, then account for the center you estimated.

  1. 1 SeeMove points and compare two sums.
  2. 2 TryCount outcomes across repeated samples.
  3. 3 ProveAccount for the fitted mean.
  4. 4 ApplyChoose the right variance formula.
Before you start · 3 quick checks on means, squared distances, and unbiasedness

Two ideas before you start

2 ideas

A squared distance needs a reference point

An observation and a reference mark on a number line.

Choose a point. Measure its signed distance from the reference, then square that distance.

Exact definition

For observed real numbers \(x_1,\ldots,x_n\), let \(\bar x\) be their arithmetic mean. Define the sum of squared distances from a reference \(c\) by

\[D(c)=\sum_{i=1}^n(x_i-c)^2.\]

The reference has the same units as each observation. The score has squared units. Write \(Q=D(\bar x)\) for the score around the sample's own mean. This is a sum, not yet an average or a variance estimate.

A sample center changes when the sample changes

Sample observations and their mean, beside a fixed population mean.

The population mean stays fixed across samples. The sample mean is computed again from each new set of observations.

Exact definition

Before sampling, write the observations as random variables \(X_i\) and their mean as \(\bar X\). The population has mean \(\mu=E[X_i]\) and finite variance \(\sigma^2=E[(X_i-\mu)^2]\). Lowercase letters describe one realized sample.

Our repeated-sampling claims assume independent and identically distributed observations, abbreviated iid. Each draw has the same distribution and is independent of the others. Normality is not required. The draggable points in See are chosen data, so that activity itself requires no probability model.

Refresher: the target and the estimator

The target here is the population variance, not the variance of the sample mean. An estimator is a rule based on observed data. Its expectation averages the rule's output over fresh samples from the same population.

As in bias and variance, unbiased means that this expectation equals the target for every population in the stated model. It does not promise that one observed estimate equals the truth. Review expectation and variance for probability-weighted averaging, and sampling distributions for what changes across samples.

1 See

Can you reverse the two scores?

Each row holds one observation. The thin dashed mark is the fixed reference μ; the thick dashed mark follows the sample mean. Row height only separates the handles.

2 Try

Count what happens across samples

Compute \(S^2=Q/(n-1)\) in each sample. Before revealing the table, consider how often this estimate can miss the population spread completely.

3 Prove

Average the amount removed

Theorem: unbiased sample variance

Let \(X_1,\ldots,X_n\) be iid, where \(n\ge2\) is an integer, with finite mean \(\mu\) and finite positive variance \(\sigma^2\). Define

\[\begin{aligned}A&=\sum_i(X_i-\mu)^2,\\B&=n(\bar X-\mu)^2,\\Q&=\sum_i(X_i-\bar X)^2=A-B.\end{aligned}\]

Then \(E[Q]=(n-1)\sigma^2\), so \(E[S^2]=\sigma^2\) and \(E[V_n]=(n-1)\sigma^2/n\). No normal distribution is assumed.

Build the expectation calculation. From the sample mean lesson, iid observations give \(E[\bar X]=\mu\) and \(\operatorname{Var}(\bar X)=\sigma^2/n\). That is the independence-dependent step. Linearity of expectation itself does not require independence.

4 Apply

Keep the target and the center straight

Enter a decimal without units. Each answer accepts an absolute error of at most the tolerance shown. Work from the unrounded squared-distance sum. Each problem has hints and a complete solution.

Key point Name the center you used and the population quantity you want. The divisor follows from those choices and the sampling assumptions; it is not a correction to apply to every average of squares.
Level IntroPrerequisites Expectation, variance, sampling distributions, and biasTime About 30 min

Further reading