# Solution to Locomotive Problem (Mosteller, Fifty Challenging Problems in Probability)

My question concerns the solution Professor Mosteller gives for the Locomotive Problem in his book, Fifty Challenging Problems in Probability. The problem is as follows:

A railroad numbers its locomotives in order 1, 2, ..., N. One day you see a locomotive and its number is 60. Guess how many locomotives the company has.

Mosteller's solution uses the "symmetry principle". That is, if you select a point at random on a line, on average the point you select will be halfway between the two ends. Based on this, Mosteller argues that the best guess for the number of locomotives is 119 (locomotive #60, plus an equal number on either "side" of 60 gives 59 + 59 + 1 = 119.

While I feel a bit nervous about challenging the judgment of a mathematician of Mosteller's stature, his answer doesn't seem right to me. I've picked a locomotive at random and it happens to be number 60. Given this datum, what number of locomotives has the maximum likelihood?

It seems to me that the best answer (if you have to choose a single value) is that there are 60 locomotives. If there are 60 locomotives, then the probability of my selecting the 60th locomotive at random is 1/60. Every other total number of locomotives gives a lower probability for selecting #60. For example, if there are 70 locomotives, I have only a 1/70 probability of selecting #60 (and similarly, the probability is 1/n for any n >= 60). Thus, while it's not particularly likely that there are exactly 60 locomotives, this conclusion is more likely than any other.

Have I missed something, or is my analysis correct?

• Here's my first thoughts: You seem to be analyzing the question from the perspective of "If there are N locomotives, what is the chance of seeing Locomotive 60?", while the correct way to analyze it is "If I see Locomotive 60, what is the chance that there are N locomotives." Feb 20, 2012 at 19:25
• This is a specific subcase of the German tank problem. Feb 20, 2012 at 19:31
• In a sense, it depends a little bit on how you define "best", but in any event, there are generally better estimators than just choosing the number you've seen. Indeed, consider that your estimate is a fortiori less than or equal to the true number. In statistical parlance, your estimate is (negatively) biased. (Bias is not wholely a bad thing, but in this case, you can remove the bias and reduce the variance simultaneously.) Feb 20, 2012 at 19:33
• I tagged this as a recreational problem, but the German Tank Problem, of which this is a special case, couldn't be further from recreational! Thanks to the commenters and answerer for setting me straight on the bias issue. Feb 22, 2012 at 19:16

Choosing $2\times 60 - 1$ gives an unbiased estimate of $N$.
Choosing $60$ gives a maximum likelihood estimate of $N$.
• (+1) Indeed, it is not hard to show that $2 X - 1$ is the only unbiased estimator of $N$ (hence it is also, trivially, the unique uniformly minimum variance unbiased estimator). Feb 20, 2012 at 23:26