The largest serial number seen
Worth reading first: Counting a population by its repeats · A stick broken in three.
During the Second World War, Allied intelligence wanted to know how many tanks Germany was building each month. Spies and aerial photographs gave one answer. A group of statisticians gave another, starting from a fact about the tanks themselves: their parts were numbered in sequence. Gearboxes, chassis, engines and the moulds for road wheels carried serial numbers, and captured or destroyed tanks could be examined. From a handful of serial numbers, they estimated the total.
After the war the German production records became available, and the comparison was published by Richard Ruggles and Henry Brodie in 1947. For June 1941, intelligence had estimated 1,550 tanks a month; the statistical estimate was 244; the records said 271. For August 1942 the figures were 1,550, 327 and 342. The intelligence estimates were too high by a factor of about five. The serial numbers were close.
The mathematics behind the estimate is a small, complete piece of probability, and it inverts the question asked in counting a population by its repeats. There, items carry no labels, and the size of a population is read from how often the same item is seen twice. Here every item carries its own number, and the size is read from the largest number seen. The opening figure draws four samples of five serial numbers from tanks numbered 1 to 60. The largest number seen is never more than 60 and is usually less. The question is how much less.
Five serial numbers out of sixty
Suppose there are tanks, numbered , and of them are seen, each set of equally likely. Write for the largest serial number among them. It is the obvious estimate of , and it is always too small or exactly right. Since it can never be too large, it is too small on average. In the opening figure’s four samples the largest numbers are 47, 44, 55 and 49; the shaded stretch beyond each is the range of tanks that exist and were not seen.
What should be added? The figure’s blue marks show the answer this essay arrives at: add the average gap between the serial numbers seen, , and subtract one. The four estimates are 55.4, 51.8, 65.0 and 57.8: two below 60, one above, none exactly right, and — as the later figures show — exactly right on average, with less scatter than any other estimate that is right on average.
The estimate uses only and . The other four numbers in each sample, the ones below the largest, appear to carry information — a sample bunched near the top seems to say something different from one spread evenly — and yet the best estimate ignores them entirely. That is the surprising part of the answer, and it says that once the largest number is known, the positions of the rest are pure noise.
The largest number seen falls short
The distribution of is a counting argument. For the largest of the numbers to be , the number must be among them and the other must be chosen from the numbers below it, so
The figure draws it for and . The chance rises steeply towards the top, and the single most likely value of the largest number is 60, the true total. But the distribution has a long left tail and no right tail at all, so its average is pulled down. The average works out to
which for five numbers from 60 is , short by . The figure checks the exact average against 20,000 simulated samples.
This is the difference between the most likely value and the average, which matters for estimation in a way it rarely does elsewhere. The largest number seen is the maximum-likelihood estimate of : for any sample, the total that makes it most probable is the smallest total consistent with it, which is . Maximum likelihood is often a good rule, and here it is systematically wrong, always on the same side. It is wrong because the probability of a sample, , falls as grows, so the most likely is the smallest allowed — a rule that ignores the cost of having seen only a few. Estimating from too little and acting on the estimate has a price that can be computed, as it is for a bettor who does not know the coin; here the price is a steady shortfall of about one gap.
Six gaps of the same average size
Where does the correction come from? Mark the five serial numbers on a line from 0 to . They cut it into six gaps: below the smallest, between consecutive numbers, and above the largest. The figure measures the average length of each across 20,000 samples, and all six are the same, , to within the noise of the simulation.
That they must be equal is a symmetry argument of the kind used for a stick broken in three. Choose points at random among positions arranged round a circle, and cut the circle at one of them; the remaining points are a random sample from to , and the gaps between the original points are the gaps of the sample. On the circle no gap is special, so all have the same average. The gap above the largest serial number, from to , is therefore on average the same size as each of the gaps that can be seen.
So the best guess at the unseen gap is the average of the seen ones. The seen gaps together run from 0 to , so their average is . Adding it to gives an estimate of , and subtracting one gives
Its average is exactly , because the average of is and multiplying by undoes the shrinkage. The other numbers in the sample were used only to justify the correction, not to compute it.
Three ways to estimate sixty
The new estimate is not the only one that is right on average. The serial numbers seen are a random sample from to , whose average is , so twice the sample average minus one is also unbiased. It uses every number in the sample equally, and the figure compares it with the other two. Both corrected estimates centre on 60. But twice the average spreads by 15.0 — its exact standard deviation is — while the corrected maximum spreads by 9.7, against an exact .
That the corrected maximum is better is not luck. The largest serial number is a sufficient statistic: given , the other numbers are a uniformly random choice from to , and their distribution does not depend on at all. Whatever they look like — bunched, spread, all near the top — they carry no information about how many tanks there are. An estimate that uses them, like twice the average, is mixing in pure noise. The Lehmann–Scheffé theorem makes this precise: an unbiased estimate that depends only on a complete sufficient statistic has the smallest variance of all unbiased estimates, and is that estimate.
The difference shows up in the formulas as a factor of . Twice the average has a standard deviation that falls like , the familiar square-root law of averages settling down. The corrected maximum’s falls like , much faster, because the maximum of a sample sits within about one gap of the end of the range, and the gaps shrink like . A statistic at the edge of a distribution converges faster than one at its centre whenever the distribution has a sharp edge. Extremes behave by their own rules — the longest run of heads never settles into a limiting shape at all — and the serial-number problem is the rare case where the extreme is better behaved than the average, because the edge it sits against is fixed.
When the numbering does not start at one
The wartime problem was rarely as clean as numbers running from 1. A factory might begin its series at an unknown value, so that the serial numbers run from to with both and unknown. The gap argument handles this at once. The numbers seen now cut the range into gaps, of which two — below the smallest and above the largest — are hidden, and all still have the same average size. The visible span from the smallest to the largest consists of gaps, so the whole range is about times the span, and
is unbiased for the number of tanks. It needs at least two serial numbers, since one number gives no span at all, and it is noisier than the estimate with a known start, since two gaps must now be guessed instead of one.
The same reasoning extends to the unseen gaps of any kind. A sample of numbers carries observed gaps whatever the setting, and every hidden gap — at either end, or between two factories’ ranges — is estimated by their average. It is the waiting-time symmetry that makes a fresh draw equally likely to fall into any of the gaps already cut, read as a statement about estimation rather than about waiting: what has not been seen is, on average, exactly like what has.
Serial numbers against repeats
The comparison with the birthday problem’s estimates is instructive. Without serial numbers, an observer who can only recognise an item when it is seen again learns the population size from coincidences. The number of matching pairs among sightings averages , so pairs begin to appear only when is near — the same arithmetic that puts a shared birthday among twenty-three people. For a population of 1,000, the figure shows the chance of having seen no repeat at all: 95% after ten sightings, 82% after twenty, 28% after fifty.
Serial numbers change the rate of learning completely. After five tanks the estimate’s typical error is 17% of the total; after ten it is 9%; after a hundred it is under one per cent. The figure plots both curves on one axis, and the serial numbers win at every sample size. Labels make each observation informative on its own, where unlabelled observations are informative only in pairs.
This is why serial numbers are treated as secrets. After the war, manufacturers of military equipment learned to randomise them, and the same arithmetic has been applied in peacetime: to estimate the number of computers of a particular model built, from the serial numbers seen in repair shops, and to estimate how many of a product a company has sold, from order numbers that customers happen to report. A sequence of consecutive numbers announces its own length to anyone who sees a few of them.
What a flat prior says after seeing 60
A Bayesian answers differently: not with an estimate but with a distribution of belief over , by the rule that turns a prior into a posterior. Start from equal belief in every total up to some large bound. After seeing serial numbers whose largest is , the posterior chance of a total is proportional to the chance of the observation, , for every . The figure draws it for a largest serial of 60 seen among 2, 3, 5 and 10 numbers.
Every posterior peaks at 60 — the maximum-likelihood answer again — and falls away. With ten serial numbers it falls fast, like , and the posterior median is 64, close to the unbiased estimate of 65. With two it falls like , its tail reaches far, and its median is 118, against an unbiased estimate of 89. With one serial number the posterior falls like , which does not add up to anything finite, and the answer depends entirely on the arbitrary bound: a single serial number is not enough evidence to overcome a prior that is indifferent among totals up to a million.
That dependence is the honest content of small samples. Different reasonable priors — flat in , flat in , or reflecting a factory’s known capacity — give similar answers once is ten or so, because the likelihood then dominates. For two or three serial numbers they disagree, and the disagreement is not a defect of the method but a fact about how little two numbers say. The wartime statisticians had dozens of serial numbers a month from different parts of each tank, which is why their estimates were good.
Uniform sampling and the factories it ignores
The figures assume an idealised sampling: every tank equally likely to be captured, numbers running consecutively from 1, and no tank seen twice. None of these held exactly. Serial numbers were assigned in blocks to different factories, some ranges were skipped, and a tank captured in one month may have been built in another. The statisticians modelled these departures — estimating each factory’s range separately, and using the serial numbers on wheels, whose moulds could be counted, to estimate production rates — and the agreement with the records reflects that work as much as the formula.
Nor do the figures show what happens when the sampling is not uniform. If tanks from early production are more likely to be destroyed — because they have been in service longer — the sample is biased towards low numbers, and every estimate here is biased low with it. Correcting for that requires a model of which tanks are seen, and no amount of arithmetic on the numbers alone can supply it.
And the optimality is narrow. The corrected maximum has the least variance among unbiased estimates, but an estimate that accepts a small bias can have a smaller total error; multiplying by instead of , for instance, has smaller mean squared error at the cost of being slightly low on average. Which criterion to optimise is a choice, and the figures make none.
Still open: estimating the size of what cannot be numbered
The serial-number problem is solved: exact distributions, an optimal unbiased estimate, and clear Bayesian answers. The harder problems sit beside it. Estimating the number of species from a sample — how many new kinds the next sample will show — has no labels to exploit, and it is known that no estimate can be uniformly good: the data can always be explained by a few common species or by a vast number of rare ones that have not yet appeared. How much can be said, with what guarantees and under what assumptions about the rare species, is the subject of active research in statistics and ecology, and its answers are much weaker than the clean formula here.
Mixtures of the two situations are common and less understood: items that are partly labelled, numbering schemes that are partly random, or sequences that start at an unknown value as well as end at one. Each needs its own analysis, and the general question — how much of the information in a sample lives in its extreme values, and how fast estimates built from them converge — is answered for particular families of distributions rather than in general.
One gap beyond the last
The largest serial number seen is the natural guess at how many there are, and it is always short. It is short by about one gap, because random numbers cut the range into gaps of equal average size and the last gap is hidden. Adding the average of the visible gaps gives , right on average and less scattered than any other estimate that is right on average, because once the largest number is known the others carry no information at all. Its error falls like one over the number of serial numbers seen, where unlabelled counts learn only from coincidences that take sightings to appear. That difference — a factor of five between the statisticians and the spies — is what a sequence of consecutive numbers gives away.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- The nearest point is not the best guess — both name estimator, unbiased estimator
Named objects
A dashed tag is an object no other essay names yet.
EstimatorEstimator biasMaximum likelihoodOrder statisticsPosteriorUnbiased estimator