Discrete Stochastic Processes

Lesson 6 of 10

HTH or HHT? Coin Patterns and Penney's Game

Two three-flip patterns with the same odds take different times to appear, and in a head-to-head race HHT beats HTH two times out of three.

Same odds, different waits

Flip a fair coin until you see HHT and count the flips. Then do it again waiting for HTH. Any three consecutive flips spell HHT with probability 1/81/8 and HTH with probability 1/81/8, so it is natural to guess the two waits are equal. The averages come out different:

E[THHT]=8,E[THTH]=10.E[T_{HHT}] = 8, \qquad E[T_{HTH}] = 10.

The difference is in what a near miss leaves behind. Chasing HHT, once you hold HH you cannot lose ground: another H keeps you at HH, and a T finishes the job. Chasing HTH, a miss on the last flip (HTT) throws you all the way back to the start.

Counting over a long run gives the same answer. Each position starts a copy of either pattern with probability 1/81/8, so both patterns turn up once every 8 flips on average, and the mean gap from one copy to the next is 8 for both. Right after an HHT you hold nothing useful, so the wait for the next HHT is the same as a fresh start, and the fresh wait is 8. Right after an HTH you already hold the final H, which can begin the next copy (HTHTH holds two copies sharing a middle H). The gap of 8 includes that head start. From a fresh start you first have to earn the H, which takes 2 flips on average, so the wait for HTH is 2+8=102 + 8 = 10.