Simulation

By Jude Wallis · Published

A simulation imitates a chance process using repeated random outcomes, then estimates a probability from the fraction of trials that give the event.

A simulation answers a probability question by generating outcomes from a model you have assumed and then counting. Fix the model, define exactly what one trial is, run many trials, and report p^\hat{p} (p-hat) as successes divided by trials. What comes back is an estimate of the probability under that model. It is not the probability itself, and it is not evidence the model is true.

Take a player who makes 70 percent of her free throws with shots independent, and ask for the chance she makes all four of her next attempts. The exact answer is 0.704=0.24010.70^4 = 0.2401. One run of 20 simulated trials gave 3 successes, an estimate of 0.15. A separate run of 10,000 trials from the same model gave 2,335 successes, or 0.2335. Same model both times, and the longer run lands closer.

The misreading: my simulation gave 0.15, so the probability is 0.15. An estimate from nn trials has standard deviation p(1p)/n\sqrt{p(1-p)/n}, which at p=0.24p = 0.24 and n=20n = 20 is 0.096. Two standard deviations either side of 0.24 spans roughly 0.05 to 0.43, so a 20-trial run landing on 0.15 is unremarkable. Reporting it as the answer treats a number with that much slop as exact.

Precision improves slowly, and the square root is why. The standard deviation falls with n\sqrt{n}, so halving the error takes four times the trials and cutting it to a tenth takes a hundred times: 0.043 at 100 trials, 0.0043 at 10,000.

The harder limit is the model. That simulation tells you what a 70 percent shooter would do. It cannot tell you whether this player is a 70 percent shooter, and if she is really at 0.60 then every figure it produced answers the wrong question. Topic 2.3 in the Fall 2026 course is Estimating Probabilities Using Simulation.

Where this comes up

More probability terms, or browse the full statistics glossary.