Probability & Statistics

Unfair Coin

One coin in 1000 is double-headed and the rest are fair. Ten straight heads multiplies the odds by 2^10 = 1024, almost exactly cancelling the 999-to-1 prior, so the posterior probability of holding the fake is barely better than an even coin toss.

solvedmedium1 min

Among 1000 coins, one has heads on both sides and the other 999 are fair. You pick a coin at random and toss it ten times. It comes up heads every time. What is the probability you picked the two-headed coin?

Reveal solutionHide solution

#Bayes

Let UU be the event that I hold the two-headed coin, with prior P(U)=11000\PP(U) = \tfrac{1}{1000}. Ten heads is certain for that coin and has chance (12)10=11024\left(\tfrac{1}{2}\right)^{10} = \tfrac{1}{1024} for a fair one. Bayes gives

P(U10H)=P(10HU)P(U)P(10HU)P(U)+P(10Hfair)P(fair)=111000111000+110249991000.(1)\PP(U \mid 10H) = \frac{\PP(10H \mid U)\,\PP(U)} {\PP(10H \mid U)\,\PP(U) + \PP(10H \mid \text{fair})\,\PP(\text{fair})} = \frac{1 \cdot \tfrac{1}{1000}} {1 \cdot \tfrac{1}{1000} + \tfrac{1}{1024}\cdot\tfrac{999}{1000}}. \tag{1}

Clearing the common factor 11000\tfrac{1}{1000},

P(U10H)=10241024+999=102420230.506.(2)\PP(U \mid 10H) = \frac{1024}{1024 + 999} = \frac{1024}{2023} \approx 0.506. \tag{2}
After 10 heads in a row the chance the coin is the two-headed one is 50.6 percent. The curve crosses one half near ten heads, because ten heads is about 1024 times likelier for the two-headed coin, just edging past the 999 fair ones.

#Reading the number

Ten heads is about 10241024 times more likely from the two-headed coin than from a fair one, and that almost exactly cancels the 999999-to-11 prior against it. The evidence drags a one-in-a-thousand suspicion up to a coin toss. One more head would push it past two to one, and each further head nearly doubles the odds toward certainty.