"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" - Wikipedia
The problem is motivated by problems that real statisticians faced during World War 2; The Allies wanted to estimate the amount of tanks that the Germans were producing, and they used serial numbers on captured tanks to do this.
German Tank Problem Wikipedia page
Try it out below! You can input the total number of tanks (N) and the desired sample size (K). A random sample of K integers less than N will be generated and plotted. Can you think of a good formula that uses those numbers to estimate N?
The example above will sometimes lead to good results... but sometimes it doesn't! How can we improve the estimates?
Well, we know that the total number of tanks must be at least as big as the maximum number in the sample.
We can create many random samples using any numbers less than this max value in order to generate many more estimates. We can then use these aggregated estimates to create a better estimate of the true number of tanks
This problem provides a great opportunity for some user input! Below, you can write your own formula to estimate the maximum tank number!
My function here