Jane Street Interview Question

What is the probability that HHT happens before HTT?

Interview Answer

Anonymous

Jul 10, 2024

We can get as many Ts at first, it doesn't make a difference. Once we get an H, if we get a second H, we will always get HHT before HTT. So once we get our first H, there are three possibilities: get a second H with probability 1/2, get two Ts with probability 1/4, or get TH with probability 1/4. In the first case we get HHT, in the second we get HTT, and in the third we end up back in the same situation (one H). So the answer is .5 + .5*.25 + ..., or sum(.5 * .25^i from i = 0 to i = inf). It's 2/3.