A Thousand Coins, Ten Heads in a Row, and 1024/2023
Draw one coin from a thousand, flip ten heads, and the chance it is the two-headed one is 0.5062. Both reflex answers miss, in opposite directions: ninety-nine percent ignores the bag, one in a thousand ignores the flips. Counting patterns gets the exact figure with no Bayes notation at all, and the reason it lands on a coin flip is that 2^10 happens to sit next to the size of the bag.
A bag holds coins. Nine hundred and ninety-nine of them are fair, and one has heads on both faces. You draw a coin at random, flip it ten times, and get heads every time. What is the probability you are holding the two-headed coin?
The exact answer is
which is almost exactly a coin flip, and that is a strange place for a question like this to land. Ten heads in a row feels like overwhelming evidence. One coin in a thousand feels like an unlikely draw. The two feelings cancel, and the reason they cancel is a numerical accident worth understanding, because it tells you how fragile the answer is.
Two reflex answers, wrong in opposite directions
The first reflex is that ten heads settles it. Nobody flips ten heads with a fair coin, so the coin is rigged, call it . The second reflex, usually from someone who has been warned about the first, is that the coin was drawn from a bag that is fair, so the answer is .
Both are wrong, and they are wrong on opposite sides of the truth:
The first reflex ignores the base rate. The second ignores the evidence and reports the prior back as though the flips had never happened. A question that catches both errors is more useful than one that catches either, because it forces you to combine two numbers rather than pick the more salient one.
Count the patterns
The cleanest route here avoids conditional probability notation entirely, and it is exact rather than approximate.
Ten flips of one coin produce patterns, and for a fair coin all are equally likely. Since the coin itself was drawn uniformly from coins, the pair (coin, pattern) ranges over
equally likely outcomes. Now count the ones that show ten heads. Every fair coin contributes exactly one, namely , so the fair coins contribute . The two-headed coin shows heads no matter what, so all of its patterns are ten heads. Total: .
Giving the two-headed coin all of its patterns is the step that deserves a second look, since it feels like double counting. It is not. The coin has ten flips and each flip has two possible recorded outcomes; it happens that the recorded outcome is heads either way. What the count is really doing is weighting each coin by its likelihood, on a scale where the fair coin's likelihood is one unit and the trick coin's is .
The same thing in the usual notation
For the version an interviewer may want written out, let be the event that the coin is two-headed and the event of ten heads.
The draw is uniform over the coins, the flips are independent, and the two-headed coin shows heads with probability exactly . The observation is "ten flips, all heads", with the number of flips fixed in advance.
Odds form is faster and it is the one to use under pressure. Prior odds on the trick coin are . The likelihood ratio is , which is . Multiply:
and converting odds to a probability gives (1) with no algebra at all. Notice that equation (6) is equation (4) with different punctuation. The pattern count, Bayes, and the odds ratio are one computation at three different scalings.
Why it lands on a coin flip
Redo the calculation with coins instead of a thousand, one of them two-headed:
This equals exactly when , that is at coins. The problem uses , which sits coins away, and that is the entire explanation for the tidy answer:
The near-tie is arithmetic, not insight. Somebody chose a bag size close to and a flip count of ten so the two would nearly cancel. Nothing deep is happening, and a version with coins and eleven flips would answer , while nine flips would answer .
Read from the other side: for a fixed bag of coins, the evidence overtakes the prior when passes , which happens at
Ten flips is the first whole number past that crossing, by less than four hundredths of a flip. The problem is engineered to be answered right at the tipping point, which is exactly where both reflexes look plausible and neither is defensible.
How many heads would actually settle it
Since the posterior is after heads, asking for confidence means solving , so and . Sixteen heads gives , seventeen gives .
The curve is a logistic in disguise, which is what any Bayesian update with a fixed likelihood ratio per observation looks like. Each additional head multiplies the odds by two, so the log-odds climb linearly and the probability traces an S. That also explains why ten is such an uncomfortable number of flips: it sits in the steep middle of the S, where a single extra observation moves the answer by percentage points.
The practical reading, and the one worth saying out loud: seven more flips settle a question that ten flips left open. If a real decision hung on this, the correct move is not to argue about , it is to keep flipping.
What the number quietly assumes
Two assumptions carry weight, and neither is visible in the statement of the problem.
The first is the stopping rule. Equation (5) treats the observation as "ten flips were made, all ten were heads". It is a different problem if the observation is "a run of ten heads appeared somewhere in a longer sequence of flips", because a long sequence of a fair coin will eventually produce such a run, and the likelihood is then much larger than . Ten heads noticed after the fact is far weaker evidence than ten heads planned in advance.
The second is that the two-headed coin shows heads with probability exactly one. Weaken it to and the numerator of (5) picks up a factor , so the likelihood ratio drops from to . A one percent chance of misreading each flip costs you about ten percent of the evidence, and drags back below even money.
One last thing worth being precise about, because the temptation to round is strong. The answer is , which is aboveone half. So the two-headed coin is the marginally likelier explanation, and any closing line along the lines of "so the coin is probably fair" is false. The honest statement is that after ten heads the two stories are indistinguishable, with the trick coin ahead by .
Sources and further reading
- The identity behind equation (5), and the odds form of (6) — Bayes' theorem
- The mistake both reflex answers make — Base rate fallacy
- Why Fig. 2 is an S-curve — Likelihood ratio and log-odds
- The stopping-rule caveat, and why the sampling protocol enters the likelihood — Likelihood principle
Every number above was checked three ways before publication: exact rational arithmetic, an exhaustive walk of all (coin, pattern) pairs, and a seeded simulation of four million ten-flip runs, which kept the all-heads runs and found of them used the trick coin, inside its own sampling error of .
Comments · 0
Be the first to comment.