Probability Lab
Teaching lab

Probability Simulator

Run coin flips and dice rolls. Watch the live histogram approach theoretical probabilities as trials pile up — the law of large numbers, made visible.

Controls

Fair coin — each side has probability 1/2.

Trial count0 / 100
Animation speed5/10

Slow speeds show each roll. Fast speeds batch trials so you can watch probabilities converge.

Current roll

—

Ready

Live histogram

Bar height = relative frequency. Dashed lines mark theoretical probability.

ObservedTheoretical

What you're seeing

Press Run to start trials. Watch the bars approach the dashed theoretical marks.

Trials
0
Mean |error|
—
Avg. gap vs theory
Closest outcome
—

Theory vs observed

Exact comparison for each outcome

OutcomeCountObs.TheoryDiff
Heads0—50.00%—
Tails0—50.00%—

Relative frequency

Count of an outcome divided by total trials. As N grows, this usually approaches the true probability.

Law of large numbers

Random short-run streaks are normal. Over many independent trials, averages settle near expectation.

Unequal outcomes

Switch to Two dice: a sum of 7 has six ways (1+6 … 6+1), while 2 has only one — the histogram should look peaked.