Introduction 🎉

Welcome to Recognize Patterns That Aren't There. "The Due Outcome Myth" will stress-test the no-memory principle and explore why our brains struggle to interpret streaks correctly. In this lesson, you will learn to:

  • Differentiate between short-term noise and long-term averages by understanding how random proportions stabilize only after many trials.
  • Explain the Law of Large Numbers and why convergence happens through the dilution of old data rather than the "correction" of past results.
  • Identify the Gambler's Fallacy in diverse contexts, ranging from financial markets and sports to daily decision-making.

These skills are essential for objective analysis. The instinct to believe an outcome is "due" is one of the most persistent cognitive biases, often leading people to expect a reversal of fortune where none is mathematically supported. By mastering these concepts, you will learn to trust the data over your intuition and recognize when the universe is—and isn't—keeping score.

Picture yourself at a charity raffle where a spinner lands on "red" six times in a row. The crowd groans, and someone mutters, "It has to land on blue next." That gut reaction is almost universal. When we witness a lopsided streak, it feels like the process has wandered off course and needs to snap back.

From the previous lesson, you already know why this instinct is misleading: if each spin is independent, the result of spin seven is completely unaffected by the six spins before it. The probability of red is the same as it always was. What we need to understand now is why the instinct is so powerful and where, exactly, the reasoning goes wrong. The answer starts with how we picture short sequences of random events.

Short Runs Swing Wide 🎢
How Large Numbers Settle the Score ⚖️
The Gambler's Fallacy 🎲

When people ignore dilution and instead expect correction, they fall into the gambler's fallacy: the mistaken belief that, after a streak of one outcome in an independent process, the opposite outcome becomes more likely on the very next trial. A roulette player sees red come up five times in a row and rushes to bet on black, convinced that black is "due." A lottery player avoids numbers that won recently, assuming those numbers have used up their luck.

Here is the mistake in ordinary language: after five heads in a row, the gambler’s fallacy says tails should now be more than a 50-50 chance.

But for a fair coin, the chance of tails on the next flip is still 50%. The previous heads are already in the past. They do not change the coin, the flipping process, or the probability of the next result.

What happened before?Chance of tails on the next flip
No previous flips shown50%
5 heads in a row50%
5 tails in a row50%
A mixed sequence like H-T-H-H-T50%

The streak provides zero information about the next flip. The coin does not know it has been landing heads, and it has no mechanism to balance the results. This is the no-memory principle applied directly to a streak: past outcomes cannot nudge an independent process in any direction.

Spotting the Fallacy in Everyday Life 🔍

The gambler's fallacy is not limited to coins and roulette wheels. It appears wherever people face independent random events and let recent history shape their expectations for the very next outcome. Here are some common real-world contexts to watch for:

  • Lotteries. A player refuses to pick numbers that appeared in last week's drawing, thinking those numbers are now less likely. Each drawing is an independent event with the same set of possible outcomes, so no number is "used up."
  • Casinos. Electronic displays at roulette tables show the last 20 results. Casinos install these boards because they know players will spot "patterns" and bet accordingly, even though every spin is independent.
  • Sports. A commentator says a basketball player who has missed several free throws in a row is "due for a make." If the misses are essentially independent — as research often suggests for free throws — the reasoning is fallacious.
  • Investing. An investor assumes that because a stock has dropped for five straight days, a rebound is "overdue." While stock prices are influenced by many real-world factors, a streak of losses alone does not push the probability of a gain higher the next day.

In every case, the mistake is the same: treating independent outcomes as though an invisible rubber band pulls results back toward the average. The law of large numbers tells us the average will emerge over many trials, but it happens through the accumulation of new data, not through correction of past results.

Conclusion and Next Steps

In this lesson, you learned that short runs of random outcomes routinely stray from our expectations, and that this is completely normal. You also learned that the law of large numbers brings proportions in line with the true probability through dilution, not correction, and you can now identify the gambler's fallacy whenever someone claims an independent outcome is "due."

Up next, you will test these ideas firsthand in a set of interactive practice tasks. You will generate short and long random sequences to see dilution in action, evaluate real-world claims for gambler's-fallacy reasoning, make predictions after streaks and compare them to actual outcomes, and even explain to someone why an outcome is never "due."

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal