← Math & statistics

Probability Simulator — coin, dice, roulette (theory vs empirical)

Fix the RNG seed and run coin, weighted dice, or roulette experiments. Watch theory vs empirical results, confidence intervals, convergence bands, and step logs update in real time.

Designed for probability lessons. Deterministic seeds keep classes in sync, and CSV/LaTeX exports make documentation easy.

Other languages 日本語 | English | 简体中文 | 繁體中文 | 繁體中文(香港) | Español | Español (México) | Português (Brasil) | Português (Portugal) | Bahasa Indonesia | Tiếng Việt | 한국어 | Français | Deutsch | Svenska | Suomi | Dansk | Norsk bokmål | Italiano | Русский | हिन्दी | العربية | বাংলা | اردو | Türkçe | ไทย | Polski | Filipino | Bahasa Melayu | فارسی | Nederlands | Українська | עברית | Čeština

Choose coin flips with custom p(Heads), weighted six-sided dice, or European/American roulette bets. The simulator compares theory and empirical ratios, shows Wilson 95% intervals for binary outcomes, tracks convergence, and records each calculation step.

For handouts, export raw counts as CSV or copy the LaTeX summary. Use the shareable URL to reopen the same scenario later.

Controls

General settings
Coin settings
Embed this calculator

Progress: 0% (0/0)

Result

Static sample
Coin, p(heads)=0.5, N=100
Theoretical probability
50% heads and 50% tails
Expected count
50 heads and 50 tails before random sampling noise
Wilson 95% CI if 50 heads occur
about [40.4%, 59.6%]

How it's calculated

  1. Set the event model first: P(heads)=0.5 and P(tails)=0.5.
  2. Multiply each probability by the trial count: 100×0.5=50 expected heads.
  3. After you run the simulator, compare empirical counts with theory and read the Wilson interval as sampling uncertainty.

Distribution (theory vs empirical)

Blue bars track empirical frequencies while the lighter overlay shows theoretical probabilities. Differences are labeled above each category for quick reference.

Running estimate vs trials

The solid line shows the running proportion. The dashed line marks the theoretical value and the shaded band gives the 95% confidence interval as trials accumulate.

Teaching tips

FAQ

How can I verify the RNG sequence in class?

Use a published acceptance case, such as seed 12345 with 100 flips. The simulator returns the same outcome each time because RNG and seed are fixed, even across devices.

Can I export the run to share with students?

Yes. Export CSV for raw counts and running estimates, copy the LaTeX summary for worksheets, and share the generated URL to reload the same experiment.