The mathematics of coin flips
The simplest random experiment, and still full of surprises: streaks, the law of large numbers, and recent research showing real coins are not quite 50/50.
1. The Bernoulli trial
A coin flip is the textbook example of a Bernoulli trial: one experiment with two outcomes. For an ideal coin, heads and tails each have probability 1/2, and each flip is independent of the others. Count the heads in n flips and you get a binomial distribution with mean n/2 and standard deviation √n / 2.
2. What 100 flips really look like
With 100 flips the expected number of heads is 50 and the standard deviation is 5. About 96% of the time the count lands between 40 and 60. Getting exactly 50 happens only about 8% of the time, so a perfectly even result is actually unusual.
Streaks are where intuition fails most. In 100 fair flips, the chance of seeing a run of at least 6 identical results in a row is about 81%, and a run of at least 7 shows up about 54% of the time. When people write down a "random" sequence by hand, they switch sides too often and avoid long runs. Teachers use this to tell real coin sequences from invented ones.
3. The law of large numbers, correctly stated
The proportion of heads converges to 50% as you flip more. The difference between the number of heads and tails does not shrink, it grows. After 10,000 flips the average gap between heads and tails is about 80. The share of heads gets closer to one half because that gap grows more slowly than the number of flips.
Flips Typical |heads − tails| Typical share of heads 100 about 8 50% ± 5% 10,000 about 80 50% ± 0.5% 1,000,000 about 800 50% ± 0.05%
4. The hot hand and the gambler's fallacy
After five heads in a row, many people feel tails is "due" (the gambler's fallacy), while others feel heads is "on a roll" (the hot hand). For an independent coin both feelings are wrong. Gilovich, Vallone and Tversky (1985) argued that streaks in basketball shooting look just like coin-flip streaks. In 2018, Miller and Sanjurjo found a subtle bias in how such streaks had been measured: even for a fair coin, the share of heads right after a run of heads in a short sequence is expected to be below 50%. This is a great example of how careful probability reasoning can overturn a famous result.
5. Are real coins fair?
Physics says not quite. Diaconis, Holmes and Montgomery (2007) modeled the flip as a spinning, wobbling disk and predicted that a coin lands on the side it started on about 51% of the time. In 2023, a team led by František Bartoš tested this with 350,757 real flips and measured a same-side rate of 50.8%. The bias is too small to matter for deciding who kicks off a football match, but it shows that "random" physical processes can be studied and measured. The simulator on this page uses a computer random number generator, so it behaves like a perfectly fair coin.
References and further reading
Peer-reviewed research behind this page. Links open the official publisher page; free PDFs are marked. Browse every source in our Research Library.
- Diaconis, P., Holmes, S. and Montgomery, R. (2007). Dynamical Bias in the Coin Toss. SIAM Review, 49(2), 211 to 235.
A Stanford mathematician and magician analyzes the physics of a flipped coin and predicts a slight bias toward the side that started facing up.
Read the paper ↗DOI: 10.1137/S0036144504446436 - Bartoš, F., Sarafoglou, A., Godmann, H. R. et al. (2023). Fair Coins Tend to Land on the Same Side They Started: Evidence from 350,757 Flips. arXiv preprint 2310.04153.
A team of researchers flipped coins 350,757 times and confirmed the Diaconis prediction: about 50.8% of flips land on the starting side.
- Gilovich, T., Vallone, R. and Tversky, A. (1985). The Hot Hand in Basketball: On the Misperception of Random Sequences. Cognitive Psychology, 17(3), 295 to 314.
The classic study arguing that basketball "hot streaks" are what random sequences naturally look like.
Read the paper ↗DOI: 10.1016/0010-0285(85)90010-6 - Miller, J. B. and Sanjurjo, A. (2018). Surprised by the Hot Hand Fallacy? A Truth in the Law of Small Numbers. Econometrica, 86(6), 2019 to 2047.
A surprising twist: the 1985 hot hand study contained a subtle sampling bias. Once corrected, a small hot hand effect appears.
Read the paper ↗DOI: 10.3982/ECTA14943