Not sure which lesson to do first? Find your level and get a plan →

Statistics · Grade 9-12

Statistical Simulation

Statistical Simulation uses random number generation to imitate a real-world chance process and estimate a probability that's difficult to calculate exactly — you run the scenario many times and take the fraction of successes, p^=successes/n, as your estimate.


Quick Answer

Statistical Simulation uses random number generation to imitate a real-world chance process and estimate a probability that's difficult to calculate exactly — you run the scenario many times and take the fraction of successes, p^=successes/n, as your estimate. Use it when the exact calculation is messy or unknown, such as collecting a full set of cards or a game with many rounds. A trustworthy simulation needs random numbers that match the real probabilities, an exact rule for success, and many trials: with n trials, the estimate is usually within about 1/n of the true value.

Why This Matters

Simulation lets you answer probability questions you cannot yet solve on paper, and check the ones you can. A computer can play 10,000 seasons, shuffle 10,000 decks or fill 10,000 rooms with random birthdays in a second. Forecasters, engineers and statisticians use it to see the range of things that could happen and to judge whether a result could be luck. A badly built model, with the wrong probabilities or too few trials, gives a confident-looking wrong number.

Intuitive Explanation

A cereal brand hides one of 4 different cards in each box, each equally likely. How many boxes until you have all 4? The exact answer takes some clever algebra, but a simulation needs only one random digit from 1 to 4 per box. Draw digits until all four have appeared and record how many boxes that took: 3, 1, 3, 4, 1, 2 is one trial lasting 6 boxes. Repeat 10,000 times and average the lengths; the result lands near 8.3 boxes, close to the exact value 253≈8.33. The fraction of trials that needed more than 10 boxes, about 0.22, estimates that probability too.

Three ingredients decide whether a simulation can be trusted. The random numbers must match reality: if one card is rare, say 1 box in 10, the digits must be weighted to match, or the model answers a different question. The rule for success must be exact. And the number of trials controls the wobble: with n trials a simulated probability is usually within about 1/n of the truth, so 100 trials give roughly ±0.10 and 10,000 trials roughly ±0.01.

A simulation is not an experiment with the real object. Dropping a real thumbtack 200 times measures the thumbtack; a computer cannot simulate the thumbtack until you tell it the chance of landing point-up, which you would have to get from real drops. Simulation combines known simple chances into answers about complicated events; it cannot discover the simple chances themselves.

Think of it like this. A simulation is a flight simulator for chance: instead of risking the real plane, you fly a model of it thousands of times and count how often things go wrong. The results are only as good as the model; a simulator with the wrong wind settings trains you for the wrong weather.

Core idea. When a chance process is too tangled to calculate, act it out with random numbers that match its real probabilities, repeat it many times, and use the fraction of successful trials as the estimate; more trials make the estimate steadier.


When to Use

Use simulation when a probability or average is hard to calculate exactly but easy to act out with random numbers: waiting times, collecting a full set, games with many rounds, long runs of heads. Problems that say simulate, 'use random digits' or 'run 1,000 trials' call for it. Use Basic Probability or counting rules when an exact formula is within reach, Experimental Probability when the data come from a real physical experiment, and Random Sampling when the task is choosing whom to survey.

Tip. Ask: Is the exact chance too messy to count, so you would model the process with random numbers and repeat it many times?

How to Recognize It

Before building a simulation, decide whether exact counting is practical and whether each random step can be imitated faithfully.

  1. Would an exact count or formula be long, messy or unknown, as with collecting all 6 toys from cereal boxes?

    Yes is the reason to simulate. If a short count works, like the chance of doubles with two dice, Theoretical Probability gives the exact answer faster.

  2. Can each random step be imitated by a device whose chances match reality, such as digits 0 to 9 for a 70% shooter?

    Yes means a valid model is possible: let 0 to 6 be a make and 7 to 9 a miss. If you cannot pin down the real chances, the simulation has nothing true to imitate.

  3. Is the plan to run a model on a computer or with random digits, rather than the real object?

    Yes makes it a simulation. Rolling the real die 200 times is a physical experiment, and its result is an Experimental Probability.

  4. Are the random numbers imitating a chance process rather than picking people for a survey?

    Imitating a process is simulation. Using random numbers to choose 50 names from a school list is Random Sampling, which gathers real data instead of modelling it.

Statistical Simulation vs Experimental Probability vs Theoretical Probability vs Random Sampling

Simulations produce a fraction of successes and use random numbers, so they look like experiments, exact calculations or surveys. Ask what is being repeated or chosen: a model of the process, the real process, nothing at all, or real people.

Statistical Simulation

Meaning
A statistical simulation repeats a random-number model of a chance process many times and uses the fraction of successes as an estimate.
Key test
Repeats a model, not the real thing; accuracy depends on the model and the run count.
Formula
p^=successesn
Example
Generating 23 random birthdays 10,000 times to estimate the chance that at least two match, which comes out near 0.51.

