Solving Probability Problems Using Simulation (VCE SSCE Mathematical Methods): Revision Notes
Solving Probability Problems Using Simulation
What is simulation?
Simulation is a practical technique that helps us estimate probabilities when problems are too difficult to solve using direct mathematical methods. By running repeated random trials and recording the results, we can find approximate answers to complex probability questions.
Some probability problems cannot be solved easily with formulas alone. Simulation provides a way to get useful estimates in these situations by:
- Creating a model that represents the real situation
- Running the model many times
- Analysing the results to estimate the probability
The key advantage of simulation is that it allows us to tackle problems that would otherwise have no practical solution. When direct calculation becomes too complex or impossible, simulation offers a powerful alternative approach.
An example of using simulation
Let's work through a complete example to understand how simulation works in practice.
The problem
What is the probability that a family with six children will have at least four girls?
While there are mathematical methods to solve this exactly, we can estimate the answer using simulation instead.
Making assumptions
Before we can simulate, we need to make clear assumptions about the situation. For this problem, we assume:
- The probability of each child being female is
- The sex of each child is independent of the sex of the other children (meaning the probability of a female child is always , regardless of previous children)
Making Valid Assumptions
These assumptions allow us to create a simple model for the simulation. Without clearly stating our assumptions, the simulation results would be meaningless. Always identify and record your assumptions before beginning any simulation.
Setting up the simulation model
Since the probability of a female child is , we can use a fair coin as our simulation tool:
- Heads represents a female child
- Tails represents a male child
One trial consists of tossing the coin six times (representing one family with six children). The result of each trial is the number of heads obtained.
Conducting trials
Here's what five example trials might look like:
| Trial number | Simulation results | Number of heads |
|---|---|---|
| 1 | T H H T T H | 3 |
| 2 | H H H T H T | 4 |
| 3 | H H H T H H | 5 |
| 4 | H T T T H T | 2 |
| 5 | H T H H H H | 5 |
Notice that even though the probability of heads is , the actual number of heads varies considerably from trial to trial. This variation is normal and expected in random experiments.
To get a reliable estimate, we need to conduct many more trials. A good rule is to perform at least 50 trials.
Results from 50 trials
After completing 50 trials of tossing the coin six times, we might obtain these results:

This table shows us that:
- 0 heads occurred 1 time
- 1 head occurred 5 times
- 2 heads occurred 12 times
- 3 heads occurred 15 times
- 4 heads occurred 13 times
- 5 heads occurred 3 times
- 6 heads occurred 1 time
Interpreting the results
We wanted to find the probability of getting at least four girls (at least four heads). Looking at our results:
- 4 heads: 13 times
- 5 heads: 3 times
- 6 heads: 1 time
- Total: times
Therefore, we estimate the probability as:
Since this probability was estimated experimentally, repeating the simulation would give a slightly different result. However, we would expect to get approximately this value most of the time. The more trials we conduct, the more reliable our estimate becomes.
Further examples of using simulation
Simulation can also estimate other quantities of interest, such as average values, maximum values, or the number of attempts needed to achieve a certain outcome.
Worked Example: Pizza Shop Cards Problem
Problem: A pizza shop gives away football cards with each pizza bought. There are six different cards available, and a fan decides to continue buying pizzas until all six cards are obtained. How many pizzas will need to be bought, on average, to obtain the complete set?
Solution:
Setting up the model:
Since there are six different outcomes (six different cards), we can use a fair six-sided die for the simulation:
- Each face of the die (1, 2, 3, 4, 5, 6) represents one of the six different cards
- Rolling the die represents buying one pizza and receiving a card
This model assumes that:
- All six cards occur with equal frequency (each has probability )
- The card obtained with one pizza is independent of the cards obtained with other pizzas
Conducting one trial:
One trial consists of rolling the die repeatedly until all six numbers (1, 2, 3, 4, 5, 6) have appeared at least once. The result is the number of rolls needed.
Here's an example of one trial:
5 2 5 2 2 2 3 3 1 2 6 3 5 4
In this trial, 14 rolls were needed before all six numbers appeared. However, this is just one outcome - we need multiple trials to estimate the average.
Results from 50 trials:
After conducting 50 trials, we might obtain these results (each number represents how many pizzas were bought in that trial):

Calculating the average:
To estimate the average number of pizzas needed, we calculate the mean of all trial results:
Therefore, we estimate that approximately 15 pizzas would need to be bought, on average, to collect the complete set of six cards.
Using technology to generate random numbers
While coins and dice work well for simple simulations, many situations require more flexibility. For example, if we needed to simulate collecting eight different souvenirs rather than six, we would need to generate random integers from 1 to 8.
Technology allows us to:
- Generate any range of random numbers
- Conduct many more trials quickly
- Handle more complex simulations
Here's how to use calculators to generate random numbers:
Using the TI-Nspire calculator

Setting the random seed:
- In a Calculator page, go to menu > Probability > Random > Seed
- Enter the last 4 digits of your phone number (or any 4-digit number)
- This ensures your random numbers differ from the calculator default
Generating random numbers between 0 and 1:
- Use menu > Probability > Random > Number
- The command rand() generates a random decimal between 0 and 1
Generating random integers:
- Use menu > Probability > Random > Integer
- For example, randInt(2, 4, 5) generates five random integers between 2 and 4 inclusive
- The format is: randInt(minimum, maximum, quantity)
Using the Casio ClassPad calculator
Accessing the catalog:
- In Main, press the Keyboard button
- Tap the symbol at the bottom of the left sidebar
- Select Catalog and scroll to the letter R
Generating random numbers between 0 and 1:
- Select rand() from the catalog
- Tap EXE
Generating random integers:
- Select rand() from the catalog
- Type the minimum and maximum values (e.g., rand(1, 6))
- Tap EXE multiple times to generate multiple random integers
Generating lists of random numbers:
- For random decimals: Select randList(), type the quantity (e.g., 10), tap EXE
- For random integers: Select randList(), type quantity, minimum, and maximum (e.g., randList(20, 1, 30)), tap EXE
Remember!
Key Points to Remember:
- Simulation estimates probabilities through repeated random trials when direct calculation is difficult or impossible
- Make clear assumptions about your model before starting (probabilities, independence, etc.)
- Define what constitutes a trial and what you're measuring in each trial
- Conduct at least 50 trials for reliable estimates - more trials give better accuracy
- Summarise results by calculating proportions (for probabilities) or averages (for quantities like "how many")
- Technology is powerful for generating random numbers and conducting many trials quickly