QiLing Tools

🎲Probability Simulator - Coin Flips, Dice Sums, Spinners and Urn Draws Online

Textbooks say that the more trials you run, the closer the frequency gets to the probability — here you can watch it happen. Pick a random experiment (coins, dice, a spinner or an urn), choose how many trials to run and press start. The bars show the observed frequencies, the red dots the exactly computed probabilities, the line chart shows the running average settling down to the expected value, and a chi-square test tells you whether the results fit the theory. For a single quick dice roll the random number generator is handier; this tool is for many repeated trials and their statistics.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use Probability Simulator

  1. 1Choose an experiment — coins, dice, spinner or urn — and set its parameters
  2. 2Pick the number of trials (10 to 1,000,000) and the animation speed; add a seed if you want a reproducible run
  3. 3Press “Run simulation” and watch the histogram and running average; pause and resume at any time
  4. 4Compare the sample mean and variance with theory and read the chi-square p-value

FAQ

What is the law of large numbers and where do I see it here?
It says that as the number of independent trials grows, the relative frequency of an event approaches its probability and the sample mean approaches the expected value. Watch the running-average chart: it swings wildly at first, and after a few thousand trials it hugs the dashed red line of the theoretical mean.
Why is 7 the most likely sum of two dice?
Two dice have 36 equally likely outcomes and 7 can be made in the most ways — (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) — so its probability is 6/36 = 1/6, while 2 and 12 have just one way each. With more dice the distribution of the sum looks more and more like a normal bell curve.
How should I read the chi-square p-value?
The p-value is the chance of seeing a deviation at least this large if the dice (or coin) really are fair. p ≥ 0.05 is usually taken as consistent with theory and p < 0.05 as a significant difference. Even with perfectly fair randomness you will get p < 0.05 about 5% of the time.
What changes between drawing with and without replacement?
With replacement every ball goes back before the next draw, so the chance of red never changes and the number of reds is binomial. Without replacement the mix changes after each draw, the count follows the hypergeometric distribution and its variance is smaller. You can compare both settings side by side.