1. The question: Are tails due?

A fair coin lands on heads five times in a row.

Your friend says: “The next flip has to be tails. It needs to even out!”

Does a streak change the probability of the next outcome? Can simulation help us test that claim? What does “evening out” actually mean in probability?

Our investigation: Use probability, simulated coin flips, and R visualizations to examine this claim.

2. What is the gambler’s fallacy?

The gambler’s fallacy is believing that past outcomes make the opposite outcome more likely in an independent random process.

After several heads, someone believes tails are more likely. After repeated losses, someone believes a win is “due.” The mistake is treating independent trials as if they remember the past.

Assumptions for this presentation: Each coin flip is independent, and the coin has a fixed 50% chance of heads.

This reasoning does not automatically apply to dependent events, such as drawing cards without replacement.

3. The mathematics of independence

Let \(T\) mean tails on the next flip and \(A\) mean heads on the previous five flips.

Independence means:

\[P(T\mid A)=\frac{P(T\cap A)}{P(A)}=\frac{P(T)P(A)}{P(A)}=P(T)=\frac{1}{2}.\]

Before any flips, five heads followed by tails has probability:

\[P(HHHHHT)=\left(\frac{1}{2}\right)^6=\frac{1}{64}.\]

Interpretation: The entire sequence is unlikely beforehand, but once five heads have happened, the next flip is still 50–50. (*I had to look up how to input this)

4. A 1% chance does not become a guarantee

Suppose each independent attempt has a fixed success probability \(p=0.01\).

Even after 50 failures:

\[P(\text{success on attempt 51}\mid\text{first 50 failed})=0.01.\]

The chance of at least one success in the next 50 attempts is:

\[P(X\geq1)=1-P(X=0)=1-(0.99)^{50}\approx0.395.\]

Interpretation: There is about a 39.5% chance, not a guarantee, of a success in the next 50 attempts. More future attempts offer more opportunities; past failures do not improve each attempt’s odds.

5. Our simulation in R

Generate 100,000 independent sequences of 11 fair coin flips. For each streak length, select sequences beginning with that many heads and examine the following flip.

set.seed(151)
flips <- matrix(rbinom(100000 * 11, 1, 0.5), ncol = 11)
# 1 = heads; 0 = tails
results <- do.call(rbind, lapply(0:8, function(k) {
  eligible <- if (k == 0) rep(TRUE, nrow(flips)) else
    rowSums(flips[, seq_len(k), drop = FALSE]) == k
  data.frame(streak = k, n = sum(eligible),
             p_tails = mean(flips[eligible, k + 1] == 0))
}))

These are simulated data, not observations from a casino. Longer streaks leave fewer eligible sequences. (*This was even harder to figure out)

6. Does a heads streak predict tails?

Interpretation: The bars fluctuate around 50%. Longer streaks do not systematically increase the probability of tails. Their estimates are noisier because fewer sequences qualify.

7. What does ‘evening out’ really mean?

The law of large numbers says the proportion of heads approaches 0.5 as the number of independent fair flips grows.

\[\widehat{p}_n=\frac{\text{number of heads in the first }n\text{ flips}}{n}.\]

It does not say that tails must compensate for previous heads.

For example, after 10 heads in a row, the expected number of heads in the next 990 fair flips is 495:

\[E(\widehat{p}_{1000}\mid\text{first 10 heads}) =\frac{10+495}{1000}=0.505.\]

Interpretation: The early streak becomes a smaller fraction of the total, even though future flips remain 50–50.

8. Watch the proportion settle down

Interpretation: Early flips cause larger swings. Later, each flip has less influence on the overall proportion. This is dilution of early variation, not a change in the next flip’s probability.

9. Interactive: More attempts, more opportunities

Hover or zoom to explore. With a 1% success chance per attempt, 50 future attempts give about 39.5%; 100 give about 63.4%. The curve is the same regardless of how many past failures occurred.

10. What did we learn?

  • Question: Does a losing streak make a win due?
  • Mathematics: Independent trials keep their original probabilities.
  • Simulation: Tails occurred about half the time after initial heads streaks. (keeping with odds)
  • Visualization: Long-run proportions can stabilize without corrective outcomes.
  • Practical lesson: Base predictions on the process and its probabilities, not a feeling that luck will turn around.

A random process does not owe you a different outcome.