How the game works
Two players each choose a sequence of coin outcomes, such as HHT (heads, heads, tails) or THH. A fair coin is then flipped repeatedly, and the record of results is scanned. Whoever’s sequence appears first in the record wins.
The game is usually named after Walter Penney, who described it in a recreational mathematics journal in 1969. The usual version uses sequences of three flips, and the surprising part is that the second player to choose can always pick a sequence that is more likely to win than the first player’s, whatever the first player chose. Going second is an advantage, which feels backwards for a game with a fair coin and no skill in the flipping.
Why it feels fair
Any specific three-flip sequence is equally likely at any given position: each has probability 1/8. It is natural to conclude that no sequence can be better than another. But the game is not about a single position. It is about which pattern arrives first, and that depends on how patterns overlap with each other and with the flips just before them.
A related fact adds to the confusion. The average wait for different sequences differs. HHH takes an average of about 14 flips to appear, HTH about 10, and HHT or HTT about 8. Yet the sequence with the shorter average wait does not always win the race, as the next section shows.
One matchup checked by hand
Suppose the first player picks HHT and the second player picks THH. The first player wins only if the very first two flips are HH. Here is why.
- If the record starts HH, the next flip is either H (giving HHH, still waiting) or T (giving HHT). As long as heads keep coming, the record is a run of heads, and THH cannot yet appear because it needs a tail before the two heads. The first tail ends the run, and HHT appears. The first player wins.
- If the record does not start with HH, then it starts with T, or with HT. The first time two heads in a row appear later on, the flip just before them must be a tail, since otherwise the pair would have been preceded by a head and appeared earlier. That tail plus HH is the sequence THH, and it appears before any HHT can be completed.
The first two flips are HH with probability 1/2 × 1/2 = 1/4. So the first player wins with probability 1/4 and the second player wins with probability 3/4. The second player is the clear favourite.
The rule for the second player
For three-flip sequences, the second player can use a simple rule. Take the first player’s sequence, flip the opposite of its middle flip, and put that in front of the first two flips of the first player’s choice.
- Against HHT, the first two flips are HH and the middle is H, so the opposite is T: choose THH.
- Against HTT, the first two flips are HT and the middle is T, so the opposite is H: choose HHT.
- Against TTH: the first two are TT, the middle is T, so choose HTT.
- Against THH: the first two are TH, the middle is H, so choose TTH.
The idea behind the rule is that the second player’s sequence is arranged so that its beginning matches the end of the first player’s sequence. Whenever the first player is partway to completing their pattern, the second player is often already ahead of them in completing a pattern of their own.
For three-flip sequences, the second player’s advantage under this rule ranges from about 2 to 1 up to 7 to 1 in favour, depending on what the first player chose. The strongest case is a first choice of all heads or all tails, where the reply wins 7 times in 8. These figures are the standard results for this game; the single case above shows the style of reasoning.
A cycle, not a ranking
Follow the replies above: THH beats HHT, TTH beats THH, HTT beats TTH, and HHT beats HTT. The sequences form a loop, so no sequence is best. This is the same structure as non-transitive dice, where each option beats one rival and loses to another. In both cases a single number, such as an average waiting time, cannot rank the options, because the winner depends on the pairing.
The coin itself is perfectly fair, and each flip is independent of the one before. The advantage comes from the second player’s ability to respond to the first player’s choice. It is a reminder of how much of a game’s outcome can depend on the order of choosing and on information, even when chance is evenly balanced.
What this does and does not show
Penneys game is a clean example of how counting what happens in one position can mislead about a race to a pattern. It is not a method for gaining an edge in gambling. The advantage exists only because the second player gets to see an opponent’s choice, and even then a single game is uncertain: a 3/4 favourite loses one game in four.
Real casino games do not hand out such choices, and each round of a game of chance is independent of earlier rounds. The idea that a pattern is “due” after a run of results is the gambler’s fallacy. If you want to see the result for yourself, a quick Monte Carlo simulation that flips a virtual coin until one of the two chosen patterns appears, repeated many thousands of times, will settle near the figures above, though short runs will wander.