Probability & the law of large numbers: interactive simulation
Theoretical probability says what should happen: a fair coin lands heads with probability 1/2. Experimental probability is what actually happens: heads ÷ flips. For a handful of flips the two can be far apart.
Useful for: AP Statistics, GCSE Maths, SAT, CBSE Boards · India (JEE / NEET / CBSE) and worldwide (AP / SAT / IB / GCSE / A-level)
Try this
Run 10, 100, then thousands of trials. The running frequency wobbles early, then settles onto the theoretical value and stays inside the shrinking 95% funnel — that is the law of large numbers.
- 1
Flip the coin 10 times, a few times over (Reset between).
What you should see
Getting 3 or 7 heads out of 10 is common — small samples are noisy.
- 2
Now flip 1,000 more.
What you should see
The frequency is almost always within about 0.03 of 0.5, since 1.96·√(0.25/1000) ≈ 0.031.
- 3
Roll two dice 1,000 times.
What you should see
The bars form a triangle peaking at 7 (6/36 ≈ 0.167); 2 and 12 each appear only about 1 time in 36.
- 4
Count heads after a long run.
What you should see
The proportion approaches 0.5 but the raw difference heads − tails can keep growing. The law is about proportions, not counts.
Formulas behind it
Theoretical probability
Experimental probability
Two dice: sum of 7
Typical gap after n trials
Common mistakes
- The gambler’s fallacy: after five heads, tails is not “due” — each flip is still 1/2.
- Treating the 11 sums of two dice as equally likely. There are 36 equally likely ordered pairs, and 6 of them sum to 7.
- Expecting exactly 50 heads in 100 flips. That happens only about 8% of the time.
FAQ
What is the law of large numbers?
As the number of independent trials grows, the experimental probability of an event gets closer and closer to its theoretical probability.
Why is 7 the most common sum with two dice?
Six ordered pairs give 7 — (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) — more than any other sum, so P(7) = 6/36 = 1/6.
What is the difference between experimental and theoretical probability?
Theoretical probability comes from counting equally likely outcomes. Experimental probability comes from actually doing the experiment and dividing successes by trials.
Related simulations
All 70 simulationsWant a specific topic or simulation added?
Tell us in our feedback box which chapter or concept you want visualised next.