All AP Courses AP StatisticsAP Stats

Unit 2 · Topic 2.3 · about 20 minutes

AP Statistics 2.3: Estimating Probabilities Using Simulation

Design and carry out a simulation of a chance process, then use the relative frequency of an event to estimate its probability.

Unit 2: 15 to 25% of the multiple-choice section

What you'll be able to do

  • Estimate a probability by carrying out a simulation.

Key vocabulary

TermWhat it meansThe exam trap
Random processA process that generates results determined by chance, such as flipping a coin or opening a cereal box.A fixed fact, like how many sections a spinner has, is not the result of a random process even when it shows up in a chance problem.
OutcomeThe result of one trial of a random process.One spin is a trial and landing on 5 is the outcome it produced; mixing the two up makes a simulation hard to describe.
EventA collection of outcomes, such as landing on a number above 6 on a spinner numbered 1 to 8.Counting an event as one outcome undercounts it: landing above 6 on that spinner is two outcomes, 7 and 8.
ProbabilityThe long-run relative frequency of an outcome or event, over a very large number of trials.A relative frequency from a handful of trials, like 3 successes in 5, is only an estimate of the probability, and a shaky one.
SimulationA model of a random process in which chance picks values that stand for the outcomes, each with the same probability as in the real process.Letting the digits 0 to 6 stand for a make by a 72 percent shooter gives a probability of 0.70, so every estimate from that simulation starts off wrong.
Law of large numbersFor independent trials, as the number of trials increases, the relative frequency of an outcome or event gets closer and closer to a single value.It makes a close estimate more likely as trials pile up, never certain, so 400 thumbtack tosses can still miss the true probability by a little.

Predict first

A cereal brand puts one of 5 different toys in each box, and every box is equally likely to hold any of the five. You buy 10 boxes. How likely is it that you end up with all five toys?

The language of chance

A random process generates results that are determined by chance, like flipping a coin or opening a cereal box. One repetition of the process is a trial, and the result of one trial is an outcome. Flipping a coin once is a trial, and "heads" is an outcome. For the toys, the random process is buying 10 boxes, so one trial is opening all 10, and an outcome is the list of 10 toys you got.

An event is a collection of outcomes. "Getting all five toys in 10 boxes" is an event, and so is "getting the same toy at least three times." The probability of an event is its long-run relative frequency: the proportion of trials in which the event happens, over a very large number of trials.

Building a simulation

A simulation imitates a random process so that the simulated outcomes behave like the real ones. Then you run it many times and count. A complete simulation has four parts.

  1. Assign values to outcomes. Every possible outcome gets a value that chance will choose, with the same probability as in the real process. For the toys: the integers 1 to 5, one per toy, each equally likely.
  2. Describe one trial. Generate 10 random integers from 1 to 5, repeats allowed, one per box. Record whether all five values appear.
  3. Repeat many times. Keep the count of trials in which the event happened and the total count of trials.
  4. Estimate. The relative frequency, count divided by total, estimates the probability.
The first five simulated trials: 10 random integers from 1 to 5 in each
TrialToys in the 10 boxesAll five?
12 4 5 2 4 5 2 1 1 4No (no 3)
21 5 4 4 3 3 3 5 4 5No (no 2)
34 1 2 2 2 3 5 5 2 2Yes
44 5 2 1 4 1 5 5 3 3Yes
53 5 4 5 2 5 4 2 1 5Yes

Three successes in five trials is not an estimate worth trusting. Running 1,000 trials with technology gave all five toys in 514 of them, so the estimated probability is 5141000=0.514, close to the true value of about 0.52. Another run of 1,000 trials would give a slightly different count, and the more trials you run, the less the estimate wobbles from one run to the next.

Why the long run settles

The reason a relative frequency can stand in for a probability is the law of large numbers: for independent trials, as the number of trials increases, the relative frequency of an outcome or event gets closer and closer to a single value. That value is the probability.

The chart follows one simulated run of 500 flips of a fair coin and plots the proportion of heads so far.

Proportion of heads after each flip, one run of 500 flips

00.51Proportion of heads so far0100200300400500Number of flips

The first three flips were heads, so the proportion started at 1. After 10 flips it was still 0.9. By 100 flips it was 0.54, and after 500 flips it sat at 0.50, on the line for the true probability.

The short run is wild and the long run is steady. Anything can happen in 10 flips; once you have 500, a few more flips barely move the proportion.

The same idea lets you estimate probabilities from real data, not only from simulations. A basketball player who has made 168 of her 240 free throws this season has a relative frequency of 168240=0.70, which estimates the probability she makes her next free throw. After 240 attempts that estimate deserves far more trust than it would after 10.

Lab

Probability Simulator

Choose an event and predict its probability before you run anything. Then press Run 10, then Run 100, then Run 1,000 a few times, and watch how far the relative frequency strays from the true value as the total grows.

Open the full Probability Simulator lab

Check your understanding

1

A game uses a spinner with 8 equal sections numbered 1 to 8. Which of these is an event made up of more than one outcome?

2

A basketball player makes 72% of her free throws. To simulate one free throw, a student plans to pick a random digit from 0 to 9 and let 0 through 6 stand for a make and 7 through 9 for a miss. What is the problem with this plan?

3

A driver's route to work has 4 traffic lights. A student simulated 500 drives and recorded how many red lights the driver hit: 0 red lights in 41 drives, 1 in 137, 2 in 182, 3 in 109 and 4 in 31. Use the simulation to estimate the probability that the driver hits at most 1 red light. Give a decimal.

4

Two students estimate the probability that a thumbtack lands point up when tossed. Ana tosses it 20 times and Ben tosses it 400 times, and each computes the relative frequency of point up. Which statement is true?

5

A fair coin has landed heads on each of its last 6 flips. What is the probability that the next flip lands heads?

Exam strategy for this topic

  • Section I, Multiple Choice: 42 questions in 90 minutes.
  • Section II, Free Response: 4 questions in 90 minutes.
  • A graphing calculator with statistical capabilities is expected on both sections.

Questions students ask

How many trials does a simulation need?

More than you would guess. Five trials of the cereal toy simulation gave 3 successes, which is not worth trusting. A run of 1,000 trials gave 514, an estimate of 0.514, close to the true value of about 0.52.

Why does my simulation give a different answer each time I run it?

Each run uses new random numbers, so the count changes. The more trials in a run, the less the estimate wobbles from one run to the next.

Should repeats be allowed when I pick random numbers?

It depends on the process you are copying. Each cereal box is a fresh chance at any of the five toys, so the values 1 to 5 must be allowed to repeat. Drawing names from a hat without putting them back would call for no repeats.

Can I estimate a probability from real data instead of a simulation?

Yes. A player who has made 168 of her 240 free throws has a relative frequency of 0.70, which estimates the probability she makes her next one.

What is the difference between a trial and an outcome?

A trial is one repetition of the random process, like opening all 10 cereal boxes. The outcome is what that trial produced: the list of 10 toys you got.

Course alignment, for teachers

AP Statistics topic 2.3, Unit 2: Probability, Random Variables, and Probability Distributions.

  • Skill 3.C: Calculate and estimate expected counts, percentages, probabilities, and intervals.