Lesson 127 — Running Simulations with Digital Tools
Strand: Probability | Descriptor: AC9M7P02 | Duration: 45 minutes
Room/equipment: devices with spreadsheet software (as Lessons 80, 92 and 112).
Learning Intentions
- To use a spreadsheet to simulate a chance experiment many times.
- To use large-scale simulation to estimate probabilities.
Success Criteria
I can:
- Use
RANDBETWEENto simulate a die roll or coin toss. - Fill a simulation down to run hundreds of trials at once.
- Count outcomes with
COUNTIFand calculate relative frequency. - Compare simulated results with theoretical probability.
Warmup
(6 minutes — why simulate? whole class)
Yesterday the class tossed coins by hand — perhaps
- How long would
tosses take by hand? - Why might anyone want that many?
- What could a computer do differently?
- Would a computer’s results be real chance?
Answers: 1. At two seconds each, over
Q4 is worth one honest sentence: spreadsheet random numbers are produced by a formula, so they are not truly random. For simulating dice and coins they behave well enough that the distinction does not matter here — but it is a real distinction, and cryptographers care about it enormously.
Activities
Activity 1 — Guided Build: Simulating a Die (16 min)
Teacher-led; students follow.
Stage 1 — one roll. In cell A2:
=RANDBETWEEN(1,6)
Press F9 (or the recalculate key) a few times and watch it change. Name the function: RANDBETWEEN(low, high) returns a whole number from low to high, each equally likely.
Stage 2 — many rolls. Fill A2 down to A601 — 600 simulated rolls in one drag.
Stage 3 — count the outcomes. In columns C and D:
| C | D | |
|---|---|---|
| 1 | Result | Count |
| 2 | 1 | =COUNTIF($A$2:$A$601,C2) |
| 3 | 2 | =COUNTIF($A$2:$A$601,C3) |
| … | … | fill down |
| 7 | 6 | |
| 8 | Total | =SUM(D2:D7) |
The $ signs matter — the range must not slide as the formula fills down (Lesson 92’s lock). The total must read
Stage 4 — relative frequencies. In column E: =D2/600, filled down. Compare each with
Press recalculate several times and watch. The counts jump around
Stage 5 — change the scale. Repeat with only
(Expect: with
Activity 2 — Simulation Tasks (14 min)
Pairs. Each task is a simulation plus a comparison with theory.
Task 1 — the coin. Simulate =RANDBETWEEN(0,1), where
- Count the heads with
=COUNTIF(…)and find the relative frequency. - Recalculate five times, recording each result.
- How much does the relative frequency vary?
Task 2 — the biased spinner. A spinner has =RANDBETWEEN(1,10), treating
- Use
=COUNTIF(range,"<=3")to count reds. - Find the relative frequency and compare with the theoretical
.
Task 3 — the drawing pin. Yesterday’s pin gave an estimated
- If your estimate was
, use =RANDBETWEEN(1,100)and count values. - Compare the simulated relative frequency with your experimental estimate.
- What does the simulation not tell you about the real pin?
Socratic scaffolding for Task 3 Q8:
| Prompt | Purpose |
|---|---|
| What probability did the simulation use? | The one we supplied — |
| Where did | Yesterday’s |
| So can the simulation check whether | No. It can only show what would happen if |
| What would test the real probability? | More physical drops. |
| So what are simulations good for? | Exploring the consequences of an assumed probability, quickly and at scale. |
| Looking back | A simulation is only as good as the probability it is given — the same lesson as Lesson 80’s spreadsheets. |
(Answers: 1–3. Relative frequencies typically
Activity 3 — Inquiry: how Many Trials Are Enough? (7 min)
Pairs, using the die simulation.
Set up one simulation and vary only the number of rolls.
- Run
rolls. Record the relative frequency of sixes. Recalculate five times. - Repeat with
rolls, then , then . - For each, record the highest and lowest relative frequency you saw across five recalculations.
- What happens to the spread of the results as trials increase?
- How many trials would you want to estimate a probability to within
?
Socratic scaffolding:
| Prompt | Purpose |
|---|---|
| At | Often |
| At | Typically |
| What is shrinking? | The variability of the estimate, not the probability itself. |
| Q5: to get within | Thousands — students should see the order of magnitude, not a formula. |
| Does more data make the probability more accurate? | The probability never changes. More data makes our estimate of it more reliable. |
| Looking back | Exactly Lesson 120’s point: more trials fix chance variation. They do not fix a wrong model. |
Checks for Understanding
(5 minutes — exit ticket, on paper)
- Write the formula to simulate one roll of a standard die.
- Write the formula to simulate a coin toss.
- Write a formula to count how many cells in A2:A501 contain a
. - A simulation of
die rolls gives sixes. Find the relative frequency and compare with theory. - Reasoning. A simulation of a drawing pin used
taken from an experiment. Explain what the simulation can and cannot tell you.
Answers: 1. =RANDBETWEEN(1,6); 2. =RANDBETWEEN(0,1) (or (1,2)); 3. =COUNTIF(A2:A501,6); 4.
Common Misconceptions
| Misconception | How to pre-empt it |
|---|---|
| Believing a simulation proves the probability it was given. | Task 3 Q8 and exit Q5. |
| Expecting simulated counts to be exactly equal. | Recalculating repeatedly shows them jumping. |
Forgetting the $ locks, so counting ranges slide. | Carried from Lesson 92; the total-check catches it. |
| Thinking spreadsheet randomness is true randomness. | The warmup’s honest one-sentence caveat. |
| Believing more trials change the probability. | The inquiry — the probability is fixed; the estimate improves. |
| Trusting a simulation without a by-hand sanity check. | Lesson 80’s rule: compare against theory. |
Enrichment — Competition-Style Problems
E1 (Kangaroo style). =RANDBETWEEN(1,20) is used
Answer
E2 (AMC Junior style). To simulate an event with probability =RANDBETWEEN(1,100). Which values should count as the event occurring?
Answer
E3 (Challenge). How would you simulate a spinner with
Answer
=RANDBETWEEN(1,10): count COUNTIF(range,"<=5"), COUNTIFS(range,">=6",range,"<=8") and COUNTIF(range,">=9").
E4 (Challenge). A simulation of
Answer
The first.
E5 (Challenge). Why can a simulation never tell you whether a real physical die is fair?
Answer
A simulation uses whatever probabilities we program into it. Telling it the die is fair makes it behave fairly; the output reflects our assumption, not the physical die. Only rolling the actual die many times can test its fairness. (The same trap as Lesson 80’s spreadsheets — the machine computes what you asked, not what is true.)
Homework
(Paper-based; no devices assumed.)
- Write the formula to simulate: (a) a die roll (b) a coin toss (c) a spinner with
sectors (d) a random number from to . - To simulate an event with probability (a)
(b) (c) using =RANDBETWEEN(1,12)where possible — state which values count as the event. - Write a formula to count values equal to
in the range B2:B801. - Write a formula to count values less than or equal to
in the same range. - A simulation of
die rolls gives these counts: , , , , , . (a) Check the total. (b) Find the relative frequency of s. (c) Comment on how close the counts are to expectation. - A simulation of
spins of a -red-in- spinner gives reds. Find the relative frequency and compare with theory. - Explain how you would simulate a bag of
red, blue and yellow counter. - Reasoning. Explain why a simulation cannot verify the probability it was given.
- Reasoning. Explain why simulated results differ each time you recalculate, even though the probability does not change.
- Challenge. Design a simulation to estimate how many die rolls are typically needed before a six appears. Describe the procedure and what you would record.
Answers: Q1 — (a) =RANDBETWEEN(1,6) (b) =RANDBETWEEN(0,1) (c) =RANDBETWEEN(1,8) (d) =RANDBETWEEN(1,100). Q2 — (a) RANDBETWEEN(1,10), values =COUNTIF(B2:B801,3). Q4 — =COUNTIF(B2:B801,"<=4"). Q5 — (a) =RANDBETWEEN(1,10): =RANDBETWEEN(1,6) down a column; record the position of the first