Probability and Statistics Simulator
Choose an experiment, define the event, run 1 to 10,000 trials at a time, and compare observed frequencies with exact theoretical probabilities in a histogram and a running-frequency chart; add class predictions and export the results.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Choose
Dice, coins, cards or spinner.
- 2Define the event
Pick the outcomes that count.
- 3Predict
Write class predictions.
- 4Run
10, 100 or 10,000 trials.
- 5Compare
Read the charts and export.
About this tool
Probability makes more sense when students can see thousands of trials happen in seconds. This simulator runs four classic experiments. Roll between one and ten dice with four to twenty sides and record the total; flip up to twenty coins and count heads; draw up to thirteen cards from a shuffled 52-card deck and check for at least one ace, heart or face card, or at least two cards of the same rank; or spin a spinner with your own labelled sectors and weights. Choose the outcomes that make up the event, such as a total of 7 or exactly 2 heads, and the tool shows the exact theoretical probability, worked out by convolution for dice, the binomial distribution for coins, combinations for cards and sector weights for spinners. Then run 1, 10, 100, 1,000 or 10,000 trials at a time. The distribution chart shows observed relative frequencies as bars, with the event's outcomes in orange, and the exact probabilities as black lines. The law of large numbers chart plots the running relative frequency of the event against the number of trials, with the theoretical value as a dashed line: early results swing widely, then settle. The last trial is shown so students can see an actual roll or hand. Write class predictions before running, and export the counts as a CSV for further analysis.
Exact probabilities used
| Experiment | Method | Example | |---|---|---| | Sum of dice | Convolution of uniform faces | P(sum of 2d6 = 7) = 6/36 ≈ 0.1667 | | Heads in coins | Binomial C(n, k) / 2^n | P(2 heads in 3) = 3/8 = 0.375 | | At least one ace in 5 cards | 1 − C(48, 5) / C(52, 5) | ≈ 0.3412 | | At least a pair in 5 cards | 1 − C(13, 5) × 4^5 / C(52, 5) | ≈ 0.4929 | | Spinner | Sector weight ÷ total weight | Red 2 of 4 → 0.5 |
Law of large numbers
As the number of independent trials grows, the relative frequency of an event gets closer to its probability. It does not mean results balance out: after ten heads in a row the next flip is still 50:50. The running chart shows how the distance from the true value shrinks roughly in proportion to one over the square root of the number of trials.
Classroom mode
Ask the class to predict before each run, record predictions in the box, then run 10, 100 and 10,000 trials. Discuss why 10 trials can be far from the prediction while 10,000 rarely are.
Worked example
Roll two six-sided dice with the event 7. The theoretical probability is 6/36 ≈ 0.1667. After 10 rolls the frequency might be 0.3; after 10,000 rolls it is typically within about 0.01 of 0.1667.
Privacy
Simulations run in your browser with its built-in random number generator; nothing is uploaded.
Limits
Pseudo-random numbers are fine for teaching but are not suitable for gambling, cryptography or formal statistical research. Not official exam software.
Worked example
Two dice, event 7: theory 6/36 ≈ 0.1667; 10,000 trials usually within about ±0.01.
Quick facts
- Category: Study & Education
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: OpenStax Introductory Statistics 2e: probability topics
Frequently asked questions
How is the theoretical probability calculated?
Exactly: convolution for dice, binomial for coins, combinations for cards, weights for spinners.
Can I make my own spinner?
Yes, write one sector per line with a label and a weight.
What is the law of large numbers?
With more trials, the relative frequency of an event tends towards its probability.
How many trials can I run?
Up to 10,000 per click, as many times as you like.
Can I export the results?
Yes, the counts, frequencies and theoretical values as a CSV.
Are the results truly random?
They use the browser's pseudo-random generator, which is suitable for teaching.
