GRADE 11 MATH • STATISTICS & PROBABILITY

Simulating Probability & Expected Value — I can use simulation to approximate probability or expected value when computation is complex.

When the math gets messy, let random experiments do the heavy lifting for you.

Historical Context & Motivation

Some probability questions are easy to answer with a formula. What is the chance of rolling a 6 on a fair die? Simple: 1 out of 6. But what about the probability that a game of Monopoly ends in fewer than 200 turns, or the expected number of shuffles needed to randomly sort a deck of cards? These questions involve so many interacting variables that a neat closed-form solution either doesn't exist or would take pages of combinatorics to derive. For centuries, mathematicians searched for a practical shortcut, and they found one: simulation — running a random experiment many, many times and letting the results speak for themselves.

1777
Buffon's Needle
French naturalist Georges-Louis Leclerc, Comte de Buffon, proposed a thought experiment: drop a needle on a grid of parallel lines and count how often it crosses a line. The proportion relates to π. This was one of the first uses of random trials to estimate a mathematical constant.
1946
The Monte Carlo Method
Physicists Stanislaw Ulam and John von Neumann, working on nuclear weapons at Los Alamos, formalized the idea of using random sampling to solve complex problems. They named the technique after the Monte Carlo casino in Monaco, a nod to the role of chance.
1970s
Personal Computers Emerge
With the arrival of affordable computers, simulation moved out of government labs and into classrooms and businesses. Running thousands of random trials became a task any desktop machine could handle in seconds.
Today
Simulation Everywhere
From weather forecasting to video-game physics to stock-market risk analysis, Monte Carlo simulations power decisions worth billions of dollars each day. Your phone's GPS uses a form of random sampling every time it estimates your position.

The central question this lesson addresses is straightforward: When an exact calculation is too complex, how can we use repeated random trials to approximate a probability or expected value? By the end of this lesson, you'll know how to design, run, and interpret simulations that answer questions the formulas can't easily handle.

Core Principles & Definitions

Before you run a single trial, it helps to understand the key ideas that make simulation work. A simulation is a model of a real-world process that uses random numbers to mimic chance. Each complete run of the model is called a trial (or iteration), and the collection of all trials makes up the simulation. The power of the technique rests on a beautiful mathematical fact: as the number of trials grows, the simulated results converge to the true probability or expected value.

1

Random Number Generator (RNG)

The engine behind every simulation. An RNG produces unpredictable outputs — like rolling a die or flipping a coin — that stand in for real-world randomness.
2

Trial (Iteration)

One complete run of the random experiment from start to finish. You record the outcome and then repeat. More trials = better approximation.
3

Law of Large Numbers

A theorem guaranteeing that as you increase the number of trials, the sample proportion (or sample mean) gets closer to the true probability (or expected value).
4

Expected Value (E)

The long-run average of a numerical outcome. If you played a game thousands of times, E is the per-game amount you'd average. Simulation estimates E by averaging results across all trials.
5

Simulated Probability

The fraction of trials in which a target event occurs. Written as P̂ = (number of successes) ÷ (total trials). It approximates the true probability P.
✦ KEY TAKEAWAY
Think of simulation like taste-testing a pot of soup. One spoonful might be too salty or too bland, but if you stir well and taste many spoonfuls, you'll get a reliable sense of the whole pot. Each spoonful is a trial, and more spoonfuls (trials) give you more confidence that your impression matches reality.

Visual Explanation — The Law of Large Numbers in Action

The diagram below shows what happens when you simulate a coin flip. The true probability of heads is 0.50. Notice how the simulated proportion bounces wildly at first but gradually settles near the true value as the number of trials grows. This convergence is the Law of Large Numbers in action.

The purple curve shows the running proportion of heads in a simulated coin-flip experiment. The dashed cyan line marks the true probability of 0.50. Early trials are noisy, but by 1,000 trials the simulated proportion has nearly locked onto the true value.

Key observation: at 10 trials the simulated proportion was about 0.30, which is way off. By 100 trials it hovered near 0.50, and by 1,000 trials it was nearly exact. This pattern holds for any simulation. The practical rule of thumb in this course is to use at least several hundred trials — and more is almost always better.

Mathematical Framework

While simulation is about running experiments, a bit of mathematical notation helps you interpret the results. Two key formulas connect your simulation data to the quantities you want to estimate.

