MATH 1 • STATISTICS & PROBABILITY

Simulating Probabilities — I can design and run a simulation to estimate a probability and interpret results.

Learn how to use random experiments to estimate probabilities when exact calculation is difficult or impossible.

Historical Context & Motivation

Some probability questions are easy to answer with a formula — like the chance of rolling a 6 on a fair die. But many real-world questions are far too complex for a neat formula. What is the probability that your favorite basketball player makes at least 8 out of 10 free throws? What are the odds of drawing a specific poker hand? For centuries, mathematicians have turned to simulation — running an experiment many times and observing the results — to estimate probabilities that resist exact calculation.

The idea of using repeated random trials to estimate an unknown quantity has a surprisingly rich history, stretching from 18th-century needle-dropping experiments to the supercomputers that model climate, disease, and financial markets today.

1733
Buffon's Needle Problem
French mathematician Georges-Louis Leclerc, Comte de Buffon, proposed dropping a needle on parallel lines to estimate π — one of the earliest recorded simulation experiments.
1946
The Monte Carlo Method
Stanislaw Ulam and John von Neumann, working on nuclear weapons at Los Alamos, formalized the Monte Carlo method — named after the famous casino — to solve physics problems using random sampling.
1970s
Computers Accelerate Simulation
As computers became more powerful, scientists could run millions of trials in seconds, making probability simulation a practical tool in medicine, engineering, and finance.
Today
Simulation Everywhere
Weather forecasts, video game physics, election predictions, and sports analytics all rely heavily on probability simulations to model uncertainty.

The central question this lesson addresses is: How can we estimate a probability when a formula is unavailable, impractical, or difficult to apply? The answer lies in designing a random experiment that mimics the real situation, running it many times, and using the results to draw conclusions.

Core Principles & Definitions

Before you can design a simulation, you need to understand a handful of foundational ideas. These principles form the backbone of every probability simulation, whether you are flipping coins by hand or writing a computer program.

1

Simulation

A simulation is an experiment that uses random devices (coins, dice, random-number generators) to model a real-world situation. The key requirement is that the randomness in the model matches the randomness in the actual event.
2

Trial

A trial is one complete run of the simulation from start to finish. For example, if you simulate 10 free throws, one trial consists of all 10 outcomes together.
3

Outcome & Event

An outcome is the result of a single random action; an event is a specific condition you are tracking, such as 'at least 8 baskets made out of 10.'
4

Experimental Probability

After running many trials, the experimental (simulated) probability equals the number of trials where the event occurred divided by the total number of trials.
5

Law of Large Numbers

The Law of Large Numbers states that as the number of trials increases, the experimental probability tends to get closer and closer to the true (theoretical) probability.
KEY TAKEAWAY
Think of simulation like taste-testing soup. You can't eat the whole pot to decide if it needs salt — you taste a spoonful (one trial). If you take many spoonfuls from different parts of the pot (many trials), you get a very reliable estimate of how the whole pot tastes. The more spoonfuls you try, the more confident you are in your conclusion. In the same way, running more trials gives a more reliable estimate of the true probability.

Visual Explanation — How a Simulation Works

Designing a simulation follows a clear, repeatable process. The flowchart below shows the five stages you move through every time you set up and run a probability simulation. Study it carefully — you will use these exact steps in every simulation problem.

The five-stage simulation process. Notice that choosing a model (Stage 2) is the most creative step — the model must match the real-world probabilities. Stage 4 emphasizes that more trials produce a more reliable estimate.

Let's make this concrete with an example. Suppose you want to know the probability of getting exactly 3 heads when you flip a fair coin 5 times. You could calculate it with a formula, but simulation gives you a hands-on alternative. Your model could use an actual coin or a random-number generator where, say, odd = heads and even = tails. Each trial consists of 5 flips, and you record whether you got exactly 3 heads. After 50 trials, if 16 of them produced exactly 3 heads, your experimental probability is 16 ÷ 50 = 0.32, which is very close to the theoretical answer of 0.3125.

Mathematical Framework

While simulation is hands-on, there is a clean mathematical structure behind it. Two key formulas guide every simulation you will ever run.

