SECTION 1
Historical Context & Motivation
Not every probability problem has a clean formula you can plug numbers into. Sometimes the situation is so complex — involving multiple stages, unusual conditions, or real-world messiness — that the only practical way to estimate a probability is to simulate the process many times and observe how often the outcome of interest occurs. This idea, running random experiments to approximate answers, has a surprisingly rich history that stretches back centuries.
1777 • Buffon's Needle Problem
1946 • The Monte Carlo Method
1964 • Computer-Driven Simulations
2000s–Present • Simulation in Everyday Life
The core question this lesson addresses is: How can you design a random experiment, run it many times, and use the results to estimate a probability — and how do you know if your estimate is any good?
SECTION 2
Core Principles & Definitions
Before you run a simulation, you need to understand a few foundational ideas that make the whole process work. These principles explain why random repetition can give you a trustworthy answer, and what steps are involved in setting one up.
Trial
Experimental (Simulated) Probability
Theoretical Probability
Law of Large Numbers
Random Number Generator
KEY TAKEAWAY
SECTION 3
Visualizing the Simulation Process
Designing a simulation follows a clear sequence of steps. The flowchart below shows the entire process from identifying the real-world problem to evaluating your estimate. Every simulation you build in this course will follow this same loop.
Steps 1 through 3 are the design phase — you decide what question you are answering and how a random device (like a die or a random-number generator) will stand in for the real-world event. Steps 4 and 5 are the execution phase, where you actually gather data. Step 6 is the evaluation phase, where you ask whether your sample size was large enough to produce a trustworthy estimate.
SECTION 4
Mathematical Framework
Two key formulas underpin every simulation. The first tells you how to compute your estimate; the second helps you judge how close that estimate is likely to be to the true probability.
EXPERIMENTAL PROBABILITY
P̂ (read "P-hat") is the experimental probability, s is the count of trials where the event of interest occurred, and n is the total number of trials.
LAW OF LARGE NUMBERS (INFORMAL)
This law guarantees that as the number of trials n grows without bound, the experimental probability P̂ approaches the true theoretical probability. In practice, "large" usually means hundreds or thousands of trials.
MARGIN OF ERROR APPROXIMATION
A quick rule of thumb: the margin of error of a simulation is roughly 1 divided by the square root of the number of trials. For example, 100 trials give a margin of about 0.10, while 2,500 trials shrink it to about 0.02.
Why More Trials Help
SECTION 5
How Estimates Converge — The Law of Large Numbers in Action
One of the most powerful ways to understand simulations is to watch how the experimental probability changes as you accumulate more trials. The graph below shows a simulation of flipping a fair coin (true P = 0.50). Early on, the estimate bounces wildly; as the number of flips grows, the line flattens out near the true value.
| Number of Trials (n) | Approximate Margin of Error (1/√n) | Typical Range of P̂ for true P = 0.50 |
|---|---|---|
| 10 | ≈ 0.316 | 0.18 – 0.82 |
| 100 | ≈ 0.100 | 0.40 – 0.60 |
| 500 | ≈ 0.045 | 0.46 – 0.54 |
| 2,500 | ≈ 0.020 | 0.48 – 0.52 |
| 10,000 | ≈ 0.010 | 0.49 – 0.51 |
Margin of error shrinks as n increases, but the improvement slows down.
SECTION 6
Worked Example — Simulating Free-Throw Shooting
Suppose a basketball player makes 70% of her free throws. What is the probability that she makes at least 8 out of her next 10 free throws? Rather than computing this with a complicated binomial formula, let's estimate it with a simulation.
Simulation: P(at least 8 out of 10 free throws made) when P(make) = 0.70
- 1
Step 1 — Define the Problem
We want to estimate the probability that the player makes 8, 9, or 10 out of 10 free throws, given that each individual shot has a 70% chance of going in. - 2
Step 2 — Choose a Random Device and Mapping
Use a random number generator that produces integers from 1 to 10. Let the numbers 1 through 7 represent a made shot (7 out of 10 = 70%), and let 8, 9, 10 represent a missed shot (30%).1–7 = make, 8–10 = miss - 3
Step 3 — Define One Trial
One trial consists of generating 10 random integers (one per free throw), counting how many fall between 1 and 7, and recording whether that count is ≥ 8. - 4
Step 4 — Run Trials (Example: 20 Trials Shown)
We ran 20 trials. Here are the counts of made shots per trial: 8, 6, 7, 9, 5, 7, 8, 7, 6, 10, 7, 8, 6, 7, 5, 9, 7, 8, 6, 7. Out of these 20 trials, the ones with 8 or more makes are: Trial 1 (8), Trial 4 (9), Trial 7 (8), Trial 10 (10), Trial 12 (8), Trial 16 (9), Trial 18 (8). That is 7 successes out of 20 trials.7 successes out of 20 trials - 5
Step 5 — Compute Experimental Probability
P̂ = 7 / 20 = 0.35. So based on 20 trials, we estimate a 35% chance the player makes at least 8 out of 10 free throws.P̂ = 0.35 - 6
Step 6 — Evaluate Accuracy
With only 20 trials, the margin of error is about 1/√20 ≈ 0.224, which is quite large. To improve accuracy, we could run 500 trials (margin ≈ 0.045) or even 2,000 trials (margin ≈ 0.022). For reference, the exact binomial answer is about 0.3828, so our estimate of 0.35 is in the ballpark but could be refined with more trials.Margin of error ≈ 0.224 — need more trials for precision
SECTION 7
Strengths and Limitations of Simulation
Simulation is an incredibly flexible tool, but like any method, it has trade-offs. Understanding when to use simulation versus an exact calculation is an important part of statistical reasoning.
| Strengths | Limitations |
|---|---|
| Works even when no formula exists or the formula is too complex to apply. | Only gives an estimate, not an exact answer. Results vary each time you run it. |
| Easy to set up with a calculator, spreadsheet, or simple code. | Requires many trials to achieve high accuracy (hundreds or thousands). |
| Highly adaptable — can model multi-step, conditional, or non-standard scenarios. | Accuracy depends on having a correctly designed model; a flawed mapping leads to flawed results. |
| Builds intuition about how randomness actually behaves. | Cannot prove a probability exactly — only approximate it. |
Comparison of simulation strengths and limitations
KEY TAKEAWAY
SECTION 8
Connection to Advanced Probability & Statistics
The simulation techniques you learn here are the foundation for more powerful statistical methods that you will encounter in AP Statistics, college courses, and professional fields. The table below shows how the concepts in this lesson connect to their more advanced counterparts.
| This Lesson | Advanced Version |
|---|---|
| Experimental probability (P̂ = s / n) | Sample proportion with confidence intervals (AP Statistics) |
| Law of Large Numbers (informal) | Formal Law of Large Numbers with rigorous proof (Probability Theory) |
| Margin of error ≈ 1/√n | Standard error of a proportion: SE = √[P̂(1 − P̂)/n] |
| Random number generators | Monte Carlo simulations in physics, finance, and machine learning |
| Evaluating accuracy with trial count | Power analysis and sample size determination (Research Methods) |
How today's concepts scale into college-level and professional statistics
In AP Statistics, you will formalize the margin of error using the standard error and construct confidence intervals that give a range of plausible values for the true probability. In college and beyond, Monte Carlo simulations are used to price financial derivatives, model climate systems, and train artificial intelligence. The intuition you build now — that more random trials yield better estimates — is the same intuition that drives all of these applications.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
Summary
A probability simulation uses a random device (coin, die, random number generator) to model a real-world situation and then repeats the experiment over many trials to estimate a probability. The experimental probability is calculated as P̂ = successes ÷ trials. The Law of Large Numbers guarantees that this estimate approaches the true probability as the number of trials grows.
To evaluate the accuracy of your estimate, use the margin of error approximation of 1/√n. More trials shrink the margin but with diminishing returns — you must quadruple the number of trials to halve the error. The six-step process — define the problem, choose a random device, map outcomes, run trials, compute P̂, and evaluate accuracy — gives you a reliable framework for any simulation you encounter.