Law Of Large Numbers Demo

Simulate dice rolls or coin flips and watch the running average converge to the expected value as trials increase.

Simulation Settings

500
10 1,000 2,000
Trials
0
Running Avg
Expected
3.50
Deviation

Running Average vs. Expected Value

Running avg Expected

Press "Run Simulation" or "Step (+1)" to begin.

Summary

Simulate dice rolls or coin flips and watch the running average converge to the expected value as trials increase.

How it works

  1. Choose an experiment: a six-sided die (expected average 3.5) or a fair coin (heads = 1, tails = 0, expected average 0.5).
  2. Set the number of trials per run using the slider (up to 2,000).
  3. Click "Run Simulation" to instantly generate all trials and plot the running average.
  4. The chart shows each trial on the x-axis and the cumulative average on the y-axis.
  5. A dashed line marks the theoretical expected value so you can see convergence visually.
  6. Use "Step" to add one trial at a time, or "Reset" to start over.

Use cases

  • Teaching probability and statistics to students.
  • Demonstrating why casinos always win in the long run.
  • Illustrating why sample size matters in research.
  • Showing how insurance risk pools become predictable at scale.
  • Understanding why poll averages become more accurate with more respondents.
  • Exploring the difference between short-run randomness and long-run predictability.

Frequently Asked Questions

Last updated: 2026-06-13 · Reviewed by Nham Vu