Unbiasing a Biased Coin
You and a friend need to settle a dispute with a coin toss, but the only coin available is one you’re certain is biased — it lands heads more often than tails. You don’t know the exact bias, only that it’s not a fair 50/50 coin.
How can you use this biased coin to produce a fair result, where both of you have an equal chance of winning?
Solution
Flip the coin twice. If it lands heads-tails, you win. If tails-heads, your friend wins. If both flips match, discard the result and flip again.
Let p be the probability of the coin landing heads, and 1−p the probability of tails. When we flip the coin twice, there are four possible outcomes:
| HH | p×p=p2 |
| HT | p×(1−p) |
| TH | (1−p)×p |
| TT | (1−p)×(1−p)=(1−p)2 |
Notice that P(HT)=p(1−p) and P(TH)=(1−p)p. These are identical — heads-then-tails and tails-then-heads are equally likely no matter what the bias is. So we assign one outcome to each player and ignore the rest.
If we get HH or TT, we simply discard that round and flip again. Since HT and TH are equally likely whenever they do occur, each player has exactly a 50% chance of winning.
This works for any bias, so long as 0<p<1 (that is, neither heads nor tails is impossible).
Try These Next
Egg Dropping
For a school project, you’ve devised an egg-protection device — a little contraption that wraps around an egg and is supposed to keep it from breaking when...
The Keyboard Prank
Anne comes into the office to find that her co-workers had played a prank on her. The keycaps on her keyboard had been shuffled such that if she types out a...
Taking Pills
After falling ill, Josh sees a doctor and is prescribed some medication. He is to take 1 pill of Xenoril and 1 pill of Yvexol every 24 hours. The two pills...