SIMULATED PROBABILITY
P̂ = (number of trials where event occurs) ÷ (total number of trials) = k / n
Where k is the count of successes (trials where the event of interest happened) and n is the total number of trials. As n → ∞, P̂ → P (the true probability).
SIMULATED EXPECTED VALUE
Ê = (x₁ + x₂ + x₃ + … + xₙ) / n
Where x₁, x₂, …, xₙ are the numerical outcomes of each trial. Ê is simply the sample mean of the trial results. By the Law of Large Numbers, Ê → E (the true expected value) as n grows.
THEORETICAL EXPECTED VALUE (FOR COMPARISON)
E = Σ [xᵢ × P(xᵢ)]
This formula gives the exact expected value by summing each possible outcome multiplied by its probability. When there are too many outcomes to enumerate, or when probabilities are unknown, simulation provides Ê as a practical substitute.
💡 When should you simulate?
Use simulation when: (1) the number of possible outcomes is huge or hard to count, (2) outcomes depend on multiple random events interacting, or (3) you need a quick approximation and don't need an exact answer. If a clean formula exists and is easy to apply, use the formula — it's exact.

Designing a Simulation — Step by Step

Every simulation follows a consistent design process. Whether you're using a graphing calculator, a spreadsheet, or a programming language, the five steps below remain the same. The diagram that follows turns these steps into a visual flowchart you can reference whenever you design your own simulation.

A five-step flowchart for designing any simulation. Follow the steps top to bottom: define the question, choose a random device, define one trial, run many trials, and analyze the results.

Let's unpack each step. In Step 1, you state the question precisely: "What is the probability that all five friends share a birthday month?" or "What is the expected number of rolls to get three sixes?" In Step 2, you pick a randomizer that matches the real situation. A coin works for 50-50 events; a random integer from 1 to 6 models a die; digits 0–9 from a random number table can model all sorts of outcomes. In Step 3, you spell out what one trial looks like: the sequence of random actions and the specific result you record. In Step 4, you repeat the trial many times (at least 100, ideally 1,000+). Finally, in Step 5, you calculate P̂ or Ê from your collected data and state your conclusion.

🎲 Common Random Devices
Coins (2 outcomes), dice (6 outcomes), playing cards (52 outcomes), random digit tables (digits 0–9), calculator RNG function (randInt), spreadsheet functions (RANDBETWEEN), or programming functions (random.randint in Python). Choose a device whose equally-likely outcomes match the probabilities in the real situation.

Worked Example — The "At Least One Match" Problem

Suppose you buy a bag of 8 colored candies. Each candy is equally likely to be one of 5 colors: red, blue, green, yellow, or orange. What is the probability that you get at least one candy of every color? Counting the exact number of favorable outcomes requires advanced combinatorics (Stirling numbers). A simulation gives us a solid estimate much more easily.

Simulating the Candy Color Problem
1
Step 1 — Define the QuestionWe want to estimate P(all 5 colors appear in a bag of 8 candies), where each candy is independently and equally likely to be one of 5 colors.
2
Step 2 — Choose a Random DeviceWe assign each color a digit: 1 = red, 2 = blue, 3 = green, 4 = yellow, 5 = orange. We use a calculator's randInt(1, 5) function (or pick digits 1–5 from a random number table, ignoring 0 and 6–9).
3
Step 3 — Define One TrialGenerate 8 random integers from 1 to 5. Record whether all five distinct values (1, 2, 3, 4, 5) appear at least once. Mark the trial as a "success" if yes, "failure" if no.
4
Step 4 — Run Many TrialsWe ran 1,000 trials. Here is a snapshot of the first 5 trials:
5
Step 4 (continued) — Sample DataTrial 1: 3 1 5 2 2 4 1 3 → colors {1,2,3,4,5} → Success. Trial 2: 4 4 1 3 5 3 1 2 → colors {1,2,3,4,5} → Success. Trial 3: 2 2 1 1 3 3 2 1 → colors {1,2,3} → Failure. Trial 4: 5 4 3 1 2 5 3 4 → colors {1,2,3,4,5} → Success. Trial 5: 1 1 2 2 3 3 4 4 → colors {1,2,3,4} → Failure.
6
Step 5 — Analyze ResultsOut of 1,000 trials, suppose 537 were successes.
P̂ = 537 / 1000 = 0.537. We estimate there is roughly a 54% chance of getting all 5 colors in a bag of 8 candies. (The exact answer via inclusion-exclusion is about 0.5355 — our simulation is very close!)
🔄 Expected Value Version
If the question were "On average, how many candies must you draw before you see all 5 colors?" you would modify Step 3: in each trial, keep drawing random integers until all five values appear, then record the count. After many trials, Ê = sum of all counts ÷ number of trials.

