Previously, we estimated probability from results. If a player made 28 out of 40 free throws, we used that data to estimate their chance of making the next one.
What a simulation is
But sometimes the real experiment is slow, expensive, unsafe, or just annoying. In those cases, we can use a simulation instead.
Simulation
A simulation is a repeated model of a real chance situation. We use it to imitate the experiment many times and estimate the probability from the results.
The formula should feel familiar. It is the same idea as experimental probability. The difference is that the trials are simulated, often using a digital tool or random number generator, instead of physically performed.
Example: at least one head
Suppose we want to estimate the probability of getting at least one head in two coin flips. One simulated trial means two coin flips.
| Trial | Flip 1 | Flip 2 | At least one head? |
|---|---|---|---|
| 1 | H | T | Yes |
| 2 | T | T | No |
| 3 | H | H | Yes |
| 4 | T | H | Yes |
If 78 out of 100 simulated trials had at least one head, then:
This is an estimate. We could calculate this example exactly, but the point here is learning how simulations work.
Simulating multi-stage situations
Simulations become especially useful when the situation has stages, or when the exact probability is not obvious straight away.
Example: will the bus be late?
Imagine there is a chance of heavy rain tomorrow. If it rains, the bus is late of the time. If it does not rain, the bus is late of the time.
Simulate weather
rain or no rain
Simulate bus result
late or on time
Record the day
count if late
A simulation could model one day by first deciding whether it rains, then deciding whether the bus is late. After many simulated days, we estimate:
Making a simulation trustworthy
A simulation is only useful if it matches the real situation. If the real chance of rain is , then the simulation should use , not a coin flip with .
A good simulation should match
- the possible results in the real situation
- the probabilities in the real situation
- what counts as one trial
- the event we are trying to estimate
Like experimental probability, simulations give estimates, not exact guarantees. More trials usually give a steadier estimate, but the result can still be a bit different each time.
Key points
- A simulation imitates a chance situation.
- We use simulations when the real experiment is hard to repeat.
- Estimated probability is event happened divided by simulated trials.
- A simulation must match the real situation to be useful.
- More trials usually give a more reliable estimate.