The gambler's fallacy, also known as the Monte Carlo fallacy or the fallacy of the maturity of chances, is the belief that an independent and equally probable outcome which happened less frequently than expected is more likely to happen in the future (or vice versa). The fallacy is commonly associated with gambling, where it may be mistakenly believed, for example, that the next dice roll is more likely to give '4' because there have recently been fewer '4's than expected, when in reality the probability of the next outcome being '4' is always 1/6, for each dice roll is an independent event. A challenge to human intuition is that even though regression toward the mean is a genuine phenomenon, it does not change the odds of individual random events. The term Monte Carlo fallacy originates from an example of the phenomenon, in which the roulette wheel spun black 26 times in succession at the Monte Carlo Casino in 1913.
Examples
Coin toss
The gambler's fallacy can be illustrated by considering the repeated toss of a fair coin. The outcomes in different tosses are statistically independent and the probability of getting heads on a single toss is 1/2 (one in two). The probability of getting two heads in two tosses is 1/4 (one in four) and the probability of getting three heads in three tosses is 1/8 (one in eight). In general, if Ai is the event where toss i of a fair coin comes up heads, then:
Pr(⋂i=1nAi)=∏i=1nPr(Ai)=12n. If after tossing four heads in a row, the next coin toss also came up heads, it would complete a run of five successive heads. Since the probability of a run of five successive heads is 1/32 (one in thirty-two), a person might believe that the next flip would be more likely to come up tails rather than heads again. This is incorrect and is an example of the gambler's fallacy. The event "5 heads in a row" and the event "first 4 heads, then a tails" are equally likely, each having probability 1/32. Since the first four tosses turn up heads, the probability that the next toss is a head is:
Pr(A5|A1∩A2∩A3∩A4)=Pr(A5)=12. While a run of five heads has a probability of 1/32 = 0.03125 (a little over 3%), the misunderstanding lies in not realizing that this is the case only before the first coin is tossed. After the first four tosses in this example, the results are no longer unknown, so their probabilities are at that point equal to 1 (100%). The probability of a run of coin tosses of any length continuing for one more toss is always 0.5. The reasoning that a fifth toss is more likely to be tails because the previous four tosses were heads, with a run of luck in the past influencing the odds in the future, forms the basis of the fallacy.
Why the probability is 1/2 for a fair coin If a fair coin is flipped 21 times, the probability of 21 heads is 1 in 2,097,152. The probability of flipping a head after having already flipped 20 heads in a row is 1/2. Assuming a fair coin:
The probability of 20 heads, then 1 tail is 0.520 × 0.5 = 0.521 The probability of 20 heads, then 1 head is 0.520 × 0.5 = 0.521 The probability of getting 20 heads then 1 tail, and the probability of getting 20 heads then another head are both 1 in 2,097,152. When flipping a fair coin 21 times, the outcome is equally likely to be 21 heads as 20 heads and then 1 tail. These two outcomes are equally as likely as any of the other combinations that can be obtained from 21 flips of a coin. All of the 21-flip combinations will have probabilities equal to 0.521, or 1 in 2,097,152. Assuming that a change in the probability will occur as a result of the outcome of prior flips is incorrect because every outcome of a 21-flip sequence is as likely as the other outcomes. In accordance with Bayes' theorem, the likely outcome of each flip is the probability of the fair coin, which is 1/2.
Other examples The fallacy leads to the incorrect notion that previous failures will create an increased probability of success on subsequent attempts. For a fair 16-sided die, the probability of each outcome occurring is 1/16 (6.25%). If a win is defined as rolling a 1, the probability of a 1 occurring at least once in 16 rolls is:
1−[1516]16=64.39% The probability of a loss on the first roll is 15/16 (93.75%). According to the fallacy, the player should have a higher chance of winning after one loss has occurred. The probability of at least one win is now:
1−[1516]15=62.02% By losing one toss, the player's probability of winning drops by two percentage points. With 5 losses and 11 rolls remaining, the probability of winning drops to around 0.5 (50%). The probability of at least one win does not increase after a series of losses; indeed, the probability of success actually decreases, because there are fewer trials left in which to win. The probability of winning will eventually be equal to the probability of winning a single toss, which is 1/16 (6.25%) and occurs when only one toss is left.
Reverse position After a consistent tendency towards tails, a gambler may also decide that tails has become a more likely outcome. This is a rational and Bayesian conclusion, bearing in mind the possibility that the coin may not be fair; it is not a fallacy. Believing the odds to favor tails, the gambler sees no reason to change to heads. However, it is a fallacy that a sequence of trials carries a memory of past results which tend to favor or disfavor future outcomes. The inverse gambler's fallacy described by Ian Hacking is a situation where a gambler entering a room and seeing a person rolling a double six on a pair of dice may erroneously conclude that the person must have been rolling the dice for quite a while, as they would be unlikely to get a double six on their first attempt.
… excerpt ends here. Continue reading the full article.

![Gambler's fallacy: The effect of gambler's fallacy on lottery selections, based on studies by Dek Terrell. After winning numbers are drawn, lottery players respond by reducing the number of times they select those numbers in following draws. This effect slowly corrects over time, as players become less affected by the fallacy.[28]](https://thumb.wikimedia.org/wikipedia/commons/thumb/0/0f/Gamblers_Fallacy_Effect_on_Lottery.jpg/500px-Gamblers_Fallacy_Effect_on_Lottery.jpg?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)