Numerical answer
A coin shows heads with probability on each independent toss. It is tossed repeatedly until the pattern H, T, H (heads, tails, heads in consecutive tosses) appears for the first time. Find the expected number of tosses. Give the answer correct to two decimal places.
Show answer and solution
Answer: 8.25
Set up a Markov chain on the progress towards HTH: state (no progress), state (last toss H) and state (last two tosses HT). Let be the expected remaining tosses with , . Then , and (a head completes the pattern, a tail resets to state ). From the first, . Substituting in the second: so . With this gives , hence . This agrees with the formula .
Saved on this device. Sign in or create a free account to keep it on every device.