An estimator is a recipe for guessing, and some recipes are better. Bias against variance, counting tanks from serial numbers, and Fisher’s idea of choosing the parameter that makes the data most likely
An estimator is a recipe that turns a sample into a guess. Different recipes aimed at the same target behave differently: some are off on average, some scatter widely, and the best is not always the one that is right on average. There is also a principle, maximum likelihood, that writes a good recipe for almost any problem.
Press Play, then × 1000, and compare the three archers’ averages and spreads in the table. Change the sample size, then switch to the standard deviation, where even the unbiased archer starts to miss.
| Recipe | Average | Bias | Variance | Mean squared error | Bias in theory | MSE in theory |
|---|---|---|---|---|---|---|
| divide by n − 1 | 3.974 | −0.026 | 6.946 | 6.947 | 0.000 | 8.000 |
| divide by n | 3.180 | −0.820 | 4.446 | 5.119 | −0.800 | 5.760 |
| divide by n + 1 | 2.650 | −1.350 | 3.087 | 4.911 | −1.333 | 5.333 |
Teal dots are one sample; the dashed white curve and line are the truth, which the archers never see. Each histogram collects one archer’s estimates, with the latest in amber; the triangle marks the archer’s average, and the thick bar from the dashed line to the triangle is the bias. On the round targets only the left–right position means anything (the error of the estimate); the up–down scatter is decoration. Mean squared error = bias² + variance.
Write θ for the true value and T for an estimate of it computed from a random sample. The bias of T is its average over all possible samples minus θ, and its variance is its spread about its own average. The usual single measure of quality is the mean squared error, the average of (T − θ)², and it splits exactly: mean squared error = bias² + variance. An archer can lose by aiming off-centre or by having an unsteady hand, and the two faults add.
All three recipes start from the sum of squares, SS = Σ(xi − x̄)². The deviations are measured from the sample’s own mean x̄, which is the point closest to the data in exactly this sense, so SS is smaller than the sum of squared deviations from the true mean μ would be. On average the shortfall is one σ²: the expected value of SS is (n − 1)σ², whatever the shape of the population. Dividing by n − 1 instead of n makes up for it, and the result S² has expected value σ². This is Bessel’s correction, named after the astronomer Friedrich Bessel.
Unbiased does not mean best. For a normal population, SS/σ² has a chi-squared distribution with n − 1 degrees of freedom, and the mean squared error of SS/d is σ⁴(2(n − 1) + (n − 1 − d)²)/d², which is smallest at d = n + 1. Dividing by n + 1 always guesses low on average, but it scatters so much less that it wins. For a population with heavier tails the best divisor is larger still. And the square root of S² is biased low as an estimate of σ for every population, because a square root shrinks large values more than small ones; unbiasedness does not survive a change of scale.
Trading a little bias for a large cut in variance is one of the most useful ideas in statistics. See also Models and Overfitting, where it decides how flexible a model should be, and Bayesian Statistics, where pulling estimates towards a common value beats treating each alone.
Tanks are numbered 1 to N as they are built. Capture tanks one at a time and watch three guesses at N compete, then move the true N and see which guess stays centred and tight over 5,000 repeat captures.
| Estimator | This capture | Average over repeats | Bias | Standard deviation | Bias in theory | SD in theory |
|---|---|---|---|---|---|---|
| Twice the mean, minus 1 | 339.0 | — | — | — | 0.0 | 76.9 |
| The largest serial | 289.0 | — | — | — | −49.2 | 42.0 |
| Largest plus average gap | 345.8 | — | — | — | 0.0 | 50.4 |
Teal tanks are the serial numbers captured so far, on a line of every tank made; the dashed white line is the true N. Amber diamonds are the three estimates from this one capture. Each histogram shows where that estimator lands over 5,000 fresh captures of the same size, with a triangle at its average and a thick bar for its bias.
During the Second World War, Allied statisticians estimated German production from the serial numbers on captured equipment: tanks, and more reliably their gearboxes, engines and wheels. Richard Ruggles and Henry Brodie described the work in “An Empirical Approach to Economic Intelligence in World War II” (Journal of the American Statistical Association, 1947). The statistical estimates were far lower than those of conventional intelligence, and when German records were examined after the war they were far closer to the truth. For August 1942 the serial numbers gave 327 tanks a month and conventional intelligence 1,550; the records showed 342.
In the idealised problem, k serials are drawn without replacement from 1, 2, …, N, each set equally likely. The largest, m, can never exceed N, so it is biased low: its expected value is k(N + 1)/(k + 1). The repair comes from a symmetry. The k captured serials cut the unseen tanks into k + 1 stretches (before the first, between neighbours, and after the last), and each stretch has the same expected length. So the expected gap between m and N equals the average gap below the captured serials, (m − k)/k = m/k − 1, which can be computed from the data. Adding it gives m + m/k − 1, whose expected value is exactly N.
Twice the sample mean minus 1 is also unbiased, since the mean of 1, …, N is (N + 1)/2, but its variance is (N + 1)(N − k)/(3k) against (N + 1)(N − k)/(k(k + 2)) for the corrected maximum. The reason is sufficiency: once m is known, the other serials are just a random selection from 1, …, m − 1 and say nothing more about N. The maximum carries all the information in the sample, and m + m/k − 1 is the unbiased estimator with the smallest possible variance. An estimator that ignores this, like the mean, throws information away.
Drag the amber marker in the lower panel to slide the model across the data, and find the value that makes the teal bars tallest overall. Then drag a data point, raise n, and try the two-parameter map with its Climb button.
Teal dots are the data (drag them); the dashed white curve is the truth that produced them, and the amber curve is your candidate model. Each teal bar is the height the candidate gives one data point. The likelihood is the product of the bars, so its logarithm is the sum of their logs, drawn below in amber, with the dotted parabola that matches the peak’s curvature. Raise n and the peak narrows.
R. A. Fisher introduced the method in a series of papers from 1912 to 1922, ending with “On the Mathematical Foundations of Theoretical Statistics” (1922). Take a model that gives the probability, or probability density, of the data for each value of its parameter θ. Hold the observed data fixed and read that expression as a function of θ: this is the likelihood. The maximum likelihood estimate is the θ at which it is largest. Because independent observations multiply, it is easier to work with the logarithm, which turns the product into a sum and has its peak in the same place.
The likelihood is not a probability distribution over θ. It need not add up to 1 across parameter values, and it does not say how probable any value of θ is; it says how probable the data would be if θ were the truth. Only ratios of likelihoods carry meaning. Turning a likelihood into probabilities for θ takes a further ingredient, a prior (see also Bayesian Statistics).
For the models in the demo the peak can be found with calculus. Normal data: the estimate of μ is x̄, and the estimate of σ² is SS/n, with divisor n and so biased low, as the first demo showed. Exponential data with rate λ: 1/x̄. Poisson counts with mean λ: x̄. Binomial data with k successes in n trials: k/n. Maximum likelihood does not promise unbiased estimates; it promises estimates that home in on the truth as the sample grows, under mild conditions.
How sharply the log-likelihood is peaked measures how much the data say. The Fisher information I(θ) is the expected curvature of the log-likelihood of a single observation, with its sign reversed; n independent observations carry n·I(θ). The Cramér–Rao bound says that, under smoothness conditions, no unbiased estimator can have variance below 1/(n·I(θ)), and for large samples the maximum likelihood estimate is approximately normal with exactly that variance. This is why the curvature at the peak gives a standard error. The tank problem breaks the smoothness conditions, because the range of possible data depends on N, and its best estimator has a variance that falls like 1/k² instead of 1/k.
Spot a mistake or have an idea?