Weight each path
Let H mean heads and T mean tails, with P(H) = 2/3. Assume independent tosses. HHT and THH each have chance (2/3)² × (1/3) = 4/27 in a fixed three-toss window. This equality does not decide which appears first in a longer shared sequence.
Stop at the first winner
Race HHT against THH for at most four tosses. HHT wins on HHTH, HHTT and HHHT, with weights 8, 4 and 8 out of 81. THH wins on THHH, THHT, TTHH and HTHH, with weights 8, 4, 4 and 8. The last toss in a path that won earlier only completes the counting window; it cannot change the winner.
Keep unfinished races
The totals are 20/81 for HHT, 24/81 for THH and 37/81 with no winner. Do not discard the unfinished paths or treat 16 paths as equally likely. To extend to 18 tosses, keep the longest suffix that begins either pattern and update its weight after each H or T.
Try it
In this four-toss race with P(H) = 2/3, which pattern is more likely to win?
- HHT
- THH
Show the answer
THH
Correct. Include HTHH as a winning path for THH. Its total is 24/81, above HHT’s 20/81.
Enable JavaScript to answer interactively and save your place.
Practice Pattern races