Problem 1959. German tank problem
The German tank problem is a well-known statistical problem that attempts to estimate the maximum of a discrete distribution from a limited number of samples (you may know it from some of its far reaching implications...)
You do not know how many tanks are in circulation (let's call this number N), but you know that they have been assigned serial numbers sequentially starting at 1 (ranging from 1 to N). You manage to observe a random subset of k tanks, and find that, among the observed tanks, the maximum serial number is n. Your job is to predict N, the total number of tanks in circulation, from this observation alone (from the values of k and n).
Example:
You observe the serial number of 3 tanks, which are 36, 77, and 28. You know that there must be at least 77 tanks in circulation (although it seems unlikely that there were only 77). What is your best estimate of the total number of tanks in circulation?
Details:
Your function takes the values n and k and must return your best estimate of the value of N.
To pass this problem you must be exactly correct in at least 10% of the testsuite cases.
Test suite checks 10,000 cases, with N values ranging from 10 to 100, and k values ranging from 1 to 10.
Hints: (why my solution is not working? this formula is on wikipedia!!!)
In a typical scenario you may not really care about being "exactly correct" in at least 10% of all possible cases (i.e. with relatively high likelihood). This problem is intended to have you thinking about frequentist approaches, Bayesian, and maximum likelihood estimators
Solution Stats
Problem Comments
-
1 Comment
Jean-Marie Sainthillier
on 1 Mar 2014
I'll believe it when I see it.
St Thomas.
Solution Comments
Show commentsGroup

Probability & Stats
- 30 Problems
- 3 Finishers
- Don't be mean. Be nice!
- The Birthday Phenomenon
- Calculate the probability that at least two people in a group share the same birthday.
- The almost-birthday problem.
- Coin Tossing: Probability of Same Heads for N tosses
- Does the coin touch the line?
- Coin change combinations.
- Penny flipping - calculate winning probability (easy)
- German tank problem
- Unique dice configurations
- Throwing Dice - Will You Be Eaten By The Dragon?
- Probability of Choosing a Red Ball
- What are the odds?
- Simulating the selection of a state with given probabilities
- Generating random matrix with given probability mass function
- If you prick us, do we not bleed?
- Test Driven Solution - Probability Problem 1
- Test Driven Solution - Probability Problem 2
- Test Driven Solution - Probability Problem 3
- Probabilities - More brains than luck
- Compute Area from Fixed Sum Cumulative Probability
- Probability of red tulips (at both ends of a row)
- Cumulative probability of finding an unlikely combination
- Chess probability
- Guess the number I'm thinking of (Part 1)
- Eliminate Outliers Using Interquartile Range
- Histogram of histogram
- Given n, create n random numbers such that their standard deviation is also n.
- Mean = Standard Deviation
- Rate of event occurence: find percentiles of the distribution (for smallish rates)
Problem Recent Solvers31
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!