← Hub
Math Mojo

Probability Playground

Run real simulations, watch randomness converge to theory, and discover why your intuition is beautifully, reliably wrong.

01
🚪

Monty Hall Problem

Pick a door, watch one open, then decide: switch or stay? Run 1000 trials to see the shocking truth.

02
🎂

Birthday Paradox

How many people in a room before there's a 50%+ chance two share a birthday? The answer will surprise you.

03
🪙

Coin Flip Streaks

Guess the probability of a streak of 6+ heads in 100 flips. Most people are way off — are you?

04
🎲

Dice Distribution

Roll N dice and sum the faces. Watch a uniform distribution morph into a perfect bell curve.

← Experiments

🚪 Monty Hall Problem

Behind one door: a car. Behind the others: goats. Pick a door, the host reveals a goat, then — switch or stay?

Play a round

Step 1: Pick a door
🚪
1
🚪
2
🚪
3

Simulation — 1000 trials

0
Trials run
Switch win %
Stay win %
Switch wins0
Stay wins0
The Monty Hall Problem trips up even professional mathematicians. Here's the key insight:

When you first pick a door, you have a 1/3 chance of being right. That means there's a 2/3 chance the car is behind one of the other two doors.

When the host (who knows where the car is) opens a goat door, all that 2/3 probability collapses onto the one remaining unopened door. Switching gives you that 2/3 chance. Staying keeps your original 1/3.

The simulation converges to: Switch ≈ 66.7% wins, Stay ≈ 33.3% wins. Always switch!
← Experiments

🎂 Birthday Paradox

How many people do you need in a room before there's a 50%+ chance that two of them share a birthday?

Adjust room size

50.7%
Theoretical probability
Empirical (simulations)
0
Rooms simulated

Probability curve (n=1 to 70)

The marks n=23 (≈50.7%). Your cursor position shown as .
The Birthday Paradox exploits the fact that we compare every pair of people, not just against one fixed date.

With 23 people there are 253 possible pairs. For each pair, the chance they share a birthday is 1/365 ≈ 0.27%. But with 253 independent chances, the cumulative probability crosses 50%.

Formula: P(at least one match) = 1 − (365/365 × 364/365 × 363/365 × … × (365−n+1)/365)

At n=23: ~50.7% | n=30: ~70.6% | n=50: ~97% | n=70: ~99.9%
← Experiments

🪙 Coin Flip Streaks

In 100 coin flips, how likely is a streak of 6 or more heads in a row? Make your guess first!

Your intuition

Flip 100 coins — visualise the sequence

Press "Flip!" to start

Batch mode — 1000 sequences of 100 flips

0
Sequences run
Had streak ≥ 6
Avg longest streak
Sequences with streak ≥ 6
The Streak Illusion — Most people guess 20-40% because a streak of 6 feels "rare." In reality, with 100 flips there are ~95 possible starting positions for a streak of 6, and the probability of at least one such streak is approximately 80–83%.

This matters in real life: when we see a sports "hot streak" or a stock climbing 6 days in a row, we attribute it to skill or momentum. But streaks are expected in random data. The human brain is wired to see patterns; probability shows us most of those patterns are noise.
← Experiments

🎲 Dice Roll Distribution

Roll N dice and sum the faces. Watch a flat, uniform distribution morph into a bell curve as you add more dice.

Configure & roll

Last roll sum
0
Total rolls
Distribution shape

Histogram of sums

Possible sums: 2–12
The Central Limit Theorem — one of the most important results in all of mathematics.

1 die: Every face equally likely → flat uniform distribution
2 dice: More ways to roll 7 than 2 or 12 → triangular distribution
3+ dice: The middle values accumulate exponentially more combinations → bell curve emerges

The CLT says: the sum of many independent random variables tends toward a normal distribution, regardless of the original distribution. This is why so many things in nature follow a bell curve — height, weight, measurement errors — they're all sums of many small random effects.