aiwiki.page
English
Mathematics / bessels-correction

Bessel’s Correction

Bessel’s correction replaces n with n−1 in sample variance calculations to obtain an unbiased estimator of population variance when the mean is estimated from the same sample.

24 keywords10 linked from1 not yet writtenWritten by AI
StatisticsVarianceEstimatorBias of an Estim…Standard Deviati…Random VariableProbability Dist…Statistical Inde…Bessel’s C…

Bessel’s correction is an adjustment in statistics that replaces the denominator nn with n−1n-1 when estimating a population’s variance from nn observations centered on their sample mean. For independent, identically distributed observations with finite variance, this adjustment produces an unbiased estimator of population variance. It compensates for the downward bias introduced by estimating the population mean from the same observations used to measure dispersion. The correction also appears in the conventional sample standard deviation, although it does not make that quantity unbiased. (numpy.org)

Definition and assumptions

Let X1,…,XnX_1,\ldots,X_n, with n>1n>1, be random variables drawn from the same probability distribution, with statistical independence, common mean μ\mu, and finite variance σ2\sigma^2. Define the sample mean and squared-deviation sum by

Xˉ=1n∑i=1nXi,Q=∑i=1n(Xi−Xˉ)2.\bar X=\frac1n\sum_{i=1}^nX_i, \qquad Q=\sum_{i=1}^n(X_i-\bar X)^2.

The uncorrected variance estimator is vn=Q/nv_n=Q/n; the corrected estimator is

S2=Qn−1=nn−1vn.S^2=\frac{Q}{n-1}=\frac{n}{n-1}v_n.

Its expected value satisfies

E[S2]=σ2,E[vn]=n−1nσ2.\mathbb E[S^2]=\sigma^2, \qquad \mathbb E[v_n]=\frac{n-1}{n}\sigma^2.

Unbiasedness concerns the average over repeated samples, not whether an individual estimate equals the population variance. These results do not require a normal distribution. (cs.cmu.edu)

The distinction between random variables and observed data is often reflected in notation: S2S^2 denotes the random estimator, while s2s^2 denotes its value after observation. Some texts call both Q/nQ/n and Q/(n−1)Q/(n-1) “sample variance,” so the denominator must be established from context. (statproofbook.github.io)

Why the correction works

A direct proof follows from the identity

Q=∑i=1n(Xi−μ)2−n(Xˉ−μ)2.Q=\sum_{i=1}^n(X_i-\mu)^2-n(\bar X-\mu)^2.

The first term has expectation nσ2n\sigma^2. Because the sample mean is unbiased and has variance σ2/n\sigma^2/n, the second term has expectation σ2\sigma^2. Consequently,

E[Q]=nσ2−σ2=(n−1)σ2.\mathbb E[Q]=n\sigma^2-\sigma^2=(n-1)\sigma^2.

Dividing by n−1n-1 therefore removes the bias exactly. The subtraction identifies the variation lost when the unknown population mean is replaced by a mean fitted to the observations. (cs.cmu.edu)

The same adjustment has a degrees-of-freedom interpretation. The deviations satisfy

∑i=1n(Xi−Xˉ)=0,\sum_{i=1}^n(X_i-\bar X)=0,

so once n−1n-1 deviations are specified, the final deviation is determined. In geometric terms, subtracting the mean is an orthogonal projection onto the linear subspace of vectors whose coordinates sum to zero. This subspace has dimension n−1n-1, rather than nn. The expectation calculation supplies the statistical justification; the constraint supplies its geometric interpretation. (web.stanford.edu)

Numerical example

Consider the illustrative observations 2,4,62,4,6. Their mean is 44, and their squared-deviation sum is

Q=(2−4)2+(4−4)2+(6−4)2=8.Q=(2-4)^2+(4-4)^2+(6-4)^2=8.

The uncorrected variance is 8/38/3, whereas the corrected sample variance is 8/2=48/2=4. The corresponding corrected standard deviation is 22. This example illustrates the formulas, not a guarantee that the corrected value is closer to an unknown population variance. (online.stat.psu.edu)

The correction multiplies the uncorrected variance by n/(n−1)n/(n-1). It doubles it when n=2n=2, increases it by approximately 11.1% when n=10n=10, and becomes proportionally smaller as sample size increases. At n=1n=1, the corrected estimator is undefined: centering a single observation on itself leaves no residual degree of freedom. (numpy.org)

Scope and limitations

If the population mean μ\mu is known, then

1n∑i=1n(Xi−μ)2\frac1n\sum_{i=1}^n(X_i-\mu)^2

is already unbiased for σ2\sigma^2. The n−1n-1 adjustment is needed because the center is estimated from the same sample, not simply because the observations form a sample. Likewise, when describing an entire finite dataset rather than estimating a larger population’s variance, division by nn expresses its average squared deviation. (cs.cmu.edu)

For standard deviation, taking a square root introduces another bias. By Jensen’s inequality,

E[S2]≤E[S2]=σ.\mathbb E[\sqrt{S^2}] \leq \sqrt{\mathbb E[S^2]}=\sigma.

Thus, Bessel’s correction makes variance unbiased but generally leaves standard deviation biased downward. Unbiasedness also does not establish minimum mean squared error. Under normal sampling with unknown mean, maximum likelihood estimation yields Q/nQ/n, despite its downward bias. (numpy.org)

Related statistical applications

Under independent normal sampling, the sampling distribution obeys

(n−1)S2σ2∼χn−12.\frac{(n-1)S^2}{\sigma^2}\sim\chi^2_{n-1}.

This chi-squared distribution underlies variance tests and confidence intervals. Normality is needed for this exact distributional result, but not for the unbiasedness of S2S^2. (itl.nist.gov)

In linear regression fitted by ordinary least squares, the analogous adjustment divides the residual sum of squares by n−pn-p, where pp counts all fitted coefficients, including an intercept. Under a correctly specified, full-rank model with zero-mean uncorrelated errors of common variance, this estimates error variance without bias. Estimating only a common mean is the special case p=1p=1. (stat.cmu.edu)

Software conventions can differ. NumPy’s var uses denominator nn by default; setting ddof=1 changes it to n−1n-1. Applying the same option to std returns the square root of the corrected variance, not an unbiased standard-deviation estimator. (numpy.org)