EXPERIMENTAL PROBABILITY
P̂(event) = number of trials where event occurred ÷ total number of trials
P̂ (read "P-hat") is the estimated probability from the simulation. It is an approximation of the true probability P(event). The hat symbol (^) signals that the value is an estimate, not an exact answer.
LAW OF LARGE NUMBERS (INFORMAL)
As n → ∞, P̂(event) → P(event)
Here, n is the number of trials. As you increase n, your experimental probability P̂ converges to the true probability P. In practice, you don't need infinitely many trials — even a few hundred usually produce a good estimate.
RELATIVE FREQUENCY
Relative Frequency = f ÷ n
Where f is the frequency (count) of a specific outcome and n is the total number of trials. The experimental probability is simply the relative frequency of the event you are tracking.

Notice that none of these formulas requires advanced math — just counting and dividing. The power of simulation lies not in complicated equations but in the careful design of the model and the discipline to run enough trials.

Choosing the Right Simulation Model

The most important — and most creative — step in any simulation is choosing a model that faithfully represents the real situation's probabilities. Different random devices naturally produce different probability structures. The table below matches common real-world scenarios with appropriate simulation tools.

Matching real scenarios to simulation models
Real-World ScenarioProbability StructureGood Model
50/50 outcome (e.g., boy or girl)Each outcome has probability 0.5Coin flip (H = boy, T = girl)
6 equally likely outcomesEach outcome has probability 1/6Standard 6-sided die
10 equally likely outcomesEach outcome has probability 0.10Random digit table (digits 0–9) or spinner divided into 10 equal parts
Success rate of 70% (e.g., free-throw shooter)P(success) = 0.70Random digits 0–9: let 0–6 = make, 7–9 = miss
Drawing without replacementProbabilities change after each drawDeck of cards or numbered slips drawn without replacement
This diagram shows how to map a 70% free-throw rate onto random digits 0–9. Green boxes (0–6) represent makes, and red boxes (7–9) represent misses. The example trial uses digits 4, 8, 1, 7, 3 to simulate five free throws.
⚠️ Choosing Your Model: The Golden Rule
The probability of each outcome in your model must match the probability in the real situation. If a basketball player makes 80% of her shots, don't use a coin (which gives 50%). Instead, use random digits where 8 out of 10 digits represent "make."

Worked Example — Cereal Box Prize Simulation

A cereal company places one of 5 different prizes in each box. Each prize is equally likely. You want to estimate the probability that you need to buy 10 or fewer boxes to collect all 5 prizes. This problem is very difficult to solve with a formula, so simulation is the ideal approach.

Cereal Box Prize Collection
1
Step 1 — State the QuestionWhat is the probability that a customer collects all 5 different prizes in 10 or fewer cereal box purchases, assuming each prize is equally likely?
2
Step 2 — Choose a ModelThere are 5 equally likely prizes, so each has probability 1/5 = 0.20. We use a standard 6-sided die, but we ignore rolls of 6 (re-roll). Alternatively, use random digits 1–5 (ignore 0, 6, 7, 8, 9). Let each digit (1–5) represent one of the five prizes.
3
Step 3 — Define a TrialOne trial: Generate random digits (1–5) one at a time, keeping track of which distinct prizes you have collected. Stop when either (a) you collect all 5 different prizes or (b) you reach 10 boxes. Record "success" if all 5 prizes are collected in 10 or fewer draws, and "failure" otherwise.
4
Step 4 — Run Trials (showing 5 of 20)Trial 1: 3, 1, 3, 5, 2, 2, 4 → All 5 collected in 7 boxes → Success. Trial 2: 2, 2, 1, 1, 4, 3, 3, 5, 5, 1 → All 5 collected in 8 boxes → Success. Trial 3: 4, 4, 4, 3, 1, 2, 1, 3, 2, 4 → Only 4 prizes after 10 boxes → Failure. Trial 4: 5, 3, 1, 4, 2 → All 5 in 5 boxes → Success. Trial 5: 1, 1, 2, 3, 3, 4, 4, 5, 1, 2 → All 5 in 8 boxes → Success.
5
Step 5 — Analyze ResultsSuppose that after running 20 trials, 13 resulted in collecting all 5 prizes within 10 boxes.
P̂(all 5 in ≤ 10 boxes) = 13 ÷ 20 = 0.65. Based on this simulation, there is approximately a 65% chance of collecting all 5 prizes in 10 or fewer purchases. Running more trials would improve this estimate.
💡 Interpreting Results
Always state your conclusion in context. Don't just say "the probability is 0.65." Say, "Based on 20 simulated trials, a customer has approximately a 65% chance of collecting all 5 prizes within 10 boxes." Also note that because this is a simulation, other students may get slightly different results.

