Numerical answer
A coin with is tossed repeatedly until the pattern head, tail, head (HTH) appears for the first time as three consecutive tosses. Find the expected number of tosses. Give the answer correct to two decimal places.
Show answer and solution
Answer: 8.61
Set up a Markov chain with states by progress: (no useful suffix), (last toss H), (last two tosses HT). With and : , , and because a head completes HTH while a tail returns to the start. From the first, . From the third, . Putting into the second: , so . Combine: , giving , which simplifies to , i.e. . The same result follows from the autocorrelation formula: the pattern HTH overlaps itself at lengths 1 and 3, so the expected time is the sum of the reciprocals of the probabilities of those prefixes, namely , which equals after rounding.
Saved on this device. Sign in or create a free account to keep it on every device.