physics2u
Tier
⌕ Search ⌘K
physics2u.com/vault/bessel-correction-unbiased-variance.html
Derivation

Bessel's Correction for Sample Variance

D-113 Home PU-106 Threads chance Depends on Expectation, Variance and Their Algebra
Statement

Let X1, …, XN be independent, identically distributed random variables with finite mean μ = E[X] and finite variance σ2 = Var(X). Define the sample mean X̄ = (1/N) ∑i Xi and the sample variance s2 = (1/(N−1)) ∑i (Xi − X̄)2. Then E[s2] = σ2 exactly, for every N ≥ 2. The divisor N−1 — Bessel's correction — is precisely what makes the estimator unbiased once the mean has been estimated from the same data.

Why it matters

Almost every experimental error bar in physics is a sample standard deviation computed from a finite run of measurements whose true mean is unknown. If we naively divided the sum of squared residuals by N, we would systematically underestimate the spread of the parent distribution — and therefore quote error bars that are too small, on average, by a factor (N−1)/N. For a handful of repeat measurements this bias is large: with N = 4 it is a full 25%.

The correction is also the cleanest concrete instance of a deep statistical principle: fitting a parameter to data consumes one degree of freedom. The residuals about a fitted mean are not free to roam — they are constrained to sum to zero — and the divisor must be reduced to account for exactly that lost freedom. The same bookkeeping reappears in least-squares fitting and in the χ2 distribution.

Assumptions
Finite second moment, E[X2] < ∞.If σ2 is undefined or infinite (e.g. a Cauchy parent), E[s2] does not exist and there is nothing to be unbiased about.
Independent, identically distributed draws.Correlated samples make E[(X̄−μ)2] ≠ σ2/N; the cross-terms no longer vanish and the N−1 divisor stops removing the bias exactly.
The mean μ is unknown and estimated by .If the true μ were known and used in place of , then (1/N)∑(Xi−μ)2 is already unbiased and one divides by N, not N−1. The correction exists solely because the centring point is itself fitted.
No requirement of normality.Unbiasedness of s2 holds for any distribution with finite variance. Normality would only be needed for stronger claims (e.g. the sampling distribution of s2 being scaled χ2), not for this result.
Derivation
1
i=1N (Xi − X̄)2 = ∑i [(Xi − μ) − (X̄ − μ)]2
Insert and subtract the true mean μ; a pure algebraic identity, valid termwise. A
2
= ∑i (Xi−μ)2 − 2(X̄−μ) ∑i (Xi−μ) + N(X̄−μ)2
Expand the square and pull the constant (X̄−μ) out of the sum over i. A
3
i (Xi−μ) = N(X̄−μ)
Direct from the definition X̄ = (1/N)∑i Xi, i.e. i Xi = N X̄. A
4
i (Xi−X̄)2 = ∑i (Xi−μ)2 − N(X̄−μ)2
Substitute step 3 into the middle term: −2(X̄−μ)·N(X̄−μ) + N(X̄−μ)2 = −N(X̄−μ)2. This is the key decomposition. B
5
E[∑i (Xi−X̄)2] = ∑i E[(Xi−μ)2] − N E[(X̄−μ)2]
Take expectations of both sides; linearity of E[·] distributes over the sum and the difference. B
6
E[(Xi−μ)2] = σ2  ⇒   ∑i E[(Xi−μ)2] = Nσ2
By definition of population variance for each identically distributed Xi (prior result: moments & variance). A
7
E[(X̄−μ)2] = Var(X̄) = Var ( (1/N)∑i Xi ) = (1/N2) ∑i Var(Xi) = σ2/N
Since E[X̄] = μ, the mean-squared deviation of is its variance. Independence kills all cross-covariances, so the variance of the sum is the sum of variances. C
8
E[∑i (Xi−X̄)2] = Nσ2 − N·(σ2/N) = (N−1)σ2
Substitute steps 6 and 7 into step 5. The estimated centre carries away exactly one unit of σ2. B
9
E[s2] = E [ (1/(N−1)) ∑i (Xi−X̄)2 ] = (N−1)σ2 / (N−1) = σ2
Divide the previous line by the constant N−1. The correction factor and the residual expectation cancel identically. A
Result
E[s2] = σ2,    where   s2 = (1/(N−1)) ∑i=1N (Xi − X̄)2

