German tank problem
production of German tanks such as the Panther was accurately estimated by Allied intelligence using statistical methods. In the statistical theory of estimation, the German tank problem consists of estimating the maximum of a discrete uniform distribution 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 or Bayesian inference, leading to different results. Estimating the population maximum based on a... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
, production of German tanks such as the Panther was accurately estimated by Allied intelligence using statistical methods.]] In the statistical theory of estimation, the German tank problem consists of estimating the maximum of a discrete uniform distribution 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 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 to estimate the monthly rate of German tank production from very limited data. The statistical method exploited the manufacturing practice of assigning and attaching ascending serial-number sequences to tank components (chassis, gearbox, engine, wheels), with some of the tanks eventually captured in battle by Allied forces. This contrasted with conventional intelligence, which often overestimated Nazi output; this statistical approach yielded a highly accurate estimate. [[File:German tank problem graphs.svg|thumb|Estimated population size (N). The number of observations in the sample is k. The largest sample serial number is m. Frequentist analysis is shown with dotted lines. Bayesian analysis has solid lines with mean and shading to show range from minimum possible value to mean plus 1 standard deviation). The example shows if four tanks are observed and the highest serial number is "60", frequentist analysis predicts 74, whereas Bayesian analysis predicts a mean of 88.5 and standard deviation of 138.72 − 88.5 = 50.22, and a minimum of 60 tanks. In the SVG file, hover over a graph to highlight it.]] 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. A frequentist approach (using the minimum-variance unbiased estimator) predicts the total number of tanks produced will be: N \approx 74 A Bayesian approach (using a uniform prior over the integers in [4,\Omega] for any suitably large \Omega ) predicts that the median number of tanks produced will be very similar to the frequentist prediction: N_{med} \approx 73.9 whereas the Bayesian mean predicts that the number of tanks produced would be: N_{av} \approx 89 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: N \approx m + \frac{m}{k} - 1=74 The Bayesian median is calculated as: N_{med} \approx m + \frac{m \ln(2)}{k-1} =73.9 The Bayesian mean is calculated as: N_{av} \approx (m - 1)\frac{k - 1}{k - 2} = 89 These Bayesian quantities are derived from the Bayesian posterior distribution: \Pr(N=n) = \begin{cases} 0 &\text{if } n This probability mass function has a positive skewness, 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, the posterior may be approximated by an exponentially decaying function of n, \Pr(N=n) \approx \begin{cases} 0 &\text{if } n which results in the following approximation for the median: N_{med} \approx m + \frac{m \ln(2)}{k-1} and the following approximations for the mean and standard deviation: \begin{align} N &\approx \mu \pm \sigma = 89 \pm 50, \\[5pt] \mu &= (m - 1)\frac{k - 1}{k - 2}, \\[5pt] \sigma &= \sqrt{\frac{(k-1)(m-1)(m-k+1)}{(k-3)(k-2)^2}}. \end{align} \widehat{N} = m(1 + k^{-1}) - 1, 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 \operatorname{var}\left(\widehat{N}\right) = \frac{1}{k}\frac{(N-k)(N+1)}{(k+2)} \approx \frac{N^2}{k^2} \text{ for small samples } k \ll N, 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, 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 \widehat{N} = m + \frac{m - k}{k}= m + mk^{-1} - 1 = m(1 + k^{-1}) - 1. 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 (m - k)/k , the -k 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. 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. 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 [1.005m, 2.08m]. 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.82m]. More generally, the (downward biased) 95% confidence interval is [m, m/0.05 1/k ] = [m, m·20 1/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 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. The Bayesian approach to the German tank problem is to consider the posterior probability (N=n\mid M=m, K=k) that the number of enemy tanks N is n , when the number of observed tanks K is k , and the maximum observed serial number M is m . Note that this does not discard the relevant information contained in the samples, as we will see that the likelihood function can be constructed using only the number of samples and the max observed value. The answer to this problem depends on the choice of prior for N . One can proceed using a proper prior over the positive integers, e.g., the Poisson or Negative Binomial distribution, where a closed formula for the posterior mean and posterior variance can be obtained. Below, we will instead adopt a bounded uniform prior. For brevity, in what follows, (N=n\mid M=m,K=k) is written (n\mid m,k) . (n\mid m,k)(m\mid k) = (m\mid n,k)(n\mid k)= (m,n\mid k) (m \mid n,k)=(M=m \mid N=n,K=k) is the conditional probability that the maximum serial number observed, M , is equal to m , when the number of enemy tanks, N , is known to be equal to n , and the number of enemy tanks observed, K , is known to be equal to k . It is (m\mid n,k) = \binom{m - 1}{k - 1}\binom{n}{k}^{-1}[k\le m][m\le n] where \binom n k is a binomial coefficient and [k\le n] is an Iverson bracket. The expression can be derived as follows: (m\mid n,k) answers the question: "What is the probability of a specific serial number m being the highest number observed in a sample of k tanks, given there are n tanks in total?" One can think of the sample of size k to be the result of k individual draws without replacement. Assume m is observed on draw number d . The probability of this occurring is: \underbrace{ \frac{m-1}{n}\cdot \frac{m-2}{n-1}\cdot \frac{m-3}{n-2}\cdots \frac{m-d+1}{n-d+2}}_{d-1 \text{ times}} \cdot \underbrace{\frac{1}{n-d+1}}_{\text{draw no. }d} \cdot \underbrace{\frac{m-d}{n-d}\cdot \frac{m-d-1}{n-d-1}\cdots \frac{m-d-(k-d-1)}{n-d-(k-d-1)}}_{k-d\text{ times}} = \frac{(n-k)!}{n!} \cdot \frac{(m-1)!}{(m-k)!}. As can be seen from the right-hand side, this expression is independent of d and therefore the same for each d\leq k . As m can be drawn on k different draws, the probability of any specific m being the largest one observed is k times the above probability: (m\mid n,k) = k\cdot \frac{(n-k)!}{n!}\cdot \frac{(m-1)!}{(m-k)!} = \binom{m - 1}{k - 1}\binom{n}{k}^{-1}. Seen differently, after k draws without replacement, one draw was for object m , and the other k-1 were for objects in the range 1 to m-1 ; there are \binom{m-1}{k-1} ways to achieve this. And there are \binom{n}{k} ways to draw without replacement k objects from a collection of n objects. The expression (m\mid k)=(M=m\mid K=k) is the probability that the maximum serial number is equal to m once k tanks have been observed but before the serial numbers have actually been observed. The expression (m\mid k) can be re-written in terms of the other quantities by marginalizing over all possible n . \begin{align} (m\mid k) &=\sum_{n=0}^\infty(m,n\mid k) \\ &=\sum_{n=0}^\infty(m\mid n,k)(n\mid k) \end{align} (n\mid k)=(N=n\mid K=k) is the credibility that the total number of tanks, N , is equal to n when the number K tanks observed is known to be k , but before the serial numbers have been observed. Assume that it is some discrete uniform distribution (n\mid k) = (\Omega - k)^{-1}[k \le n][n The upper limit \Omega must be finite, because the function f(n) =\lim_{\Omega\rarr\infty}(\Omega - k)^{-1}[k \le n][n is not a mass distribution function. Our result below will not depend on \Omega . (n\mid m,k) = (m\mid n,k)\left(\sum_{n=m}^{\Omega - 1} (m\mid n,k)\right)^{-1}[m \le n][n As \Omega \rightarrow \infty , the summation approaches \sum_{n=m}^\infty(m\mid n,k) (which is finite if k ≥ 2). Thus, for suitably large \Omega , we have (n\mid m,k) \approx (m\mid n,k)\left(\sum_{n=m}^{\infty} (m\mid n,k)\right)^{-1}[m \le n ] For k ≥ 1 the mode of the distribution of the number of enemy tanks is m. For k ≥ 2, the credibility that the number of enemy tanks is equal to n , is (N=n\mid m,k) = (k - 1)\binom{m - 1}{k - 1}k^{-1}\binom n k^{-1}[m \le n ] The credibility that the number of enemy tanks, N, is greater than n, is (N>n\mid m,k)= \begin{cases} 1 &\text{if } n \sum_{n=m}^\infty \frac 1 {\binom n k} = \frac k{k - 1}\frac 1 {\binom{m - 1}{k - 1}} This sum formula is somewhat analogous to the integral formula \int_{n=m}^\infty \frac {dn}{n^k} = \frac 1{k - 1}\frac 1{m^{k - 1}} These formulas apply for k > 1. (M=m\mid N=n,K=1) = (m\mid n) = \frac{[m \le n]}{n} This is the conditional probability mass distribution function of m . When considered a function of n for fixed m this is a likelihood function. \mathcal{L}(n) = \frac{[n\ge m]}{n} The maximum likelihood estimate for the total number of tanks is N 0 = m, clearly a biased estimate since the true number can be more than this, potentially many more, but cannot be fewer. The marginal likelihood (i.e. marginalized over all models) is infinite, being a tail of the harmonic series. \sum_n \mathcal{L}(n) = \sum_{n=m}^\infty \frac{1}{n} = \infty but \begin{align} \sum_n \mathcal{L}(n)[n where H_n is the harmonic number. The credibility mass distribution function depends on the prior limit \Omega : \begin{align} &(N=n\mid M=m,K=1) \\[5pt] \sum_n n\cdot(n\mid m) &= \sum_{n=m}^{\Omega - 1} \frac{1}{H_{\Omega - 1} - H_{m - 1}} \\[5pt] &= \frac{\Omega - m}{H_{\Omega - 1} - H_{m - 1}} \\[5pt] &\approx \frac{\Omega - m}{\log\left(\frac{\Omega - 1}{m - 1} \right)} \end{align} (M=m\mid N=n,K=2) = (m\mid n) = [m \le n]\frac{m - 1}{\binom{n}{2}} When considered a function of n for fixed m this is a likelihood function \mathcal{L}(n) = [n \ge m]\frac{m - 1}{\binom{n}{2}} The total likelihood is \begin{align} \sum_{n}\mathcal{L}(n) &= \frac{m - 1}{1} \sum_{n=m}^\infty \frac{1}{\binom n 2} \\[4pt] &= \frac{m - 1}{1} \cdot \frac{2}{2 - 1} \cdot \frac{1}{\binom {m - 1}{2 - 1}} \\[4pt] &= 2 \end{align} and the credibility mass distribution function is \begin{align} &(N=n\mid M=m,K=2) \\[4pt] \frac{m - 1}{\tilde N - 1} = \frac{1}{2} and so the median is \tilde{N} = 2m - 1 but the mean value of N is infinite \mu = \sum_n n \cdot (n\mid m) = \frac{m - 1}1\sum_{n=m}^\infty \frac{1}{n - 1} = \infty &(M=m\mid N=n,K=k\ge 2) \\ \mathcal{L}(n) = [n \ge m]\frac{\binom{m - 1}{k - 1}}{\binom{n}{k}} The total likelihood is finite for k ≥ 2: \begin{align} \sum_n \mathcal{L}(n) &= \frac{\binom{m - 1}{k - 1}}{1} \sum_{n=m}^\infty {1 \over \binom n k} \\ &= \frac{\binom{m - 1}{k - 1}}{1} \cdot \frac{k}{k-1} \cdot \frac{1}{\binom{m - 1}{k - 1}} \\ &= \frac k{k - 1} \end{align} The credibility mass distribution function is \begin{align} &(N=n\mid M=m,K=k \ge 2) = (n\mid m,k) \\ &(N>x\mid M=m,K=k) \\[4pt] = {} &\begin{cases} 1 &\text{if }x x\mid M=m,K=k) \\[4pt] = {} &[x \ge m]\left(1 - \frac{\binom{m - 1}{k - 1}}{\binom{x}{k - 1}}\right) \end{align} \mu &= \sum_n n\cdot(N=n\mid M=m,K=k) \\[4pt] & = \sum_n n [n\ge m]\frac {m-1}n \frac {\binom{m-2}{k-2}}{\binom{n-1}{k-1}} \\[4pt] & = \frac{m-1}1 \frac{\binom{m-2}{k-2}}1\sum_{n=m}^\infty \frac 1{\binom{n-1}{k-1}}\\[4pt] & = \frac{m-1}1 \frac{\binom{m-2}{k-2}}1 \cdot \frac{k-1}{k-2}\frac {1}{\binom{m-2}{k-2}}\\[4pt] & = \frac{m-1}1 \frac{k-1}{k-2} \end{align} \sigma^2 + \mu^2 = \sum_n n^2 \cdot (N=n\mid M=m,K=k) So \begin{align} \sigma^2+\mu^2-\mu & = \sum_n n(n-1)\cdot(N=n\mid M=m,K=k)\\[4pt] & = \sum_{n=m}^\infty n(n-1)\frac{m-1}n \frac{m-2}{n-1} \frac{k-1}{k-2} \frac{\binom{m-3}{k-3}}{\binom{n-2}{k-2}}\\[4pt] & = \frac{m-1}1 \frac{m-2}1 \frac{k-1}{k-2} \cdot \frac{\binom{m-3}{k-3}}1 \sum_{n=m}^\infty \frac 1{\binom{n-2}{k-2}}\\[4pt] & = \frac{m-1}1 \frac{m-2}1 \frac{k-1}{k-2} \frac{\binom{m-3}{k-3}}1 \frac{k-2}{k-3} \frac 1{\binom{m-3}{k-3}}\\[4pt] & = \frac{m-1}1 \frac{m-2}1 \frac{k-1}{k-3} \end{align} and \begin{align} \sigma &= \sqrt{\frac{m-1}1 \frac{m-2}1 \frac{k-1}{k-3}+\mu-\mu^2} \\[4pt] &= \sqrt{\frac{(k-1)(m-1)(m-k+1)}{(k-3)(k-2)^2}} \end{align} The variance-to-mean ratio is simply \frac{\sigma^2}\mu = \frac{m - k + 1}{(k - 3)(k - 2)}
Cite this
"German tank problem". 1782652172. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1361536397 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy