Race patterns with a biased coin

Track both patterns on one sequence and count unfinished races

Weight each path

P(H) = 2/3HHT: 4/27THH: 4/27
The same fixed-window probability does not settle the race.

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.

Lesson help

A race uses one shared sequence. Weight paths by the coin bias, stop at the first pattern and retain the no-winner outcomes.

About this lesson

Try the method in a practice when you are ready.

Report

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.

P(H) = 2/3HHT: 4/27THH: 4/27
The same fixed-window probability does not settle the race.

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.

HHT: 8 + 4 + 8 = 20THH: 8 + 4 + 4 + 8 = 243⁴ = 81
Multiply by 2 for H and by 1 for T; the common denominator is 3⁴.

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.

HHT: 20/81THH: 24/8120 + 24 + 37 = 81
Winning probabilities and the unresolved probability sum to one.

Try it

In this four-toss race with P(H) = 2/3, which pattern is more likely to win?

  1. HHT
  2. 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

Sign in free

Practice without limits and keep your progress.