01 / 20

Simulating
Probabilities

Learn how to design and run simulations to estimate probabilities when theoretical calculation is complex or impossible.

AP Statistics

What is a Simulation?

A simulation is an experiment that models a real-world process using random devices: coins, dice, random number generators, or spinners. Instead of calculating a probability with formulas, you run trials and observe what happens.

Trial
One complete run of the simulation from start to finish.
Outcome
The result recorded at the end of each trial.
Repetition
Running many trials to build reliable data.

Why Simulate Probabilities?

Sometimes the theoretical probability is too difficult to compute with formulas, or the situation involves real-world complexity. Simulations give us an estimate based on experimental evidence.

1
Events with many steps: What's the probability a family with 5 children has at least 3 girls?
2
Real-world systems: What's the probability a new coffee shop is profitable in its first year, considering variable customer traffic and supply costs?
3
Verify calculations: Run a simulation to check whether your theoretical answer is reasonable.

Experimental vs Theoretical

Both describe how likely an event is, but they come from different sources.

Theoretical Probability
Calculated using math: \(\displaystyle P(E) = \frac{\text{favorable outcomes}}{\text{total outcomes}}\). Requires equally likely outcomes.
Experimental Probability
Estimated from data: \(\displaystyle P(E) \approx \frac{\text{times event occurred}}{\text{total trials}}\). Comes from running trials.

The Law of Large Numbers

As the number of trials \( n \) increases, the experimental probability \( \hat{P}(E) \) converges to the true probability \( P(E) \).

0 0.25 0.50 0.75 1.0 0 50 100 150 200 Number of Trials P(Heads) P = 0.5 Experimental results converge to true P

Simulation vs Calculation

Simulation Calculation
Method Run random trials Use formulas
Result type Estimate (approximate) Exact value
When to use Complex or real-world events Simple, equally likely outcomes
Accuracy Improves with more trials Always exact
Tools Dice, coins, RNG, spinners Counting, algebra

How to Design a Simulation

1
Identify the event you want to estimate the probability of.
2
Choose a model that matches the situation: coin flip for 50/50, die roll for \(\frac{1}{6}\), random digits for percentages, spinner for custom probabilities.
3
Define a trial: What constitutes one complete experiment? How many steps per trial?
4
Run many trials (at least 30, ideally 100+). Record the outcome of each.
5
Calculate experimental probability: \(\displaystyle \hat{P}(E) = \frac{\text{successes}}{\text{total trials}}\)

Choosing the Right Model

The random device you choose must have the same probabilities as the real event.

Coin Flip
Models 50/50 events: boy/girl, win/lose, yes/no.
Die Roll
Models \(\frac{1}{6}\) events or groupings of 6 categories.
Random Digits (0-9)
Models any probability in multiples of 10%: assign digit ranges.

Example 1: Three Coin Flips

Question: What is the probability of getting exactly 2 heads in 3 coin flips?

Flip 1 Flip 2 Flip 3 Result H H H HHH (3H) T HHT (2H) ✓ T H HTH (2H) ✓ T HTT (1H) T H H THH (2H) ✓ T THT (1H) T H TTH (1H) T TTT (0H)

Example 2: Free Throw Simulation

Question: A player makes 70% of free throws. Estimate the probability of making all 3 in a row.

1
Model: Digits 0-6 = make, digits 7-9 = miss (70% chance).
2
One trial: Generate 3 random digits. If all three are 0-6, record "success."
3
Run 20 trials: Example data below.
Trial Digits All 0-6? Result 1 3, 5, 1 Yes ✓ Make all 3 2 2, 8, 4 No ✕ Missed one 3 6, 0, 5 Yes ✓ Make all 3 4 9, 3, 7 No ✕ Missed two . . . (continue for 20 trials)

Example 3: The Birthday Problem

Question: In a group of 23 people, what is the probability that at least 2 share a birthday? This is hard to compute by hand: simulation helps!

1
Model: Generate 23 random numbers from 1 to 365 (each represents a birthday).
2
One trial: Check if any two numbers match. Record "match" or "no match."
3
Run 1000 trials: Count how many had at least one match.
4
Result: About 507 out of 1000 trials had a match: \(\hat{P} \approx 0.507\).

Reading Simulation Results

After running a simulation, you often display results in a frequency table or dot plot. Here's how to interpret a histogram of simulation outcomes.

0 5 10 15 20 Frequency 1 2 3 4 5 6 7 8 Number of Heads (in 10 flips) Most common: 5 heads

Interpreting Your Results

Once you have your experimental probability, you need to make sense of it in context. Here is a checklist:

1
State the estimate: "Based on the simulation, the probability is approximately \(\hat{P} = \ldots\)"
2
Note the number of trials: More trials = more reliable estimate.
3
Compare to theory (if possible): Is your estimate close to the calculated value?
4
Recognize variability: Different students running the same simulation will get different results. That is normal.

Common Mistakes

✕ Wrong Model
Using a coin (50%) to model a 70% event. The model must match the real probability.
✕ Too Few Trials
Running only 5-10 trials and treating the result as reliable. Use at least 30, ideally 100+.
✕ Claiming Exactness
Saying "the probability IS 0.35" instead of "the probability is APPROXIMATELY 0.35."

Summary of Key Concepts

Concept Definition Example
Simulation Experiment modeling a random process Flip a coin 10 times
Trial One complete run 10 coin flips = 1 trial
Experimental \(P\) \(\frac{\text{successes}}{\text{trials}}\) \(\frac{34}{100} = 0.34\)
Law of Large Numbers More trials → closer to true \(P\) 50 vs 5000 trials
Random Device Tool matching event's probability Digits 0-6 for 70%

Question 1 of 5

A student wants to simulate a 60% chance of rain each day. Which model is most appropriate?

Question 2 of 5

A simulation of 200 trials found that an event occurred 72 times. What is the experimental probability?

Question 3 of 5

According to the Law of Large Numbers, what happens as you increase the number of simulation trials?

Question 4 of 5

A basketball player makes 80% of free throws. You use digits 0-7 = make, 8-9 = miss. Each trial consists of 2 free throws. What does one trial look like?

Question 5 of 5

Two students each ran a simulation of the same event. Student A used 20 trials and got \(\hat{P} = 0.45\). Student B used 500 trials and got \(\hat{P} = 0.38\). Which estimate is likely more reliable?