Amos Tversky and Daniel Kahneman first introduced the gambler’s fallacy as the consequence of the representativeness heuristic in the 1970s. It occurs because of our belief in the law of small numbers, which is the idea that a small sample is representative of a population. If a random event has occurred several times before in the past, we tend to predict that it will occur less often in the future, so that the outcomes balance out to the average we would expect to have in the long run. We thus fail to recognize that random outcomes are statistically independent. This means that small samples will often be largely unrepresentative of the population. Few experiments have been designed to test the extent of this fallacy in practice, but it is common to see gamblers making the mistake of overestimating probabilities in everyday life.
This fallacy is also called the “Monte Carlo fallacy”, because the most famous example of the phenomenon was observed in one of their casinos in 1913. In a game of roulette, the ball fell in black 26 times in a row and gamblers lost millions betting against black, thinking that there had to be an end to this streak.