# Flipping a fair coin until either H or TTTT appears; what is the probability of getting at most two T's?

We flip a fair coin repeatedly and independently, resulting in a sequence of heads (H) and tails (T). We stop flipping the coin as soon as this sequence contains H or T T T T. What is the probability that this sequence contains at most two Ts?

• If I read the problem correctly, there are only three possible sequences with at most two Ts: H, TH, TTH. Or am I missing something? – Harald Hanche-Olsen Dec 7 '14 at 8:29
• @Harald: I don’t think so. And given the stopping conditions, there are only two other possible outcomes. – Brian M. Scott Dec 7 '14 at 8:30

So you can compute the probability of success as that of getting something else than TTT after three throws. (So that probability would be the same even if the rule for stopping at $4$ T's were replaced by stopping at say $97$ T's).
• Actually my answer say it suffices looking at three flips, so the denominator is $8$ rather than $16$. But yes, the answer you suggest has the correct value (and you can arrange the denominator to be $8$). – Marc van Leeuwen Dec 7 '14 at 10:52