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
Distribution (theory vs empirical)
Bar chart comparing theoretical probabilities with observed proportions.
Running estimate vs trials
The shaded area shows a pointwise Wilson 95% interval at each trial count; it is not a simultaneous confidence band.
Bar chart comparing theoretical probabilities with observed proportions.
| Outcome | Theory | Expected count | Observed count | Empirical | Difference (percentage points) |
|---|
Line chart showing the running estimate and pointwise Wilson interval by trial count. The shaded area shows a pointwise Wilson 95% interval at each trial count; it is not a simultaneous confidence band.
| Trials | Empirical | Theory | Pointwise Wilson 95% interval |
|---|
Teaching tips
- Demonstrate the law of large numbers by increasing trials and letting learners watch the convergence band tighten around the theoretical line.
- Switch the dice to weighted mode and discuss how expected frequencies change and how the χ² statistic reacts to mis-specified weights.
- Highlight roulette's expected value and house edge to connect probability with finance-style expected returns.
FAQ
How can I reproduce the same simulation?
Keep the experiment, parameters, trial count, and integer seed the same. This page uses the same LCG to reproduce the same sequence, and the scenario link shares those settings. The generator is for teaching, not cryptographic use.
Why does the empirical result differ from the theoretical probability?
Finite samples vary by chance. Increase the number of trials and inspect the running chart and its pointwise Wilson 95% interval. The shaded region is not a simultaneous confidence band for the whole path.
What is included when I export or share a simulation?
A scenario link contains only the experiment settings and seed. CSV, LaTeX, and the text summary contain the result for the current revision. Run again after changing a setting; exports made while paused are marked as partial.