In short
The probability of an outcome is the proportion of times it would happen in a very long series of repetitions. A simulation imitates a chance process with random numbers so you can estimate a probability without doing the real thing thousands of times. A good simulation description says how outcomes are represented, how one trial works, what is recorded, and how the probability is estimated from many trials.
What you need to know
- Explain probability as long-run relative frequency.
- Design a simulation that models a chance process, stating how random numbers represent outcomes.
- Estimate a probability from simulation results.
- Explain why more trials give a more reliable estimate.
Probability as long-run relative frequency
Flip a fair coin ten times and you might get seven heads. Flip it ten thousand times and the proportion of heads will be very close to 0.5. This is the law of large numbers: as the number of trials grows, the relative frequency of an outcome settles down to its probability. In the short run, chance behaviour is unpredictable; in the long run, it is regular.
Designing a simulation
A basketball player makes 70% of her free throws. What is the probability she makes all three in a game? Assume shots are independent. A simulation:
- Represent outcomes: let the digits 0–6 represent a made shot and 7–9 a miss (7 of 10 digits = 70%).
- Describe one trial: read three random digits (repeats allowed, because each shot is a fresh 70% chance).
- Record: whether all three digits are 0–6.
- Repeat and estimate: carry out many trials; the proportion of trials with all three made is the estimate.
| Trial | Digits | All made? |
|---|---|---|
| 1 | 3 0 5 | Yes |
| 2 | 8 2 6 | No |
| 3 | 1 1 4 | Yes |
| 4 | 6 9 0 | No |
| 5 | 2 5 3 | Yes |
| 6 | 7 7 1 | No |
| 7 | 0 4 6 | Yes |
| 8 | 5 8 2 | No |
| 9 | 4 3 9 | No |
| 10 | 6 1 2 | Yes |
Five of these ten trials had all three made, an estimate of 0.5. With so few trials the estimate is rough; the exact answer is , and 1,000 simulated trials would usually land within a few hundredths of it.
When simulation is useful
Simulation shines when the exact calculation is hard: the chance that a family with four children has at least two girls in a row, or how often a random sample would show a difference as big as one observed in a study. That second use is the heart of inference: later units compare an observed result with what chance alone would produce, often using a simulated distribution.
Key terms
- Probability
- The long-run relative frequency of an outcome in many repetitions of a chance process.
- Law of large numbers
- As the number of trials increases, the relative frequency of an outcome approaches its probability.
- Simulation
- Imitating a chance process with random numbers to estimate probabilities.
- Trial
- One repetition of the simulated chance process.
- Independent trials
- Trials where the outcome of one does not change the probabilities for another.
Common mistakes
Representing a 70% outcome with digits 1–7 out of 1–10 in a table of 0–9.
Use exactly 7 of the 10 digits 0–9, such as 0–6.
Ignoring whether repeats are allowed.
State it: repeats allowed for independent trials, not allowed when sampling without replacement.
Trusting an estimate from a handful of trials.
Use many trials; the estimate improves as the number of trials grows.
How this topic is tested
- Describe a simulation in four parts: assign digits, one trial, what to record, estimate from many trials.
- Say explicitly whether repeated digits are allowed and why.
- Report the estimate as a proportion of trials, e.g. 34 of 100 = 0.34.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 2 · Collect Data
A spinner lands on red 40% of the time. Which assignment of random digits 0–9 models one spin?
Question 2 · SP 3 · Analyze Data
In 200 simulated trials, an event occurred 46 times. What is the estimated probability?
Question 3 · SP 4 · Interpret Results
A gambler has lost 8 roulette spins in a row and says a win is 'due'. What is wrong with this reasoning?
Question 4 · SP 2 · Collect Data
To simulate choosing 3 different students at random from a class of 25, labelled 01–25, using two-digit random numbers, you should:
Question 5 · SP 4 · Interpret Results
Why do more simulated trials give a better estimate?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Practices 2 and 3 · 4 points
A cereal company puts one of 5 different toys, equally likely, in each box. Hari buys 4 boxes. He wants to estimate the probability that he gets 4 different toys.
- (a) Describe how to use random digits to carry out one trial.
- (b) In 100 trials, 19 gave four different toys. Estimate the probability and interpret it.
Scoring guide: one point for each of the following
Part (a)
- Assign digits to toys, e.g. 0–1 toy A, 2–3 toy B, 4–5 toy C, 6–7 toy D, 8–9 toy E (each 2/10 = 1/5).
- Read 4 digits, allowing repeats (each box is independent), and record whether all four toys are different.
Part (b)
- Estimated probability = 19/100 = 0.19.
- If Hari bought 4 boxes many times, he would get 4 different toys in about 19% of those purchases.
Connected topics
Frequently asked questions
Does a simulation give the exact probability?
No, it gives an estimate. More trials make it more accurate, but exact answers come from probability rules.
Can I use a calculator's random integer command?
Yes. Say what range of integers you generate and what each represents.
What is the exact answer to the toy question?
It is (5 × 4 × 3 × 2)/5⁴ = 120/625 = 0.192, close to the simulated 0.19.