Lesson 10

Simulations and estimating probability

Theory and examples

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.

estimated probability=number of times the event happenednumber of simulated trials\text{estimated probability}=\frac{\text{number of times the event happened}}{\text{number of simulated trials}}

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.

TrialFlip 1Flip 2At least one head?
1HTYes
2TTNo
3HHYes
4THYes

If 78 out of 100 simulated trials had at least one head, then:

P(at least one head)≈78100=78%P(\text{at least one head})\approx\frac{78}{100}=78\%

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 30%30\% chance of heavy rain tomorrow. If it rains, the bus is late 70%70\% of the time. If it does not rain, the bus is late 10%10\% 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:

P(bus is late)≈late dayssimulated daysP(\text{bus is late})\approx\frac{\text{late days}}{\text{simulated days}}

Making a simulation trustworthy

A simulation is only useful if it matches the real situation. If the real chance of rain is 30%30\%, then the simulation should use 30%30\%, not a coin flip with 50%50\%.

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.

Optional mastery

Mastery questions

Do you want a high study score? Be disciplined. Do the mastery questions.

Open mastery questions

Checkpoint

Multiple-choice questions

Answer every question correctly to unlock the next lesson. If something is marked red, change your answer and check again.

Question 1
What is a simulation in probability?
Question 2
A simulation runs 500 trials. The event happens 145 times. What is the estimated probability?
Question 3
What makes a simulation useful?