I'm still learning undergraduate probability. I was asked this probability puzzle in a recent quantitative developer interview. I solved the first part of the question, using brute-force. I think, brute-force very quickly becomes unwieldy for the sequence ending $THH$ - not sure if my answer is correct.
A coin is flipped infinitely until you or I win. If at any point, the last three tosses in the sequence are $HHT$, I win. If at any point, the last three tosses in the sequence are $THH$, you win. Which sequence is more likely?
Solution.
$\begin{aligned} P(xHHT)&=P(H^2T)+P(H^3T)+P(H^4T)+\ldots \\ &=\frac{1}{2^3}+\frac{1}{2^4} + \frac{1}{2^5} + \ldots \\ &=\frac{1/8}{1-1/2}\\ &=\frac{1}{4} \end{aligned}$
For the second part, $P(xTHH)$, I have drawn a state-diagram, but there are just too many possible combinations for a sequence ending in $THH$. Is there an easier, or perhaps an intuitive way to look at this? Any hints in the right direction would be great!