Probability question - time to achieve a given sequence of coin flips

Two players are repeatedly flipping a fair coin. Player A flips until they get the sequence HTH. Player B flips until they get the sequence HHT. Who should expect to finish sooner?

My intuition says Player A has an advantage, because if they get HT they have one more to get, and if they get HH, then they still only have two more to get.

But if Player B gets HH they have one more to get, but if HT they have to go back to the start.

But I can’t prove it, or quantify it, and maybe my intuition is wrong?

You’re only considering two of the possible four outcomes for the first two flips. You consider HT and HH for both players, but ignore TH and TT. If you take those outcomes into account, then the odds will become 50/50.

ETA: For either sequence, the odds of making it on 3 consecutive flips is 1/8. The odds of having to restart after any given flip are 1/2, regardless of the sequence they need to make.

It doesn’t matter how many starting Ts there are, the game only starts after the 1st H. The next 2 spins have a 25% A win, (TH) and 25% B win(HT) 25% reset (TT)

If it’s HH then Player B is 1 away whilst player A is 2 away, that’s the only asymmetry so player B has the advantage.

Absolutely.

Now if you change the problem to totals of H + T such as:

  • A has to get ‘two heads and a tail’ in any order
  • B has to get ‘three tails’ in a row,

then A has the advantage because there are more sequences to win with than B has.

No clearly B is ahead as I just outlined.

All starting Ts can be ignored as they don’t do anything. The 4 combinations starting with H are

HTH- A wins
HHT- B wins
HTT- game is reset
HHH- B is 1 away from victory, A is 2 away.

I would think that the odds of getting any combination are the same.

Imagine for a moment the lineup of HHT vs HHH.

Both need to get HH in order to have a 50% chance of winning on the next flip. Exactly identical.
If HHT loses on the next flip, they get another chance to win again immediately, and will continue to have a 50% chance of winning on every subsequent flip.
If HHH loses on the next flip, they are restarting entirely.

I think you’ve got that wrong. An early tail would reset both. It’s just a wait for HH then a sudden death winner takes all. This is a 50/50 as would any sequence where only the last one is different.

Oh sorry ignore all my comments. I misread it as 1 set of flips from 1 source and the winner is the first to get their sequence. That changes the answer so I’m acknowledging my misreading now.

Good explanation, thanks

I guess my intuition was off.