Simulations
Design and use simulations to estimate probabilities and compare results with theoretical values.
Worked examples
Estimating probability from simulation results
Straightforward
Problem
A simulation of spinning a four-section spinner (Red, Blue, Green, Yellow) was run 200 times. The results were:
| Colour | Frequency |
|--------|----------|
| Red | 54 |
| Blue | 68 |
| Green | 48 |
| Yellow | 30 |
Use the simulation results to estimate the probability of the spinner landing on each colour.
| Colour | Frequency |
|--------|----------|
| Red | 54 |
| Blue | 68 |
| Green | 48 |
| Yellow | 30 |
Use the simulation results to estimate the probability of the spinner landing on each colour.
1
Confirm the total number of trials.
Total trials ✓
2
Apply the formula for estimated probability.
3
Calculate the estimated probability for each colour.
4
Check that the estimated probabilities sum to 1.
Answer
, , ,
Comparing simulation estimate with theoretical probability
Moderate
Problem
A fair four-sided die (faces 1, 2, 3, 4) is rolled 80 times in a simulation. The number 1 appeared 26 times.
(a) Calculate the theoretical probability of rolling a 1.
(b) Find the expected frequency of rolling a 1 in 80 trials.
(c) Compare the simulation result with the expected frequency and explain any difference.
(a) Calculate the theoretical probability of rolling a 1.
(b) Find the expected frequency of rolling a 1 in 80 trials.
(c) Compare the simulation result with the expected frequency and explain any difference.
1
Find the theoretical probability of rolling a 1.
The die has 4 equally likely outcomes. Only one face shows 1.
2
Calculate the expected frequency in 80 trials.
3
Calculate the simulation estimate of P(rolling a 1).
4
Compare the simulation result with the theoretical probability and explain.
The simulation gave 26 ones (estimated probability 0.325), while the expected number was 20 (theoretical probability 0.25). The difference is due to **random variation** — in any finite number of trials, results are unlikely to match the theoretical probability exactly. Running a larger number of trials (for example, 8000 instead of 80) would bring the simulation estimate closer to 0.25.
Answer
(a) (b) Expected frequency (c) The simulation estimate (0.325) differs from the theoretical probability (0.25) due to random variation; more trials would reduce this difference.
Designing a simulation
Challenging
Problem
A student wants to estimate the probability that **at least one** of two independent coin flips lands heads, where each flip has . Design a complete simulation using random digits 0–9, run 10 example trials, and use the results to estimate the probability.
1
Choose a tool and state the mapping.
**Tool:** Random digits 0–9 from a random number table.
**Mapping:** Digits 0–4 represent heads; digits 5–9 represent tails. Each flip has ✓
**Mapping:** Digits 0–4 represent heads; digits 5–9 represent tails. Each flip has ✓
2
Describe the trial structure.
Each trial uses **two consecutive digits** — one for each coin flip.
- If at least one digit is in the range 0–4 (heads), record the trial as **success** (at least one head).
- If both digits are in the range 5–9 (tails), record the trial as **failure** (no heads).
- If at least one digit is in the range 0–4 (heads), record the trial as **success** (at least one head).
- If both digits are in the range 5–9 (tails), record the trial as **failure** (no heads).
3
State the number of trials and how results will be analysed.
Run **100 trials** (200 digits total).
4
Work through 10 example trials using the digits: 7, 3, 6, 8, 0, 2, 9, 1, 5, 4, 7, 6, 3, 5, 8, 2, 0, 9, 6, 3.
| Trial | Digit 1 | Digit 2 | Outcome |
|-------|---------|---------|--------|
| 1 | 7 (T) | 3 (H) | Success |
| 2 | 6 (T) | 8 (T) | Failure |
| 3 | 0 (H) | 2 (H) | Success |
| 4 | 9 (T) | 1 (H) | Success |
| 5 | 5 (T) | 4 (H) | Success |
| 6 | 7 (T) | 6 (T) | Failure |
| 7 | 3 (H) | 5 (T) | Success |
| 8 | 8 (T) | 2 (H) | Success |
| 9 | 0 (H) | 9 (T) | Success |
| 10 | 6 (T) | 3 (H) | Success |
|-------|---------|---------|--------|
| 1 | 7 (T) | 3 (H) | Success |
| 2 | 6 (T) | 8 (T) | Failure |
| 3 | 0 (H) | 2 (H) | Success |
| 4 | 9 (T) | 1 (H) | Success |
| 5 | 5 (T) | 4 (H) | Success |
| 6 | 7 (T) | 6 (T) | Failure |
| 7 | 3 (H) | 5 (T) | Success |
| 8 | 8 (T) | 2 (H) | Success |
| 9 | 0 (H) | 9 (T) | Success |
| 10 | 6 (T) | 3 (H) | Success |
5
Calculate the simulation estimate and compare with the theoretical probability.
8 successes out of 10 trials:
Theoretical probability:
The simulation estimate (0.8) is close to the theoretical value (0.75). With 100 or more trials, the estimate would be more reliable.
Theoretical probability:
The simulation estimate (0.8) is close to the theoretical value (0.75). With 100 or more trials, the estimate would be more reliable.
Answer
Simulation design: use digits 0–4 = heads, 5–9 = tails; two digits per trial; record success if at least one digit is 0–4; run 100 trials; estimate successes 100. Theoretical .
Practise
Q1·Straightforward
A simulation of 100 coin flips showed heads on 43 occasions. Use the simulation results to estimate as a decimal.
Explanation
Using the simulation results:
Q2·Straightforward
A spinner with four coloured sections was spun 200 times in a simulation. The colour blue appeared 52 times. Use the simulation results to estimate as a decimal.
Explanation
Using the simulation results:
Q3·Straightforward
A simulation uses random digits 0–9, where digits 0, 1 and 2 represent 'success' and digits 3–9 represent 'failure'. In 150 trials, 'success' occurred 48 times. Use the simulation results to estimate as a decimal.
Explanation
Using the simulation results:
Q4·Straightforward
A bag contains red and blue counters. A simulation of 80 draws with replacement produced 32 red results. Use the simulation results to estimate as a decimal.
Explanation
Using the simulation results:
Q5·Moderate
A fair six-sided die is simulated 120 times. In the simulation, the number 3 appeared 24 times, giving an estimated probability of . What is the **theoretical** probability of rolling a 3 on a fair die? Give your answer as a fraction.
/
Explanation
A fair die has 6 faces, each equally likely. There is only one face showing 3, so:
The simulation estimate of 0.2 differs slightly from the theoretical value of due to random variation.
The simulation estimate of 0.2 differs slightly from the theoretical value of due to random variation.
Q6·Moderate
A simulation of 240 trials produced 75 successes, giving an estimated probability of . The theoretical probability of success is 0.3. How many successes would be **expected** in 240 trials based on the theoretical probability?
Explanation
Expected frequency =
The simulation gave 75 successes, which differs from the expected 72 due to random variation.
The simulation gave 75 successes, which differs from the expected 72 due to random variation.
Q7·Moderate
A student simulates flipping a fair coin 50 times and gets 22 heads. The theoretical probability of heads is 0.5. Which statement **best** explains why the simulation result () differs from 0.5?
Explanation
In any simulation with a finite number of trials, results will vary around the theoretical probability due to chance. A result of 22 heads out of 50 (0.44) is well within the expected range of variation for a fair coin. As the number of trials increases, the simulation estimate tends to get closer to the theoretical probability of 0.5.
Q8·Moderate
A student runs a simulation of 50 trials to estimate and gets an estimate of 0.46. They then increase the number of trials to 5000. What will most likely happen to the simulation estimate?
Explanation
Increasing the number of trials reduces the influence of random variation. Although the estimate will not necessarily become exactly equal to the theoretical probability, it will tend to get closer to it. This is the reason simulations are run with large numbers of trials — to improve reliability.
Q9·Challenging
A student wants to simulate an event where using random digits 0–9. Which mapping correctly models the situation?
Explanation
There are 10 equally likely digits (0–9). To model , exactly digits must represent success.
- **A:** Digits 0–5 = 6 digits ✓
- B: Digits 0–6 = 7 digits ✗
- C: Even digits (0, 2, 4, 6, 8) = 5 digits ✗
- D: Digits 1–5 = 5 digits ✗
Option A is the only correct mapping.
- **A:** Digits 0–5 = 6 digits ✓
- B: Digits 0–6 = 7 digits ✗
- C: Even digits (0, 2, 4, 6, 8) = 5 digits ✗
- D: Digits 1–5 = 5 digits ✗
Option A is the only correct mapping.
Q10·Challenging
A student writes: *"I will roll a six-sided die 100 times. If I roll a 1 or 2, I record a success."* This description is incomplete. What is **missing**?
Explanation
A valid simulation design must state:
1. **Tool** — a six-sided die ✓
2. **Mapping** — rolling 1 or 2 = success ✓
3. **Number of trials** — 100 ✓
4. **Analysis** — how to calculate the estimated probability from the results ✗ (missing)
The student should add something like: "After 100 rolls, divide the number of successes by 100 to estimate ."
1. **Tool** — a six-sided die ✓
2. **Mapping** — rolling 1 or 2 = success ✓
3. **Number of trials** — 100 ✓
4. **Analysis** — how to calculate the estimated probability from the results ✗ (missing)
The student should add something like: "After 100 rolls, divide the number of successes by 100 to estimate ."
Q11·Challenging
A student uses a random number table with two-digit numbers to simulate randomly selecting a letter from the 26-letter English alphabet. They assign letters A–Z to numbers 01–26. Numbers such as 27, 58 and 00 also appear in the table. What should the student do when these numbers appear?
Explanation
Because only numbers 01–26 correspond to the 26 letters of the alphabet, numbers outside this range (such as 27–99 and 00) do not represent a valid outcome. The standard procedure is to **skip** these values and move to the next number in the table. Including them would distort the simulation by introducing extra trials that do not represent any letter.
Q12·Challenging
Two independent events, and , have and . A student wants to simulate one trial to estimate .
**Method 1:** Use two random digits per trial — the first digit models (digits 0–4 = occurs; digits 5–9 = fails), the second digit models (digits 0–3 = occurs; digits 4–9 = fails). Record success if both digits indicate their event occurred.
**Method 2:** Use one random digit per trial — digits 0–1 represent both and occurring; digits 2–9 represent at least one event failing.
Which statement is correct?
**Method 1:** Use two random digits per trial — the first digit models (digits 0–4 = occurs; digits 5–9 = fails), the second digit models (digits 0–3 = occurs; digits 4–9 = fails). Record success if both digits indicate their event occurred.
**Method 2:** Use one random digit per trial — digits 0–1 represent both and occurring; digits 2–9 represent at least one event failing.
Which statement is correct?
Explanation
**Method 1:** Simulates each event with a separate digit. ✓ and ✓. Success is recorded only when both conditions are met. This correctly models two independent events.
**Method 2:** Since and are independent, . Using digits 0–1 gives ✓. This shortcut is valid for independent events.
Both methods correctly model the situation.
**Method 2:** Since and are independent, . Using digits 0–1 gives ✓. This shortcut is valid for independent events.
Both methods correctly model the situation.