In the
statistical theory of
estimation
Estimation (or estimating) is the process of finding an estimate or approximation, which is a value that is usable for some purpose even if input data may be incomplete, uncertain, or unstable. The value is nonetheless usable because it is de ...
, the German tank problem consists of estimating the maximum of a
discrete uniform distribution
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution wherein a finite number of values are equally likely to be observed; every one of ''n'' values has equal probability 1/''n''. Ano ...
from
sampling without replacement. In simple terms, suppose there exists an unknown number of items which are sequentially numbered from 1 to ''N''. A random sample of these items is taken and their sequence numbers observed; the problem is to estimate ''N'' from these observed numbers.
The problem can be approached using either
frequentist inference
Frequentist inference is a type of statistical inference based in frequentist probability, which treats “probability” in equivalent terms to “frequency” and draws conclusions from sample-data by means of emphasizing the frequency or pro ...
or
Bayesian inference, leading to different results. Estimating the population maximum based on a ''single'' sample yields divergent results, whereas estimation based on ''multiple'' samples is a practical estimation question whose answer is simple (especially in the frequentist setting) but not obvious (especially in the Bayesian setting).
The problem is named after its historical application by Allied forces in
World War II
World War II or the Second World War, often abbreviated as WWII or WW2, was a world war that lasted from 1939 to 1945. It involved the World War II by country, vast majority of the world's countries—including all of the great power ...
to the estimation of the monthly rate of German tank production from very limited data. This exploited the manufacturing practice of assigning and attaching ascending sequences of serial numbers to tank components (chassis, gearbox, engine, wheels), with some of the tanks eventually being captured in battle by Allied forces.
Suppositions
The adversary is presumed to have manufactured a series of tanks marked with consecutive whole numbers, beginning with serial number 1. Additionally, regardless of a tank's date of manufacture, history of service, or the serial number it bears, the distribution over serial numbers becoming revealed to analysis is uniform, up to the point in time when the analysis is conducted.
Example
Assuming tanks are assigned sequential serial numbers starting with 1, suppose that four tanks are captured and that they have the serial numbers: 19, 40, 42 and 60.
The ''frequentist'' approach predicts the total number of tanks produced will be:
:
The ''Bayesian'' approach predicts that the
median number of tanks produced will be very similar to the frequentist prediction:
:
whereas the Bayesian
mean
There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value ( magnitude and sign) of a given data set.
For a data set, the '' ari ...
predicts that the number of tanks produced would be:
:
Let equal the total number of tanks predicted to have been produced, equal the highest serial number observed and equal the number of tanks captured.
The frequentist prediction is calculated as:
:
The Bayesian median is calculated as:
:
The Bayesian mean is calculated as:
:
Both Bayesian computations are based on the following
probability mass function:
:
This distribution has a positive
skewness
In probability theory and statistics, skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. The skewness value can be positive, zero, negative, or undefined.
For a unimo ...
, related to the fact that there are at least 60 tanks. Because of this skewness, the mean may not be the most meaningful estimate. The
median in this example is 74.5, in close agreement with the frequentist formula. Using
Stirling's approximation
In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a good approximation, leading to accurate results even for small values of n. It is named after James Stirling, though a related but less p ...
, the Bayesian probability function may be approximated as
:
which results in the following approximation for the median:
:
Finally, the average estimate by Bayesians, and its deviation, are computed as:
:
Historical example of the problem
During the course of the Second World War, the
Western Allies made sustained efforts to determine the extent of German production and approached this in two major ways: conventional intelligence gathering and statistical estimation. In many cases, statistical analysis substantially improved on conventional intelligence. In some cases, conventional intelligence was used in conjunction with statistical methods, as was the case in estimation of
Panther tank production just prior to
D-Day.
The allied command structure had thought the
Panzer V (Panther) tanks seen in Italy, with their high velocity, long-barreled 75 mm/L70 guns, were unusual heavy tanks and would only be seen in northern France in small numbers, much the same way as the
Tiger I was seen in Tunisia. The US Army was confident that the
Sherman tank would continue to perform well, as it had versus the
Panzer III
The ''Panzerkampfwagen III'', commonly known as the Panzer III, was a medium tank developed in the 1930s by Germany, and was used extensively in World War II. The official German ordnance designation was Sd.Kfz. 141. It was intended to fight oth ...
and
Panzer IV
The ''Panzerkampfwagen'' IV (Pz.Kpfw. IV), commonly known as the ''Panzer'' IV, was a German medium tank developed in the late 1930s and used extensively during the Second World War. Its ordnance inventory designation was Sd.Kfz. 161.
The Panz ...
tanks in North Africa and Sicily. Shortly before D-Day, rumors indicated that large numbers of Panzer V tanks were being used.
To determine whether this was true, the Allies attempted to estimate the number of tanks being produced. To do this, they used the serial numbers on captured or destroyed tanks. The principal numbers used were gearbox numbers, as these fell in two unbroken sequences. Chassis and engine numbers were also used, though their use was more complicated. Various other components were used to cross-check the analysis. Similar analyses were done on wheels, which were observed to be sequentially numbered (i.e., 1, 2, 3, ..., ''N'').
The analysis of tank wheels yielded an estimate for the number of wheel molds that were in use. A discussion with British road wheel makers then estimated the number of wheels that could be produced from this many molds, which yielded the number of tanks that were being produced each month. Analysis of wheels from two tanks (32 road wheels each, 64 road wheels total) yielded an estimate of 270 tanks produced in February 1944, substantially more than had previously been suspected.
German records after the war showed production for the month of February 1944 was 276. The statistical approach proved to be far more accurate than conventional intelligence methods, and the phrase "German tank problem" became accepted as a descriptor for this type of statistical analysis.
Estimating production was not the only use of this serial-number analysis. It was also used to understand German production more generally, including number of factories, relative importance of factories, length of supply chain (based on lag between production and use), changes in production, and use of resources such as rubber.
Specific data
According to conventional Allied intelligence estimates, the Germans were producing around 1,400 tanks a month between June 1940 and September 1942. Applying the formula below to the serial numbers of captured tanks, the number was calculated to be 246 a month. After the war, captured German production figures from the ministry of
Albert Speer
Berthold Konrad Hermann Albert Speer (; ; 19 March 1905 – 1 September 1981) was a German architect who served as the Reich Ministry of Armaments and War Production, Minister of Armaments and War Production in Nazi Germany during most of ...
showed the actual number to be 245.
Estimates for some specific months are given as:
Similar analyses
Similar serial-number analysis was used for other military equipment during World War II, most successfully for the
V-2 rocket.
Factory markings on Soviet military equipment were analyzed during the
Korean War
{{Infobox military conflict
, conflict = Korean War
, partof = the Cold War and the Korean conflict
, image = Korean War Montage 2.png
, image_size = 300px
, caption = Clockwise from top: ...
, and by German intelligence during World War II.
In the 1980s, some Americans were given access to the production line of Israel's
Merkava tanks. The production numbers were classified, but the tanks had serial numbers, allowing estimation of production.
The formula has been used in non-military contexts, for example to estimate the number of
Commodore 64 computers built, where the result (12.5 million) matches the low-end estimates.
Countermeasures
To confound serial-number analysis, serial numbers can be excluded, or usable auxiliary information reduced. Alternatively, serial numbers that resist cryptanalysis can be used, most effectively by randomly choosing numbers without replacement from a list that is much larger than the number of objects produced, or by producing random numbers and checking them against the list of already assigned numbers; collisions are likely to occur unless the number of digits possible is more than twice the number of digits in the number of objects produced (where the serial number can be in any base); see
birthday problem. For this, a
cryptographically secure pseudorandom number generator may be used. All these methods require a lookup table (or breaking the cypher) to back out from serial number to production order, which complicates use of serial numbers: a range of serial numbers cannot be recalled, for instance, but each must be looked up individually, or a list generated.
Alternatively, sequential serial numbers can be encrypted with a simple
substitution cipher
In cryptography, a substitution cipher is a method of encrypting in which units of plaintext are replaced with the ciphertext, in a defined manner, with the help of a key; the "units" may be single letters (the most common), pairs of letters, t ...
, which allows easy decoding, but is also easily broken by
frequency analysis: even if starting from an arbitrary point, the plaintext has
a pattern (namely, numbers are in sequence). One example is given in
Ken Follett's novel ''
Code to Zero
''Code to Zero'' is a novel by the British author Ken Follett, published by Pan Macmillan. The story follows Luke, an amnesic who spends the duration of the book learning of his life, and slowly uncovering secrets of a conspiracy to hold America ...
'', where the encryption of the
Jupiter-C rocket serial numbers is given by:
The code word here is
Huntsville (with repeated letters omitted) to get a 10-letter key. The rocket number 13 was therefore "HN", and the rocket number 24 was "UT".
Frequentist analysis
Minimum-variance unbiased estimator
For
point estimation (estimating a single value for the total,
), the
minimum-variance unbiased estimator In statistics a minimum-variance unbiased estimator (MVUE) or uniformly minimum-variance unbiased estimator (UMVUE) is an unbiased estimator that has lower variance than any other unbiased estimator for all possible values of the parameter.
For p ...
(MVUE, or UMVU estimator) is given by:
:
where ''m'' is the largest serial number observed (
sample maximum) and ''k'' is the number of tanks observed (
sample size). Note that once a serial number has been observed, it is no longer in the pool and will not be observed again.
This has a variance
:
so the
standard deviation is approximately ''N''/''k'', the expected size of the gap between sorted observations in the sample.
The formula may be understood intuitively as the sample maximum plus the average gap between observations in the sample, the sample maximum being chosen as the initial estimator, due to being the
maximum likelihood estimator
In statistics, maximum likelihood estimation (MLE) is a method of estimating the parameters of an assumed probability distribution, given some observed data. This is achieved by maximizing a likelihood function so that, under the assumed stati ...
, with the gap being added to compensate for the negative bias of the sample maximum as an estimator for the population maximum, and written as
:
This can be visualized by imagining that the observations in the sample are evenly spaced throughout the range, with additional observations just outside the range at 0 and ''N'' + 1. If starting with an initial gap between 0 and the lowest observation in the sample (the sample minimum), the average gap between consecutive observations in the sample is
; the
being because the observations themselves are not counted in computing the gap between observations.. A derivation of the expected value and the variance of the sample maximum are shown in the page of the
discrete uniform distribution
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution wherein a finite number of values are equally likely to be observed; every one of ''n'' values has equal probability 1/''n''. Ano ...
.
This philosophy is formalized and generalized in the method of
maximum spacing estimation; a similar heuristic is used for
plotting position in a
Q–Q plot, plotting sample points at , which is evenly on the uniform distribution, with a gap at the end.
Confidence intervals
Instead of, or in addition to, ''point'' estimation,
''interval'' estimation can be carried out, such as
confidence interval
In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as ...
s.
These are easily computed, based on the observation that the probability that ''k'' observations in the sample will fall in an interval covering ''p'' of the range (0 ≤ ''p'' ≤ 1) is ''p''
''k'' (assuming in this section that draws are ''with'' replacement, to simplify computations; if draws are without replacement, this overstates the likelihood, and intervals will be overly conservative).
Thus the
sampling distribution of the quantile of the sample maximum is the graph ''x''
1/''k'' from 0 to 1: the ''p''-th to ''q''-th quantile of the sample maximum ''m'' are the interval
1/''k''''N'', ''q''1/''k''''N''">'p''1/''k''''N'', ''q''1/''k''''N'' Inverting this yields the corresponding confidence interval for the population maximum of
1/''k'', ''m''/''p''1/''k''">'m''/''q''1/''k'', ''m''/''p''1/''k''
For example, taking the symmetric 95% interval ''p'' = 2.5% and ''q'' = 97.5% for ''k'' = 5 yields 0.025
1/5 ≈ 0.48, 0.975
1/5 ≈ 0.995, so the confidence interval is approximately
.005''m'', 2.08''m'' The lower bound is very close to ''m'', thus more informative is the asymmetric confidence interval from ''p'' = 5% to 100%; for ''k'' = 5 this yields 0.05
1/5 ≈ 0.55 and the interval
'm'', 1.82''m''
More generally, the (downward biased) 95% confidence interval is
1/''k''">'m'', ''m''/0.051/''k''=
1/k">'m'', ''m''·201/k For a range of ''k'' values, with the UMVU point estimator (plus 1 for legibility) for reference, this yields:
Immediate observations are:
* For small sample sizes, the confidence interval is very wide, reflecting great uncertainty in the estimate.
* The range shrinks rapidly, reflecting the exponentially decaying probability that ''all'' observations in the sample will be significantly below the maximum.
* The confidence interval exhibits positive skew, as ''N'' can never be below the sample maximum, but can potentially be arbitrarily high above it.
Note that ''m''/''k'' cannot be used naively (or rather (''m'' + ''m''/''k'' − 1)/''k'') as an estimate of the
standard error
The standard error (SE) of a statistic (usually an estimate of a parameter) is the standard deviation of its sampling distribution or an estimate of that standard deviation. If the statistic is the sample mean, it is called the standard error ...
''SE'', as the standard error of an estimator is based on the ''population'' maximum (a parameter), and using an estimate to estimate the error in that very estimate is
circular reasoning
Circular may refer to:
* The shape of a circle
* ''Circular'' (album), a 2006 album by Spanish singer Vega
* Circular letter (disambiguation)
** Flyer (pamphlet), a form of advertisement
* Circular reasoning, a type of logical fallacy
* Circul ...
.
Bayesian analysis
The Bayesian approach to the German tank problem is to consider the credibility
that the number of enemy tanks
is equal to the number
, when the number of observed tanks,
is equal to the number
, and the maximum observed serial number
is equal to the number
. The answer to this problem depends on the choice of prior for
. One can proceed using a proper prior, e.g., the Poisson or Negative Binomial distribution, where closed formula for the posterior mean and posterior variance can be obtained.
An alternative is to proceed using direct calculations as shown below.
For brevity, in what follows,
is written
Conditional probability
The rule for
conditional probability
In probability theory, conditional probability is a measure of the probability of an event occurring, given that another event (by assumption, presumption, assertion or evidence) has already occurred. This particular method relies on event B occu ...
gives
:
Probability of ''M'' knowing ''N'' and ''K''
The expression
:
is the conditional probability that the maximum serial number observed,
, is equal to
, when the number of enemy tanks,
, is known to be equal to
, and the number of enemy tanks observed,
, is known to be equal to
.
It is
:
where
is a
binomial coefficient
In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
and