MathematicsProbabilityClass 10Class 11Class 12

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)

Embed this simulation

Free for classrooms, school sites and blogs. Keep the attribution link.

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. 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. 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. 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. 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

P(E)=favourable outcomestotal equally likely outcomesP(E) = \frac{\text{favourable outcomes}}{\text{total equally likely outcomes}}

Experimental probability

p^=times E happenedn\hat p = \frac{\text{times } E \text{ happened}}{n}

Two dice: sum of 7

P(7)=636=16P(7) = \frac{6}{36} = \frac{1}{6}

Typical gap after n trials

∣p^−p∣≲1.96p(1−p)n|\hat p - p| \lesssim 1.96\sqrt{\frac{p(1-p)}{n}}

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.
Stuck on a probability & the law of large numbers question?Snap it and get a whiteboard video solution.

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 simulations

Want a specific topic or simulation added?

Tell us in our feedback box which chapter or concept you want visualised next.

Send feedback