The sample mean turned out to be centred on the population mean with a spread of , which is reassuring but does not say it was the right choice. The median would also have been available, and so would the midpoint of the range, and for parameters with no obvious sample analogue there is no default at all. This lesson sets up the criteria that decide between candidates.
An estimator is a rule
Keep two things apart. An estimator is a rule: a function that turns any sample into a number, written with capital letters because its inputs are random. An estimate is what that rule produces from the particular sample in hand, a single number with nothing random about it.
Every property discussed below belongs to the rule, not to the estimate. Saying that is unbiased is a statement about what happens across all possible samples; it says nothing about whether is close to the truth in this instance, and it cannot, because the truth is unknown. This is the same shift the first lesson described, from claims about one conclusion to claims about a procedure, and it is what makes the subject tractable.
There are usually many candidate rules. For a symmetric population the mean, the median and the midrange all estimate the same centre. For the maximum of a uniform distribution on , the sample maximum and twice the sample mean both estimate . Choosing between them requires a definition of good.
Bias
The bias of an estimator is how far its sampling distribution is centred from the truth:
An estimator with zero bias for every value of is unbiased. The previous lesson showed exactly, so the sample mean is unbiased for the population mean, at every sample size and for every population with a finite mean.
Bias is not the same as error. An unbiased estimator can be badly wrong on any given sample, and it is unbiased only in the sense that the errors cancel across repetitions. Conversely a biased estimator can be reliably close. The word carries a moral weight in ordinary English that it does not have here, and treating unbiasedness as a requirement rather than a property is the mistake this lesson is arranged to prevent.
Unbiasedness also fails to survive transformation. If is unbiased for , then is generally biased for , because expectation does not pass through a nonlinear function. The sample variance is unbiased for , and yet is biased low for : for a normal population with , , so the usual standard deviation is systematically 2.7 per cent too small. At the factor is 0.9896 and at it is 0.9975, so the problem fades, but it never vanishes and almost nobody corrects for it.
Where the comes from
This is the derivation everyone is promised and rarely shown. Consider the sum of squared deviations from the sample mean, , and rewrite each deviation by inserting the true mean:
Square and sum over . The cross term is , and , so the cross term is , while the last term sums to . Two of them cancel one, leaving the identity
Now take expectations. Each is by definition, giving for the first sum. And is the variance of the sample mean, which the previous lesson found to be , so the second term has expectation . Therefore
Dividing by gives an expectation of , which is too small; dividing by gives exactly . That is the whole justification, and the identity above shows precisely where the loss comes from: deviations are measured from , which sits closer to the data than does by exactly per observation on average.
The usual verbal gloss, that one degree of freedom is used up estimating the mean, is a summary of that algebra rather than an argument. It does generalise: when parameters are estimated before computing residuals, the divisor becomes , which is why the regression lesson divides by .
Example. A sample of 5 values from a population with is taken, and the analyst divides the sum of squared deviations by 5 instead of 4. What does that estimator average out to?
By the result above, , so dividing by 5 gives an expectation of 80. The estimator is biased low by 20 per cent of the true variance, and no amount of repeating the experiment removes it, since 20 per cent is the average behaviour.
Now you. For , what fraction of does the divide-by- estimator average out to?
Answer
, so it is 5 per cent too low. The bias is , which shrinks as grows and is exactly why the two divisors are indistinguishable in large samples.
Variance and mean squared error
Centring is only half of the question. An estimator that is unbiased but wildly variable is worse than a slightly off-centre one that barely moves. The measure combining both is the mean squared error,
and the decomposition is worth deriving, since it is three lines. Write . Squaring gives three terms; the first has expectation , the third is a constant equal to the squared bias, and the cross term has expectation zero because . So MSE splits cleanly into a spread part and an off-centre part, and minimising it means trading one against the other.
That trade is real, not hypothetical. For a normal sample, consider estimating by for a constant . Choosing gives the unbiased , with . Choosing introduces a small downward bias and minimises the MSE. At the unbiased choice has MSE and the biased one has , eighteen per cent lower. The biased estimator is closer to the truth on average, by the squared-error standard, and the unbiased one is still the one everybody uses, largely because unbiasedness composes nicely across later calculations.
Example. Draws come from a uniform distribution on . Two estimators of are and , where is the sample maximum. Both are unbiased. Compare their variances at .
The uniform has mean and variance , so , which is . The maximum has and the rescaled version has variance , which is . The maximum-based estimator has a quarter of the variance, because the largest observation carries nearly all the information about an upper limit while the other nine contribute almost nothing.
Now you. How does the advantage change with ? Compare the two variances as formulas.
Answer
The ratio is , so the advantage grows without limit. The mean-based estimator improves as while the maximum-based one improves as , which is a different and much faster rate.
Consistency
A minimum requirement is that more data should help. An estimator is consistent if converges in probability to as grows: for any tolerance , the probability of missing by more than goes to zero.
The sample mean is consistent by the weak law of large numbers, proved in the probability course, and the argument is available directly from Chebyshev's inequality: , which goes to zero. More generally, any estimator whose bias and variance both tend to zero is consistent, since its MSE tends to zero.
Consistency is weak, and it is worth knowing how weak. It says nothing about any finite sample size, so an estimator can be consistent and useless at . It is also easy to satisfy: adding to a consistent estimator leaves it consistent while making it absurd for realistic samples. Its real value is as a filter: an inconsistent estimator is disqualified, because it does not converge on the answer even with unlimited data. The first lesson's biased thermometer is exactly that, converging with beautiful precision on the wrong number.
Efficiency, and the reason the mean usually wins
Among unbiased estimators, the one with the smallest variance is called efficient, and comparing two is done by the ratio of their variances. For a normal population the sample mean has variance , while the sample median has variance approaching for large . The relative efficiency of the median is therefore : a median computed from 1000 observations carries the information of a mean computed from 637.
There is a floor on how well any unbiased estimator can do, given by the Cramér-Rao bound, which says that the variance of an unbiased estimator is at least the reciprocal of the Fisher information in the sample. The next lesson introduces that quantity properly. What matters here is that the bound exists, that the sample mean attains it for normal data, and that "the mean is best" is therefore a theorem under stated assumptions rather than a habit.
Change the assumptions and the answer changes. For a Laplace population, whose density is proportional to and which has heavier tails than the normal, the median is the efficient estimator and the mean is the wasteful one. For a population with occasional gross errors, the mean's variance can be arbitrarily bad while the median's is not. The second lesson's advice, mean for clean symmetric data and median for contaminated data, is the practical statement of exactly this.
Example. An analyst has 1000 observations from a normal population and reports the median rather than the mean, to be safe against outliers. What has that caution cost, expressed in sample size?
The median's variance is times the mean's, so the analysis has the precision of observations. The 363 discarded observations are the insurance premium, and it is worth paying only if outliers are a real prospect.
Now you. A study reports means and wants the same precision the median would give from 2000 observations. How many observations does it need?
Answer
The mean needs observations to match a median computed from 2000. The comparison runs both ways: the efficient estimator needs fewer observations for the same precision.
What is still missing
There are now criteria: bias, variance, mean squared error, consistency and efficiency, and enough machinery to compare any two candidate rules. What there is not is a way to produce candidates. Every estimator used so far was guessed by analogy, replacing a population mean by a sample mean, a population maximum by a sample maximum, and that analogy runs out quickly. Nothing in it says how to estimate the rate of a Poisson process from interval counts, or the two parameters of a distribution at once, or a parameter that appears only inside an exponential.
What is needed is a general recipe that takes a probability model and returns an estimator, ideally one that is automatically consistent and efficient in large samples. That recipe exists and is the subject of the next lesson.