Find the expected value for the number of flips you'll need to make in order to see the pattern TXT, where T is tails, and X is either heads or tails.
I tried conditioning on the coin flips (e.g. TXT, TXH, H) but I got an incorrect answer of 8. Any suggestions?
I suspect you had
TTHhappening with probability $\frac{1}{8}$ and giving $E+3$ flips, where $E$ is the expected value of the required number of flips. This is wrong, because we don't have to restart when we getTTH.TTHleads toTTHTandTTHHwith equal probability.TTHTgives length $4$;TTHHgives length $E+4$.In summary: \begin{align} H: &\frac{1}{2} & (E+1) \\ THT: &\frac{1}{8} & 3 \\ THH: &\frac{1}{8} & (E+3) \\ TTT: &\frac{1}{8} & 3 \\ TTHT: &\frac{1}{16} & 4 \\ TTHH: &\frac{1}{16} & (E+4) \end{align}
Summing them all up and equating to $E$, and solving for $E$ gives $E = \frac{34}{5}$.