Experimental Probability

Meaning
Experimental probability is the fraction of successes in trials of the real object or event.
Key test
Repeats the real process; nothing has to be modelled.
Formula
P^(E)=real successesreal trials
Example
Dropping an actual paper cup 100 times and counting how often it lands upright.

Theoretical Probability

Meaning
Theoretical probability is the exact chance found by reasoning about equally likely outcomes, with no trials of any kind.
Key test
No repetition and no randomness in the work; the answer is exact.
Formula
P(E)=∣E∣∣S∣
Example
The chance of a sum of 7 with two fair dice is exactly 636=16.

Random Sampling

Meaning
Random sampling uses chance to choose which members of a real population are measured, so every member has an equal chance of selection.
Key test
Random numbers pick real people or items, whose data are then collected.
Example
Numbering 800 students and using a random number generator to choose 40 of them for a survey.

Formula & Notation

How to read it: Simulations use n for the number of trials, p for the probability of success per trial, and the proportion of successes p^=successesn as the estimate.

Worked Examples

Example 1 — Free throws with random digits

Easy

A basketball player makes 70% of her free throws, and each shot is independent. Estimate the probability that she makes at least 2 of her next 3 shots, using random digits with 0-6 as a make and 7-9 as a miss. Use these ten trials: 481, 793, 056, 274, 918, 330, 629, 587, 142, 805.
Show the steps and the answer
  1. Check the model: the digits 0-6 are 7 of the 10 digits, so each digit is a make with probability 0.7.

    The random numbers must match the real probability, or the simulation estimates something else.

  2. Count the makes in each trial: 481 → 2, 793 → 1, 056 → 3, 274 → 2, 918 → 1, 330 → 3, 629 → 2, 587 → 1, 142 → 3, 805 → 2.

    Each 3-digit group is one set of 3 shots, and each digit from 0 to 6 is a make.

  3. Count the successes, trials with at least 2 makes: 7 of the 10, so p^=710=0.7.

    The estimate is the fraction of trials in which the event happened.

  4. Judge the precision: with n=10 the estimate can easily be off by about 1/10≈0.3.

    Ten trials show how the method works, but a real estimate needs thousands.

  5. Compare with the exact value: 3(0.7)2(0.3)+0.73=0.441+0.343=0.784.

    Here an exact answer exists, so it can test the simulation; the gap of 0.084 is well within the wobble of 10 trials.

Answer: From these ten trials, the estimate is 0.7. The exact probability is 0.784, and more trials would bring the estimate closer.

Takeaway: Match the digits to the real probability, score each trial with an exact rule, and judge the estimate by how many trials it used.

Example 2 — A simulation that only returns its own assumption

Standard

Lina wants the probability that a thumbtack lands point-up. She has a computer produce 0 or 1 with equal chances 10,000 times, calls 1 'point-up', and gets 0.501. Her friend dropped a real tack 200 times and saw 124 point-up landings. What is wrong with Lina's method, and what is the better estimate?
Show the steps and the answer
  1. Look at what the computer was told: 0 and 1 equally likely, which is the assumption P(point-up)=0.5.

    A simulation can only return the probabilities that were built into it.

  2. Read Lina's result in that light: 0.501 is within the expected wobble of 1/10000=0.01 around 0.5.

    The 10,000 trials measured her assumption precisely, not the thumbtack.

  3. Use the real drops: 124200=0.62.

    A lopsided object's chance has to come from experiments with the object itself.

  4. Simulate only after that, using 0.62, for questions such as how often 10 drops give 8 or more point-up.

    Simulation is good at combining a known chance into complicated events; it cannot find the basic chance.

Answer: Lina's simulation just repeats her guess of 0.5. The better estimate is the experimental probability from real drops, 124/200 = 0.62.

Takeaway: A simulation is only as good as the probabilities fed into it; get those from reasoning or real data first.

Example 3 — Find the mistake: an estimate reported as exact

Application

To find P(at least one 6 in four rolls of a die), Ana runs 20 simulated trials, sees at least one 6 in 12 of them, and writes: "The probability is exactly 0.6." Find the mistake and correct it.
Show the steps and the answer
  1. Name what 12/20 is: p^=0.6, an estimate from 20 trials, not an exact value.

    Another set of 20 trials could easily give 9 or 14 successes.

  2. Size the wobble: 1/20≈0.22, so the truth could be anywhere from about 0.38 to 0.82.

    Twenty trials leave a very wide range of plausible values.

  3. Fix the precision: 10,000 trials would shrink the wobble to about 1/10000=0.01.

    The wobble shrinks with the square root of the number of trials.

  4. Compare with the exact value: P(no 6 in four rolls)=(5/6)4=6251296≈0.482, so P(at least one 6)≈0.518.

    The truth lies inside the wide range from 20 trials, but 0.6 was off by about 0.08.

