Back

Unbiasing a Biased Coin

Medium
Created: March 5, 2026

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 ppp be the probability of the coin landing heads, and 1−p1 - p1−p the probability of tails. When we flip the coin twice, there are four possible outcomes:

HH\text{HH}HHp×p=p2p \times p = p^2p×p=p2
HT\text{HT}HTp×(1−p)p \times (1-p)p×(1−p)
TH\text{TH}TH(1−p)×p(1-p) \times p(1−p)×p
TT\text{TT}TT(1−p)×(1−p)=(1−p)2(1-p) \times (1-p) = (1-p)^2(1−p)×(1−p)=(1−p)2

Notice that P(HT)=p(1−p)P(\text{HT}) = p(1-p)P(HT)=p(1−p) and P(TH)=(1−p)pP(\text{TH}) = (1-p)pP(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\text{HH}HH or TT\text{TT}TT, we simply discard that round and flip again. Since HT\text{HT}HT and TH\text{TH}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<10 < p < 10<p<1 (that is, neither heads nor tails is impossible).

Try These Next