Login
📚 Online Statistics Education
Chapters ▾
⇩ Download ▾

5.4 Gambler's Fallacy

This section is an interactive demonstration. The live simulation runs on the original site: open the demonstration at onlinestatbook.com.

Learning Objectives

  1. Gain a better understanding of the gambler's fallacy.
  2. Understand the link between the number of trials and expected outcome of probability distributions.

Instructions
The gambler's fallacy involves beliefs about sequences of independent events. By definition, if two events are independent, the occurrence of one event does not affect the occurrence of the second. For example, if a fair coin is flipped twice, the occurrence of a head on the first flip does not affect the outcome of the second flip.

What if a coin is flipped five times and comes up heads each time. Is a tail "due" and therefore more likely than not to occur on the next flip. Since the events are independent, the answer is "no."

The gambler's fallacy is mistakenly believing that the answer is "yes." Believers in the fallacy argue correctly that in the long run, the proportion of heads will be 0.50. Or, stated more precisely, as the number of flips approaches infinity, the proportion of heads approaches 0.50. Doesn't this imply that there must be some natural adjustment occurring, compensating for a string of heads with the later occurrence of more tails?

This simulation allows you to explore this question yourself. You can simulate the flipping of a single coin by clicking the "flip once" button. The number of flips (n), the number of heads, the number of tails, the difference between the number of heads and the number of tails, and the proportion of heads are all recorded and displayed.

To speed things up, you can click the "Flip 100 times" or the "Flip 1000 times" buttons. The "reset" button clears all the data. The lower portion of the simulation allows you to simulate 25,000 flips at a time. After you click the "Flip 25,000 times and draw graphs" button, the graph on the left will plot the difference between the number of heads and tails as a function of the number of coin flips. The graph on the right will plot the proportion of heads as a function of the number of coin flips.

Illustrated Instructions
The gambler's fallacy demonstration allows you to flip a fair coin in a varity of increments. Each time you click one of these buttons the total number of coin flips is increased by the increment on the respective button.
Screenshot of the coin-flipping simulation after 100 flips: a photograph of a Sacagawea dollar above Restart, Flip Once, Flip 100 Times, and Flip 1000 Times buttons, with the running result n=100, heads=49, tails=51, heads-tails=-2, Proportion of heads=0.490, and a Flip 25,000 times and draw graphs button below.
The screenshot below shows what happens when you click the "Flip 25,000 times...". The demonstration draws to graphs the first of which shows the Heads minus Tails for all trials and the second shows the proportion of heads for all trials. Clicking this button repeatedly increments the number of trials and adjusts the graphs accordingly.
Screenshot of the same simulation after clicking Flip 25,000 times and draw graphs. Two plots appear. On the left, Trials vs. (Heads-Tails): the running difference wanders upward from about -40 to roughly +330 as trials go from 0 to 25,000 — the absolute gap grows. On the right, Trials vs. Proportion of Heads on a fine scale from 0.480 to 0.520: the proportion starts near 0.481, and settles into a narrow band around 0.505 — the proportion converges even though the raw difference does not.

We recommend you answer the questions even if you have to guess. Then use the simulation to help you with the answer.

Each time the buttons are clicked the coin is flipped randomly and the proportion of heads is recalculated.

Adapted from Online Statistics Education: A Multimedia Course of Study (onlinestatbook.com), Project Leader: David M. Lane, Rice University. Developed with NSF support. The original work is in the public domain; it is cited here at the authors' request. Changes were made: reformatted as an accessible XYZ web edition with native MathML. License: Public-Domain.