Answer: The probability is about 0.52 (exactly 1−(5/6)4≈0.518). Ana's 0.6 is a rough estimate from only 20 trials and should be reported as approximate, after running many more trials.

Takeaway: Report a simulated probability as an estimate, and use enough trials that its wobble, about 1/n, is small enough for the question.

Where You'll See It

  • Estimating a hard board-game probability

    To find the chance of rolling a full house in a dice game, instead of complex counting you can program the dice roll, repeat it 100,000 times, and use the fraction of full houses as an estimate.

  • Free-throw streak in a video game

    If a game character makes 70% of free throws, simulating 10,000 sets of 5 shots estimates how often they sink all 5 — useful when the exact formula is forgotten or messy.

  • Birthday-match party trick

    To check whether two people in a group of 30 likely share a birthday, you can randomly generate 30 birthdays many times and count how often a match appears, approximating the real probability without algebra.

Common Mistakes

  1. The slip: A simulation gives the exact, true probability.

    Why it's tempting: Big numbers and a computer feel authoritative and precise.

    Instead: A simulation gives an estimate that wobbles around the true value; the estimate only gets reliably close as the number of trials grows large (and never is guaranteed exact).

  2. The slip: A few dozen runs is enough to trust the result.

    Why it's tempting: Students see a clean-looking percentage after 20 trials and stop.

    Instead: Too few trials gives a noisy estimate. Use thousands+ of trials so random fluctuation shrinks; report it as approximate, not exact.

  3. The slip: As long as I 'pick' numbers myself, the simulation is random.

    Why it's tempting: Hand-picked or patterned numbers feel arbitrary enough to count as random.

    Instead: Each trial must use a genuine random mechanism (RNG, dice, random digit table) that correctly matches the real probabilities; biased or patterned inputs invalidate the estimate.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Design a simulation with random digits 0 to 9 for a player who makes 70% of her free throws. Which digits stand for a make, and how do you run one trial of 5 shots?

    Hint: Seven of the ten digits should mean a make.

  2. A simulation of a carnival game ran 500 trials and produced 85 wins. Estimate the probability of winning, and the number of wins to expect in 60 real games.

    Hint: Turn the win count into a proportion, then scale it to 60 games.

  3. Each cereal box holds one of 4 equally likely toys. Digits 1 to 4 stand for the toys, and other digits are skipped. One trial reads 3, 1, 3, 4, 2. How many boxes did this trial take to collect all 4 toys?

    Hint: Go through the digits in order and mark each new toy.

  4. In 50 simulated trials of the toy collection, the number of boxes needed was 4 in 5 trials, 5 to 7 in 20 trials, 8 to 10 in 15 trials and 11 or more in 10 trials. Estimate P(more than 7 boxes).

    Hint: Which groups of trials needed more than 7 boxes?

  5. You want P(sum of 7) when two number cubes are rolled. Should you simulate 1,000 rolls, or calculate it?

    Hint: Can you list all the equally likely outcomes easily?

  6. Jules simulated a dice game 12 times, got 4 wins and wrote, "The probability of winning is exactly 13." Correct the claim.

    Hint: Think about how many trials were run, and whether a simulation can give an exact value.

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Can a simulation be run with dice or cards instead of a computer?

Yes, any device whose chances match the model works. A coin can stand for a 50% event, a die for a one-in-six event, and a table of random digits for any chance in tenths or hundredths, such as 00 to 34 for a 35% event. Computers are simply faster: a class might run 50 trials by hand in a lesson, while a laptop runs a million in seconds.

What is a Monte Carlo method?

It is the name scientists use for a simulation, after the casino in Monaco. Scientists at Los Alamos in the late 1940s used random numbers to estimate how neutrons travel through material, a problem with far too many possible paths to count. Today the same idea prices financial products, produces ranges for weather forecasts and tests how traffic-light timing affects congestion.

If my simulation and the exact answer disagree, which should I trust?

Compare the gap with the number of runs. With 1,000 runs, an estimate typically misses the true chance by up to about 0.03, so 0.48 against an exact 0.50 is normal noise. A gap of 0.10 suggests a mistake: a model chance set wrong, a success rule coded incorrectly, or an exact calculation that left out cases. Rerunning with more trials shows which side is off.

Can a simulation estimate an average, not just a probability?

Yes. Record the quantity you care about in each run and average the results. To estimate how many cereal boxes it takes on average to collect all 6 toys, simulate many collections, note how many boxes each one needed, and average them; the result settles near the exact value of 14.7 boxes. This links simulation to Expected Value.

Learning Path

Statistical Simulation

You are here

Next →

Nothing after this yet
You need Basic Probability (a probability as a long-run share) and Random Sampling (using random numbers fairly) first. Simulation adds building a random model, running it many times, and judging the estimate's accuracy from the number of trials. From here you can tackle problems with no tidy formula, such as waiting times, queues and collecting sets, and later use simulation to judge whether a result in a study could be due to chance alone.

See Also