skip to content

Two coins, one fair and one double-headed: you draw one blind and flip three heads, so what is the chance you hold the biased one?

level: juniorimportance: nice to knowfreq 30%

answer

  1. two hypotheses, one blind draw
  2. the biased coin never shows tails
  3. three heads: probability 1 versus 1/8
  4. likelihood ratio of 8, prior odds 1:1
  5. convert odds of 8:1 to a probability

basics

~20 s

8/9, about 89%. Each coin started equally likely. Three heads has probability 1 under the double-headed coin and 1/8 under the fair one, so the posterior is 1 divided by 1 plus 1/8, which is 8/9.

solid answer

~50 s

Apply Bayes' rule with the two coins as the hypotheses. The prior is 1/2 each because you drew blind. The likelihood of three heads is 1 under the double-headed coin and (1/2)^3 = 1/8 under the fair coin. So P(double | HHH) = (1/2 x 1) / (1/2 x 1 + 1/2 x 1/8) = (1/2)/(9/16) = 8/9, about 89%. The odds form is faster: prior odds 1:1, likelihood ratio 1 / (1/8) = 8, posterior odds 8:1, probability 8/9. Two things are worth saying out loud. First, the evidence is only eight-to-one, so it never reaches certainty no matter how confident three heads feels. Second, the answer is driven jointly by the likelihood ratio and the prior: if the box held one double-headed coin among a thousand fair ones, the same three heads would leave you at 8:999, well under 1%.

go deeper

for a junior

Be able to name the two hypotheses, write the two likelihoods, and get 8/9 without panicking about the formula. Interviewers use this as a quick check that you can condition correctly.

for a middle

Do it in odds form in a single line, then generalise: state the 1/(1 + 2^-n) pattern and explain why the posterior approaches but never reaches one.

for a senior

Draw the connection to real inference: the likelihood ratio is the evidence, the prior is the population, and a strong-looking signal against a rare hypothesis can still leave you far from confident.

for a principal

Use it to argue about how priors get chosen and reviewed on real work, including why a hard zero in a prior is an irreversible modelling commitment rather than a convenient simplification.

## Setting up the hypotheses Two hypotheses, mutually exclusive and exhaustive given the setup: - `D`: you are holding the double-headed coin. - `F`: you are holding the fair coin. The **prior** is `P(D) = P(F) = 1/2`, because the draw was blind and there is one of each. The **evidence** is `E = HHH`, three heads in a row. The **likelihoods** are the probability of that evidence under each hypothesis: ``` P(HHH | D) = 1 x 1 x 1 = 1 P(HHH | F) = (1/2)^3 = 1/8 ``` ## The calculation, two ways Bayes' theorem directly: ``` P(D | HHH) = P(HHH|D) P(D) / [ P(HHH|D) P(D) + P(HHH|F) P(F) ] = (1 x 1/2) / (1 x 1/2 + 1/8 x 1/2) = (1/2) / (9/16) = 8/9 ~ 88.9% ``` Or in odds, which is quicker and less error-prone: prior odds `1:1`, likelihood ratio `1 / (1/8) = 8`, posterior odds `8:1`, and odds of 8:1 are a probability of `8/(8+1) = 8/9`. A general form is worth carrying: after `n` heads with equal priors, ``` P(D | n heads) = 2^n / (2^n + 1) = 1 / (1 + 2^-n) ``` One head gives 2/3, two give 4/5, three give 8/9, seven give 128/129 which is about 99.2%. The evidence accumulates fast but asymptotically -- you can never reach 1 by flipping heads, because heads are never impossible for a fair coin. ## The asymmetry of a single tail A single tail ends the inference instantly: `P(tail | D) = 0`, so the posterior for `D` collapses to exactly 0 and stays there forever. No amount of subsequent heads can revive it, because the update is multiplicative and it has been multiplied by zero. This is the practical statement of a general rule: a hypothesis assigned zero likelihood by any observation is dead, and by the same token a hypothesis given **prior** probability zero can never be resurrected by evidence. It is the reason you avoid putting hard zeros in a prior for anything you are not certain is impossible. ## Changing the prior The likelihood ratio measures the strength of the evidence and is a property of the flips alone: three heads is eight times more likely from a two-headed coin than from a fair one, whatever box you drew from. The prior is a property of the box. Change the box and the conclusion changes even though the evidence did not: - One double-headed coin among 1,000 coins: prior odds `1:999`, posterior odds `8:999`, about **0.8%**. Three heads is nowhere near enough to overcome a rare-coin base rate. You would need about ten heads (`LR = 1024`) just to reach even odds. - Both coins double-headed except one fair among 10: prior odds `9:1`, posterior odds `72:1`, about 98.6%. That is the base-rate lesson in miniature, and it is why the puzzle is asked: candidates who reason only from 'three heads is very unlikely for a fair coin' produce a confident number without ever consulting the prior, which is the same mistake as reading a rare-disease screening result off the test's accuracy. ## Common errors - **Answering 7/8.** That is `1 - P(HHH | F)`, the probability that a fair coin would *not* have produced three heads. It is a statement about the fair coin's behaviour, not about which coin you hold, and it ignores the prior entirely. - **Answering 1/2**, on the grounds that the draw was 50-50. That treats the flips as uninformative when they carry a likelihood ratio of 8. - **Answering 1**, treating three heads as proof. Three heads is perfectly possible for a fair coin -- it happens one time in eight. - **Forgetting to weight the likelihoods by the prior** when the priors are unequal. With a 1:1 prior the weights cancel and the shortcut works; with any other box it does not. ## How to answer in the room State the two hypotheses and their priors, write down both likelihoods, produce 8/9 by the odds route in one line, then volunteer the two extensions that show understanding rather than memorisation: what a single tail does, and what happens when the box is not 50-50. Those two remarks are what separate a recited answer from a reasoned one.

  • How many heads in a row would you need to be 99% sure you hold the double-headed coin?
    Seven. With equal priors the posterior after n heads is 1/(1 + 2^-n), so six heads give 64/65 = 98.5% and seven give 128/129 = 99.2%. Notice you can never reach 100%: heads are unremarkable for a fair coin, so the fair-coin hypothesis is only ever squeezed, never eliminated, by more heads.
  • What happens to the posterior the moment you see a single tail?
    It drops to exactly zero and never recovers. The double-headed coin assigns probability 0 to a tail, so its posterior is multiplied by zero and no later evidence can revive it. The same logic explains why you should not assign a prior of exactly zero to a hypothesis you merely think unlikely -- Bayes' rule can never bring it back.
  • How does the answer change if the box holds one double-headed coin and 999 fair ones?
    It falls to about 0.8%. The likelihood ratio is still 8 because the flips have not changed, but the prior odds are now 1:999, giving posterior odds of 8:999. Three heads is simply not strong enough evidence against a base rate that lopsided; you would need roughly ten heads to reach even odds.

saying these in an interview costs you the question

  • Answers 7/8, the chance a fair coin avoids three heads
  • Says 1/2 because the draw itself was even
  • Treats three heads as proof of the biased coin
  • Ignores the prior when the box is not evenly stocked
  • Confuses P(three heads | fair) with P(fair | three heads)

context