Pattern waiting time Created 2026-09-24 Updated 2026-11-05
A pattern waiting time is the number of observations required until a specified finite pattern first occurs in a stochastic process. Overlaps between possible occurrences affect the answer; treating sliding windows as independent generally gives the wrong mean.
For independent fair coin tosses, let be the expected additional tosses to first see HH with no current matching prefix, and the expectation after one H. Then and , giving . For HT, the analogous equations give four. The patterns have the same probability in a fixed two-toss window, but different self-overlap structure.
Run of successes Created 2026-09-24 Updated 2026-11-05
A run of successes is a consecutive block of successful trials in a binary observation sequence. For independent trials with success probability , the waiting time until the first run of successes has mean
Let be the remaining mean after consecutive successes. For , , while . Solving backward gives the formula. At , , the mean is six, agreeing with the HH pattern waiting time. A run requires consecutive successes, unlike merely collecting successes in total.