Probability & Statistics

The Two-Headed Penny

A jar of 999 fair pennies hides one two-headed coin. You draw one, flip ten heads in a row, and wonder which coin you are holding. How sure can you be?

solvedmedium1 min

A jar holds 999999 fair pennies and one two-headed penny. You pick one coin at random, flip it 1010 times, and get all heads. What is the probability that the coin is the two-headed one?

Reveal solutionHide solution

#Bayes setup

Before flipping, the coin is two-headed with probability 11000\tfrac{1}{1000} and fair with probability 9991000\tfrac{999}{1000}. Ten heads is certain for the two-headed coin and has probability (12)10=11024\left(\tfrac12\right)^{10} = \tfrac{1}{1024} for a fair one.

#Posterior

P(two-headed10H)=110001110001+999100011024.(1)\PP(\text{two-headed} \mid 10\text{H}) = \frac{\tfrac{1}{1000} \cdot 1}{\tfrac{1}{1000} \cdot 1 + \tfrac{999}{1000} \cdot \tfrac{1}{1024}}. \tag{1}

Multiplying through by 10001000 clears the prior,

=11+9991024=10241024+999=102420230.506.(2)= \frac{1}{1 + \tfrac{999}{1024}} = \frac{1024}{1024 + 999} = \frac{1024}{2023} \approx 0.506. \tag{2}
two-headedfair
Ten heads multiplies the rare trick coin's tiny prior up to a joint weight of 1024, against 999 for all the fair coins combined. The two are nearly equal, so seeing ten heads leaves the coin only just more likely to be two-headed.

#Result

The chance is 1024202350.6%\tfrac{1024}{2023} \approx 50.6\%, barely better than a coin flip. Ten heads is strong evidence, a likelihood ratio of 10241024 to 11, but the trick coin is so rare at 11 in 10001000 that the two effects nearly cancel.