SOLVETUTORMATH SOLVER

Instrument MI-07-037 · Statistics

Coin Toss Streak Calculator

A run of 5 heads in a row feels rare — but across enough flips, streaks like that show up far more often than most people expect. This instrument computes exactly how often.

Instrument MI-07-037
Sheet 1 OF 1
Rev A
Verified
Type 07 — Probability SER. 2026-07037

P(longest run of heads >= k)

0.507813

u(m)=P(no run of k heads in m flips); u(m)=1 for m<k; u(m)=Σ_{j=0}^{k-1} pʲ(1−p)u(m−j−1) for m≥k. P(streak≥k)=1−u(n)

The working Every figure verified twice
  1. n=10, k=3, p=0.5 -> P(no run)=0.492188, P(streak>=k)=0.507813
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

This instrument answers a specific question: across n coin flips, what's the probability that somewhere in that sequence there's an unbroken run of at least k consecutive heads? That's a different, and usually much larger, number than the probability of one exact sequence — the chance of flipping exactly HHHHH and nothing else in 5 flips is only 1/32, but the chance of a run of at least 2 heads appearing anywhere in 4 flips is a full 50%, because there are many different sequences that contain such a run.

This distinction is exactly what trips people up when judging real streaks — in sports ('hot hand'), in gambling, in stock-price moves. A run that looks too improbable to be chance is often just an ordinary consequence of doing enough trials: give a fair coin enough flips, and a streak of several heads in a row is close to guaranteed to appear somewhere, not evidence that the coin (or the shooter, or the stock) has suddenly become non-random.

The math behind it is a classical result in probability, usually derived through a recursive relationship: the probability of avoiding a run of k heads in n flips can be built up from the probability of avoiding it in fewer flips, by considering how the sequence could end — on a tail after 0 heads, 1 head, up to k-1 heads in a row, but never reaching k. Subtracting that 'no long run' probability from 1 gives the probability that a run of at least k heads did occur.

q(n)=(1p)q(n1)+p(1p)q(n2)++pk1(1p)q(nk)q(n) = (1-p)\,q(n-1) + p(1-p)\,q(n-2) + \cdots + p^{k-1}(1-p)\,q(n-k)P(streakk)=1q(n)P(\text{streak} \ge k) = 1 - q(n)
n — number of flips · k — streak length being checked for · p — probability of heads on a single flip · q(n) — probability of no run of k or more heads across n flips, defined recursively with q(j)=1 for j<k · the final answer is 1 minus q(n).
  • Enter the total number of coin flips into Number of flips (n).
  • Enter the run length you're checking for into Streak length to check for (k) — for example, 3 to check for at least three heads in a row.
  • Enter the chance of heads on each individual flip into P(heads) per flip — 0.5 for a fair coin, or any other value for a biased one.
  • Read P(longest run of heads >= k) for the probability that a run that long (or longer) appears somewhere across all n flips.
  • Streak length k can be no longer than the number of flips n itself makes sense to check meaningfully; very short flip counts naturally cap how long a run can possibly be.

Worked example — a run of 2+ heads in 4 fair flips

Enter 4 into Number of flips (n), 2 into Streak length to check for (k), and 0.5 into P(heads) per flip. With 4 fair flips there are 16 equally likely outcomes in total. Listing them out, exactly 8 contain a run of 2 or more consecutive heads somewhere: HHHH, HHHT, HHTH, HHTT, HTHH, THHH, THHT and TTHH. P(longest run of heads >= k) reads 0.5, matching 8 out of 16 directly.

Notice how much larger that is than the probability of one specific run-heavy sequence like HHHH alone (only 1/16 = 6.25%) — because the question isn't 'did this exact sequence occur,' it's 'did a run this long occur anywhere in the sequence,' and there are many different ways for that to happen.

Questions

How is this different from the probability of one exact sequence of flips?

The probability of one specific sequence, like HHHH exactly, is just p^n (0.5^4 = 6.25% for 4 fair flips). This calculator instead asks whether a run of at least k heads appears anywhere within the n flips, counting every sequence that contains such a run — which is why the answer (50% in the 4-flip, streak-of-2 example) comes out so much larger than any single sequence's own probability.

Does this work for a biased coin, not just a fair one?

Yes — P(heads) per flip accepts any probability from 0 to 1, not just 0.5. A weighted coin with P(heads) = 0.3, for example, produces a lower but still computable probability of hitting a given streak length, since heads-runs become naturally less likely the lower the per-flip heads probability is.

What is the 'hot hand fallacy' and how does this relate to it?

The hot hand fallacy is the tendency to see a run of successes (a shooter making several baskets in a row, a trader having several winning trades) as evidence of a real change in ability or luck, when it may simply be the ordinary, expected byproduct of enough independent trials. This calculator quantifies exactly how likely such runs are under pure chance, which is the baseline needed before concluding a real streak is happening.

Why isn't there a simple closed-form formula, like there is for a single exact sequence?

Because 'a run of at least k somewhere in n flips' depends on the whole sequence's structure, not just its length — a run could start at any position and be interrupted or extended in many ways. The standard approach, used here, builds the answer recursively: the probability of avoiding a long run in n flips is expressed in terms of the same probability for fewer flips, accounting for how many heads preceded the most recent tail.

What happens if the streak length k is close to the total number of flips n?

The probability of hitting the streak drops sharply, since there's very little room for a long run to fit. Checking for a run of 3 in only 3 total flips, for instance, requires every single flip to be heads — a much stricter condition than checking for the same run length across a much longer sequence, where the run has many more places it could occur.

Does a longer streak length always mean a lower probability?

Yes, for a fixed number of flips — requiring a longer unbroken run is always a stricter, harder-to-satisfy condition, so P(longest run of heads >= k) decreases as k increases, holding n and P(heads) fixed. Increasing the number of flips n, on the other hand, works the opposite way: more flips give a run more chances to occur, so the probability increases with n for a fixed streak length.

References