Strengths and Limitations of Simulation

Simulation is a powerful tool, but it is not perfect. Understanding its strengths and limitations helps you know when to use it and how to interpret your results wisely.

Comparing strengths and limitations of probability simulation
StrengthsLimitations
Can estimate probabilities for situations where formulas are too complex or unknown.Results are estimates, not exact answers. Different runs may produce slightly different estimates.
Easy to understand — no advanced math required to run a simulation.A poorly designed model (wrong probabilities) produces misleading results.
Flexible — can model almost any real-world random process.Requires many trials for reliable results; too few trials may produce inaccurate estimates.
Technology (calculators, computers) makes running thousands of trials fast and easy.Running many trials by hand is time-consuming and error-prone.
KEY TAKEAWAY
Simulation is like using a GPS with an estimate of your arrival time. With only a few data points (trials), the estimate is rough. But as the GPS collects more data about traffic and road conditions (more trials), the estimated arrival time gets increasingly accurate. Similarly, more simulation trials bring your experimental probability closer to the true probability. The model (GPS map) must also be accurate — a map of the wrong city won't help you, just as a model with wrong probabilities won't give you a useful answer.

Connection to Theoretical Probability & Advanced Methods

Simulation is one of two major approaches to probability. The other is theoretical probability, where you use mathematical reasoning (counting, formulas, or combinatorics) to calculate an exact probability. Understanding how these two approaches relate to each other is an important part of your statistical toolkit.

Theoretical vs. simulated probability
FeatureTheoretical ProbabilitySimulated Probability
MethodMathematical formulas, counting principlesRandom experiments, repeated trials
Result typeExact probabilityEstimate (approximation)
When to useSimple, well-defined sample spacesComplex or unknown probability models
AccuracyPerfect (if model and math are correct)Improves with more trials
ExampleP(rolling a 6) = 1/6Roll a die 1000 times; count how often 6 appears

In future courses, you may encounter the formal Monte Carlo method, which uses computer-generated random numbers to run millions of trials in seconds. Monte Carlo simulations are used in fields from astrophysics to Wall Street — wherever uncertainty needs to be quantified. The intuition you build now by designing simulations with coins, dice, and random digit tables is the same intuition that powers these advanced techniques.

Practice Problems

PROBLEM 1CONCEPTUAL
A student wants to simulate whether a family with 3 children has all boys. She decides to use a coin flip where H = boy and T = girl. Explain why this is a good model choice, and describe what one trial looks like.
PROBLEM 2BASIC CALCULATION
A simulation was run 40 times. In 14 of those trials, the event of interest occurred. Calculate the experimental probability. Is this an exact probability or an estimate? Explain.
PROBLEM 3INTERMEDIATE
A basketball player makes 60% of her three-point shots. Design a simulation using random digits (0–9) to estimate the probability that she makes at least 4 out of 5 three-point attempts. Describe the model, define one trial, and explain how you would calculate the final answer.
PROBLEM 4APPLIED
A quality-control manager knows that 5% of items from a factory are defective. She inspects batches of 20 items. Design a simulation to estimate the probability that a batch contains 2 or more defective items. Use a random digit table and explain your complete setup.
PROBLEM 5CRITICAL THINKING
Two students each simulate the same problem — estimating the probability of getting at least one 6 in four rolls of a die. Student A runs 10 trials and gets P̂ = 0.40. Student B runs 500 trials and gets P̂ = 0.52. The theoretical probability is about 0.518. Explain why the two estimates differ. Which is more reliable and why? Does Student A's result mean her simulation was done incorrectly?

Lesson Summary

A probability simulation is a random experiment designed to estimate a probability that is difficult or impossible to calculate with a formula. To build one, follow five stages: state the question, choose a model whose probabilities match the real situation (coins for 50/50, random digits for other rates), define a trial by specifying what counts as one complete run and what outcome you will record, run many trials (at least 20–50, with more trials producing more reliable results), and analyze the results by computing the experimental probability (successes ÷ total trials) and interpreting the answer in the context of the original question.

The Law of Large Numbers guarantees that as the number of trials increases, your estimate converges toward the true probability. Always interpret your results in context and acknowledge that simulation produces estimates, not exact answers — but with enough well-designed trials, those estimates are remarkably useful. This technique is the foundation for advanced methods like the Monte Carlo method used throughout modern science, engineering, and data analysis.

Varsity Tutors • Math 1 • Simulating Probabilities