I’ve been thinking a bit about coin flips recently and reading some work that was done attempting to establish if coin flips are as unbiased as we think they are (more on that soon). Along the way, I learned about something neat called Penney’s game.

Penney’s game can be played with a single coin and it involves two players betting on which triplet of results (such as heads-tails-heads or heads-heads-tails) will appear first if the coin is continuously flipped and all results are recorded.E.g. Suppose player 1 chooses HHH (heads-heads-heads) and player 2 chooses TTT (tails-tails-tails) and the flip results are as follows:HHTHTTHTTTThen player 2 wins, as the triplet TTT has appeared first.Now, if both players conceal their choices, this game is fair. However, if player 2 is allowed to choose their triplet after player 1 has declared theirs, it turns out that player 2 can actually gain a significant advantage.Suppose player 1 chooses HHH again and tells player 2, who then chooses THH.

first three flip results are as follows:

HHT.. (if that last flip would have been heads, player 1 would have won)Now let’s continue (including the first three flips):HHT HTHH (there, since the last three flips were THH, player 2 has won. In fact, we can see that if the first three flips aren’t HHH, then player 1 can never win, as the second a tails pops up, two more H will make THH, making the HHH impossible to come before THH).In fact, the general rule for player 2 to always have the edge is to pick the opposite of the middle result from player 1, then the first and middle.

e.g. If player 1 chooses HTH, then player 2 should choose H (opposite of the middle from player 1) and then HT(the first two from player 1) making HHT in total.The take-home message here is that the game played this way is a bit like rock-paper-scissors, in that the game is “intransitive” (meaning that every choice by one player can be countered by the second player under optimal play).

So while you cannot win Penney’s game 100% of the time (different triplets give different edges), you can always gain a substantial advantage, and most people wouldn’t suspect that at first glance.