Reading. Averaged over all possible samples of size N, the Bessel-corrected sample variance equals the true population variance exactly — no bias, for any parent distribution with finite variance. Dividing instead by N would give E = σ2(N−1)/N < σ2, an underestimate. The single missing unit in N−1 is the degree of freedom spent locating .

Units check. Each (Xi−X̄)2 has units of [X]2; summing N of them and dividing by the dimensionless count N−1 preserves [X]2, matching σ2 = [X]2. Both sides carry the squared units of the measured quantity.

Limiting cases
  • Known mean. If μ is used instead of , step 4's correction term vanishes and (1/N)∑(Xi−μ)2 is unbiased — divisor N, not N−1.
  • Large N. The bias factor (N−1)/N → 1; the two divisors converge and the distinction becomes numerically negligible.
  • N = 2. The smallest admissible case: s2 = (X1−X2)2/2, and indeed E[s2] = σ2.
  • N = 1. Divisor is zero: s2 is undefined (0/0). A single point carries no information about spread — correctly reflected.
Breaks when
  • Heavy-tailed parents with infinite variance (e.g. Cauchy, or a power law with tail index ≤ 2): σ2 does not exist, so E[s2] is undefined and Bessel's correction cannot rescue an unbiased estimate.
  • Correlated or autocorrelated data (time series, spatially adjacent detector channels): Var(X̄) ≠ σ2/N because covariance cross-terms survive step 7. The correct divisor becomes an effective sample size Neff < N, generally non-integer.
  • Estimating the standard deviation itself. Unbiasedness of s2 does not transfer to s = √s2: by Jensen's inequality E[s] < σ, so s is a biased (slightly low) estimator of σ even with the N−1 divisor.
  • Multiple fitted parameters. If the centring is a fit with p free parameters rather than a single mean, the residuals lose p degrees of freedom and the unbiased divisor is N−p, not N−1.
Failure modes
  • "Divide by N−1 always." Applying the correction when the mean is known a priori over-corrects and makes the estimator biased high — the correct divisor is then N.
  • Correcting s the same way as s2. Assuming s = √s2 is unbiased for σ. It is not; the square root introduces a downward bias of order 1/N.
  • Mistaking "unbiased" for "smaller error". The N-divisor estimator actually has smaller mean-squared error in some cases; unbiasedness and minimum variance are different optimality criteria.
  • Using N−1 on correlated samples. Treating autocorrelated measurements as independent and still dividing by N−1, badly underestimating σ2 of the mean.
  • Confusing σ2 (spread of one measurement) with σ2/N (spread of the mean) when quoting the uncertainty on .
Discussion

The physical content of the derivation lives entirely in step 4: the sum of squared deviations about the sample mean is always smaller than the sum about the true mean, by exactly N(X̄−μ)2. This is not an accident of algebra — the sample mean is the value of c that minimises ∑(Xi−c)2. Because is fitted to hug the data, residuals measured from it are systematically too small, and the correction inflates them back to their honest expected size.

The language of degrees of freedom makes this precise. The N residuals Xi−X̄ satisfy one linear constraint, i(Xi−X̄) = 0, so only N−1 of them are independent. The divisor counts independent residuals, not raw data points. Fit p parameters and you impose p constraints, giving the general unbiased divisor N−p — the same N−p that appears as the degrees of freedom of the χ2 distribution in a least-squares goodness-of-fit test.

A sharper way to see the "one lost dimension": write the data as a vector in N. Subtracting projects it orthogonally onto the (N−1)-dimensional subspace perpendicular to the all-ones vector (1,…,1). Under a normal parent the projected residual vector is isotropic Gaussian in that subspace, so ∑(Xi−X̄)22 ∼ χ2N−1, whose mean is N−1 — recovering step 8 geometrically and exposing why the correction is exactly one, independent of the parent's shape (only unbiasedness, not the χ2 law, survives non-normality).

Common misconceptions. Bessel's correction is not a small-sample "fudge factor" that becomes wrong for large N — it is exactly unbiased for every N ≥ 2. It also does not require the data to be normally distributed; normality is a separate assumption needed only for the sampling distribution of s2, never for its mean.

