‽ Paradox Lab

Home › Probability › Penney's game: the coin-flip bet you can't win

Penney's game: the coin-flip bet you can't win

Choose any three coin flips. Whatever you pick, there's a sequence that beats it.

The puzzle

Two players each choose a sequence of three coin flips, such as heads-heads-tails. A fair coin is flipped over and over, and whoever's sequence turns up first wins.

Every three-flip sequence is equally likely to appear in any three particular flips, so this sounds like a fair game. But the second player can always pick a sequence that beats the first player's, with odds of at least 2 to 1. It's like rock-paper-scissors: there is no best choice.

🪙 Play the computer

Tap the coins to choose your sequence, then start. The computer chooses second.

🏁 Race any two sequences

The thin dark mark on each bar is the exact answer from Conway's formula (below).

The winning reply

Whatever the first player picks, the second player should take the opposite of the first player's middle flip, then add the first player's first two flips. Against HHT, that's T + HH = THH.

If they pickYou pickYour chance of winning
HHHTHH7 in 8 (87.5%)
HHTTHH3 in 4 (75%)
HTHHHT2 in 3 (66.7%)
HTTHHT2 in 3 (66.7%)
THHTTH2 in 3 (66.7%)
THTTTH2 in 3 (66.7%)
TTHHTT3 in 4 (75%)
TTTHTT7 in 8 (87.5%)

Why it works: overlap

Take HHH against THH. The only way HHH can win is if the very first three flips are HHH, a 1-in-8 chance. If a tail appears anywhere before HHH is complete, then the first time two heads in a row follow it, THH has already happened. THH is always "one step ahead", sitting in wait just before HHH can finish.

The reply sequence is built to end with the start of the opponent's sequence, so it tends to appear on the way to their sequence.

Fair coin, unequal waiting times

A related surprise: on its own, HTH takes 10 flips on average to appear, while HHT takes only 8, and HHH takes 14. When HTH fails at the last step (HTT), you have to start again from scratch. When HHT "fails" (HHH), you're still sitting on two heads, ready to go. The race simulator shows these averages too.

Conway's formula

Mathematician John Conway found a neat way to get the exact odds. For two sequences A and B, write down a number for how much A overlaps itself, B overlaps itself, and each overlaps the other (a binary "correlation"). The odds that B beats A are (AA − AB) : (BB − BA). The simulator uses exactly this to draw its "theory" marks. The game itself was described by Walter Penney in 1969.

Try it on your friends

Let a friend choose first, then use the reply rule above. You don't need to say anything about odds: just play ten rounds with a real coin. You should win around seven of them.

Questions

Is Penney's game fair?

No. The coin is fair, but the second player can always choose a sequence with at least a 2-in-3 chance of appearing first, so the game strongly favours whoever chooses second.

What is the best sequence in Penney's game?

There isn't one. Every sequence is beaten by another, so the relationship goes round in a circle like rock-paper-scissors. Mathematicians call this non-transitive.

Why does HTH take longer to appear than HHT?

When you almost get HTH but flip HTT, you lose all your progress. When you almost get HHT but flip HHH, you still have the two heads you need. On average HTH takes 10 flips and HHT takes 8.

Try another paradox

Birthday paradox

Just 23 people gives better than even odds. Fill random rooms and check.

Probability

Monty Hall problem

Switching wins 2 times in 3. Play it, then run 10,000 games.

Probability