Five Numbers, Two Answers, and the Divisor Nobody Asks About
The standard deviation of 1, 2, 3, 4, 5 is either 1.4142 or 1.5811, and offering one of them without asking which question you are answering is the only wrong move. The sum of squared deviations is 10 either way, so everything turns on whether you divide it by 5 or by 4. Bessel's correction makes the variance unbiased and leaves the standard deviation biased low by about six percent at this sample size, and a third divisor beats both of them if you optimise for mean squared error instead.
What is the standard deviation of 1, 2, 3, 4, 5? It looks like a warm-up question, the kind you answer while the interviewer is still finishing the sentence. There are two defensible answers, and , and the fastest way to fail is to pick one of them without saying why.
The question is not a trick. It is genuinely under-specified, and the missing piece is not a number. It is whether those five values are everything there is, or a handful drawn from something larger that you cannot see.
The part nobody disputes
Both answers share every step but the last one. The mean of an arithmetic progression is its midpoint, so without any addition. The deviations from that mean are , and squaring them gives 4, 1, 0, 1, 4:
Now the fork. Divide by 5 and you get a variance of 2, so the deviation is . Divide by 4 and you get 2.5, so the deviation is . The ratio between the two answers is fixed and does not depend on the data at all:
The population variance of a finite list of values divides the sum of squared deviations by and describes that list, nothing else. The sample variance divides by and is not a description of anything. It is a guess at the variance of a distribution you never see, made from draws out of it.
Read that way, the two numbers answer different questions and both are right. The wrong answer is a single number offered with no question attached.
It is worth knowing how large the disagreement actually is, because the ratio in equation (2) is whatever the numbers happen to be. That is 11.8 per cent apart at , 2.6 per cent at , and half a per cent at . The divisor is a genuine fork on five values and a rounding detail on a hundred, which is exactly why the question gets asked with five. Small samples are the only place the two conventions can be told apart by eye.
Where the missing divisor goes
The usual explanation for is a slogan about degrees of freedom, and the slogan is true. The deviations are not five independent numbers, because they satisfy one equation whether you like it or not:
Tell me four of the deviations and I can write down the fifth. So the deviations live in an -dimensional subspace, not an -dimensional one, and dividing a sum of squares by 5 when only 4 of the terms could vary is dividing by too much.
The slogan is a picture, though, and the reason is a computation. Suppose the are independent draws from a distribution with mean and variance . Expand the sum of squares around the sample mean and take expectations:
The terms cancel, which is the whole trick, and what is left is short by exactly one . That shortfall has a cause you can name: the sample mean was fitted from the same five numbers, so it sits closer to them than the true mean does, and deviations measured from it are systematically too small. Dividing by pays that debt back precisely.
Bessel fixes the square, not the root
Here is the part that most treatments leave out, and it matters more than the choice of divisor. Equation (4) says the version is an unbiased estimator of the variance. It says nothing about the standard deviation, and the standard deviation is what you were asked for.
Taking a square root does not commute with taking an expectation. The square root is concave, so Jensen’s inequality runs in one direction only:
The inequality is strict unless is constant, which for real data it never is. So is biased low, always, and no choice of divisor repairs it. For a normal sample the size of the bias is known in closed form. Write with
At the corrected sample deviation still lands about six percent below the truth on average. A simulation of two hundred thousand normal samples of size five measures the mean of at 0.9987 times , which is the unbiasedness of equation (4) showing up as advertised, and the mean of at 0.9391, against the exact 0.9400. The factor climbs slowly: 0.8862 at , 0.9727 at , 0.9914 at .
None of this makes the wrong answer. It makes it a correctly computed sample standard deviation, which is a different thing from an unbiased estimate of anything.
A cross-check that never picks a divisor
If only appeared because somebody divided by 5, it would be an artefact. It is not, and there are two ways to see that without touching the sum of squares. The first is the shortcut identity:
The second treats 1 to 5 as what it is under the population reading, a discrete uniform distribution on five consecutive integers. That family has a closed-form variance:
Two routes with no shared arithmetic, both landing on 2. So is a property of a distribution and would be the answer even if you had never written down a deviation.
Where the question is genuinely ill posed
A list handed to you as 1, 2, 3, 4, 5 with nothing else said is a complete enumeration, and for a complete enumeration is not a refinement, it is a mistake. There is no larger population to estimate, no sampling error to correct, and inflating the variance by describes a spread the data does not have. So if forced to give one number with no chance to ask, is the better guess about what the asker meant.
One more wrinkle is worth knowing, because it shows the fork is not really about the words population and sample. Compute the sample variance without Bessel’s correction and you also get 2. The two candidate answers correspond to two divisors, and three readings of the question map onto them, which is why arguing about the vocabulary settles nothing and asking about the divisor settles everything.
And once you accept that the divisor follows from what you are trying to achieve, a third candidate walks in. Suppose you want the estimator of the variance with the smallest mean squared error among all multiples of the sum of squares, rather than the one with no bias. For normal data is , so the error of is
Dividing by beats dividing by on that criterion, and at it returns and a deviation of about 1.2910. Nobody teaches that number, because unbiasedness won the vocabulary war a century ago. It is still the right answer to a reasonable question, which is the cleanest evidence that the standard deviation of five numbers is not a well defined object until somebody says what it is for.
The formulas also disagree about how they die. At the population deviation is 0, which is correct and useless, while the sample version reads and is undefined. That is the honest behaviour: a single observation carries no information at all about spread, and the estimator that admits it is the better one.
Sources and further reading
- The two definitions and the notation that separates them — Standard deviation
- Why the divisor is — Bessel's correction
- The factor and the bias that survives the correction — Unbiased estimation of standard deviation
- The inequality behind equation (5) — Jensen's inequality
- The distribution used for the cross-check — Discrete uniform distribution
Every figure here was recomputed in exact rational arithmetic before publication, with the value checked against a two hundred thousand sample simulation that measured 0.9391 where the closed form predicts 0.9400.
Comments · 0
Be the first to comment.