Worked examples
1
Data: {2, 4, 4, 4, 5, 5, 7, 9} cm   (N = 8)
Eight length measurements; compute the unbiased sample variance and compare against the naive N-divisor value. A
2
X̄ = (2+4+4+4+5+5+7+9)/8 = 40/8 = 5 cm
Symbolic definition first, then arithmetic. A
3
∑(Xi−X̄)2 = 9+1+1+1+0+0+4+16 = 32 cm2
Squared residuals about the sample mean. A
4
s2 = 32/(8−1) = 32/7 ≈ 4.571 cm2  vs  32/8 = 4.000 cm2
Bessel divisor N−1 = 7 against the naive N = 8. A
s2 = 32/7 ≈ 4.57 cm2,   s ≈ 2.14 cm

Reading. The naive estimate 4.00 cm2 is 12.5% too low — exactly the factor (N−1)/N = 7/8. Only s2 = 4.57 cm2 is unbiased for σ2.

Units check. Residuals in cm, squared to cm2, divided by a pure number → cm2; the standard deviation returns to cm.

1
Verify unbiasedness numerically for a fair coin: X ∈ {0,1}, p = ½, N = 2.
A Bernoulli parent with known σ2 = p(1−p) = ¼ lets us check E[s2] = σ2 by exhaustive enumeration. B
2
s2 = (X1−X2)2/(2−1) = (X1−X2)2
For N = 2 the corrected variance reduces to the squared difference. A
3
Outcomes (00): s2=0   (01): 1   (10): 1   (11): 0, each with prob ¼
The four equally likely samples of size 2. A
4
E[s2] = ¼(0) + ¼(1) + ¼(1) + ¼(0) = ½ · 1 = ¼
Average over the sampling distribution. B
E[s2] = ¼ = p(1−p) = σ2

Reading. Exhaustive enumeration confirms the theorem exactly: the N−1 divisor recovers σ2 = ¼. Had we divided by N = 2 we would have obtained E = 1/8, half the true variance.

Units check. The coin variable is dimensionless, so s2 and σ2 are pure numbers — consistent.

Problems
  1. (A) Five voltage readings give {10, 12, 11, 13, 14} V. Compute , the Bessel-corrected s2, and s.
    SolutionX̄ = 60/5 = 12 V. Residuals: −2, 0, −1, 1, 2 → squares 4, 0, 1, 1, 4, sum = 10 V2. s2 = 10/(5−1) = 2.5 V2, so s = √2.5 ≈ 1.58 V.
  2. (A) For the data in Problem 1, what would the naive N-divisor estimate be, and by what percentage does it underestimate s2?
    SolutionNaive value = 10/5 = 2.0 V2. Ratio to corrected value = 2.0/2.5 = 0.8 = (N−1)/N = 4/5, i.e. 20% too low.
  3. (B) Show algebraically that i(Xi−X̄)2 = ∑iXi2 − N X̄2, the computational form of the numerator.
    SolutionExpand: ∑(Xi−X̄)2 = ∑Xi2 − 2X̄∑Xi + N X̄2. Since ∑Xi = N X̄, the middle term is −2X̄(N X̄) = −2N X̄2. Adding +N X̄2 gives ∑Xi2 − N X̄2. ✓
  4. (B) A student measures the parent mean μ = 20.0 s independently and known, then takes N = 6 timings {19, 21, 20, 22, 18, 20} s. Which divisor gives an unbiased variance estimate here, and what is its value?
    SolutionBecause μ is known, centre on μ = 20, not on , and divide by N = 6. Residuals from 20: −1, 1, 0, 2, −2, 0 → squares 1,1,0,4,4,0, sum = 10 s2. Unbiased estimate = 10/6 ≈ 1.67 s2. (Using N−1 = 5 here would over-correct.)
  5. (C) Prove that E[s] < σ in general, so that s underestimates the standard deviation even though s2 is unbiased. (Assume Var(s) > 0.)
    SolutionThe square-root function is strictly concave on (0,∞). Jensen's inequality for a strictly concave g gives E[g(Y)] < g(E[Y]) whenever Y is non-degenerate. Take Y = s2 and g = √·: E[s] = E[√s2] < √E[s2] = √σ2 = σ. The inequality is strict because s2 has nonzero variance. Hence s is biased low; the bias is of order σ/(4N) for large N and, under normality, is removed by the correction factor c4(N).