Strengths, Limitations & Choosing the Right Approach

Simulation is incredibly versatile, but it isn't magic. Understanding when to simulate versus when to calculate exactly is an important skill. The table below summarizes the main trade-offs.

Simulation vs. Exact Calculation — key trade-offs
CriterionSimulationExact Calculation
AccuracyApproximate; improves with more trialsExact (if the formula is correct)
Ease of setupOften easy — just model the experimentCan be very difficult for complex scenarios
SpeedNeeds many trials; fast on a computer, slow by handOne calculation gives the answer immediately
FlexibilityWorks for nearly any scenario, even non-standard onesRequires a known formula or counting technique
ReproducibilityResults vary slightly each time (random)Always gives the same answer
✦ KEY TAKEAWAY
Think of simulation as a GPS and exact calculation as a perfectly drawn map. The map is ideal when you have one, but if you're in uncharted territory (a problem with no neat formula), the GPS of simulation will still get you where you need to go — it just takes a few extra seconds of processing.

Connections to Advanced Topics

The simulation techniques you learn in this course are the foundation for much more powerful tools in college-level statistics, data science, and applied mathematics. Here is a brief comparison showing how the ideas you're mastering now connect to what lies ahead.

From this lesson to advanced probability and statistics
What You Learn NowWhere It Leads
Running trials with dice, coins, or RNGMonte Carlo methods used in physics, finance, and machine learning
Approximating P̂ by counting successesBayesian inference and Markov Chain Monte Carlo (MCMC) sampling
Estimating expected value Ê from averagesBootstrap resampling for confidence intervals (AP Statistics and beyond)
Law of Large Numbers as justificationCentral Limit Theorem and convergence theory in probability

You don't need to master these advanced topics right now. The important point is that simulation is not a shortcut around "real" math — it is a powerful branch of mathematics in its own right. Many professional statisticians and scientists spend their entire careers refining simulation methods to solve problems that no formula can touch.

Practice Problems

PROBLEM 1 — CONCEPTUAL
Explain in your own words why a simulation with 10 trials is less reliable than one with 1,000 trials. Which mathematical principle guarantees that more trials improve the estimate?
PROBLEM 2 — BASIC CALCULATION
A student simulates rolling two dice and checking whether their sum is 7. In 500 trials, the sum of 7 appears 78 times. What is the simulated probability P̂? How does it compare to the exact probability?
PROBLEM 3 — INTERMEDIATE
You want to simulate the probability that at least 2 out of 5 randomly chosen students share a birth month (assume each month equally likely, 12 months). Describe the random device you would use, what one trial looks like, and what you would record. Then, if 620 out of 1,000 trials produce a match, state your estimate.
PROBLEM 4 — APPLIED
A carnival game works like this: you pay $2 to spin a wheel that is equally likely to land on one of 8 sectors. One sector wins $10, two sectors win $3, and the other five sectors win nothing. You want to estimate the expected net gain per play using simulation. After 800 trials, you find the total prize money earned is $2,040. What is the simulated expected net gain per play, and should you play the game repeatedly?
PROBLEM 5 — CRITICAL THINKING
A classmate runs a simulation and gets P̂ = 0.43 from 200 trials, while you get P̂ = 0.47 from 200 trials of the same experiment. She says one of you must have made an error. Evaluate her claim. Then propose a strategy that would give both of you more confidence in the true probability.

Lesson Summary

A simulation uses repeated random trials to approximate a probability or expected value when exact computation is too complex. You design a simulation in five steps: define the question, choose a random device that matches the real situation, define one trial, run many trials, and analyze the data. The simulated probability P̂ = k/n (successes over total trials) and the simulated expected value Ê = (sum of outcomes)/n both converge to their true values as the number of trials increases.

The Law of Large Numbers is the mathematical backbone that guarantees convergence: more trials yield better approximations. Simulation is most valuable when the number of possible outcomes is huge, when multiple random events interact, or when no clean formula exists. Remember that simulation gives an approximate answer — different runs may produce slightly different results — but with enough trials, the approximation becomes remarkably accurate.

Varsity Tutors • Grade 11 Math • Simulating Probability & Expected Value