Skip to main content

Unit 2 · Topic 2.3

2.3 Estimating Probabilities Using Simulation

A simulation imitates a random process with random numbers so you can estimate a probability without a formula. It works because of the law of large numbers: over many repetitions, the proportion of times an event happens settles toward its true probability.

Key terms

  • random process
  • outcome and event
  • simulation
  • relative frequency
  • law of large numbers

Key vocabulary

  • Random process: something whose results are decided by chance, like flipping a coin or picking a raffle winner.
  • Trial: one repetition of the process.
  • Outcome: the result of one trial, such as heads.
  • Event: a set of outcomes you care about, such as "at least 2 heads in 3 flips."

Probability as long-run relative frequency

The probability of an event is the proportion of times it would happen if you repeated the process a very large number of times. A probability of 0.3 means "about 30% of the time in the long run," not "exactly 3 times in every 10."

The law of large numbers says that as the number of independent trials grows, the relative frequency of an event gets closer and closer to one fixed value, its probability. It says nothing about the short run. After five tails in a row, a fair coin is not "due" for heads; each flip is still 50/50.

Running a simulation

A clear simulation description has these parts:

  • Assign random numbers to outcomes so the probabilities match the real situation. For a 70% free-throw shooter, let digits 0–6 be a make and 7–9 a miss.
  • Describe one trial: what you generate and what you record. For example, generate 5 digits and count the makes.
  • Repeat many times, and record whether the event happened in each trial.
  • Estimate the probability as (number of trials where the event happened) ÷ (total number of trials).

How good is the estimate?

A simulation gives an estimate, not the exact answer, and a different run will give a slightly different estimate. More trials give estimates that tend to be closer to the true probability.

Technology makes this fast. A calculator's randInt command, a spreadsheet or an online applet can run thousands of trials in seconds. On the exam you might instead be shown a table of random digits: read the digits in order, in groups that match one trial, and apply your assignment rule.

A simulation is only as good as its model. If the shots aren't really independent (say a player gets tired), a model that treats them as independent will be off no matter how many trials you run.

Worked examples

Try each one yourself first, then open the solution.

  1. Example 1Calculator allowed

    Design and use a simulation

    A player makes 70% of free throws, and shots are independent. Describe a simulation to estimate the probability she makes at least 4 of her next 5 shots. In 50 simulated trials, 26 had at least 4 makes. Estimate the probability.

    Show the solution
    1. Step 1: Assign digits: 0–6 = make (7 of 10 digits, matching 70%), 7–9 = miss.
    2. Step 2: One trial: generate 5 random digits (repeats allowed, since each shot is independent) and count the makes.
    3. Step 3: Record whether the count is 4 or 5.
    4. Step 4: Repeat for 50 trials. The estimate is 26/50 = 0.52.
    5. Step 5: (For comparison, the exact answer from the binomial distribution in 2.10 is about 0.528.)

    Answer: About 0.52. She makes at least 4 of 5 shots in roughly 52% of simulated sets of shots.

  2. Example 2Calculator allowed

    Trap: the "due" fallacy

    A fair coin lands tails 6 times in a row. A student says that by the law of large numbers, heads is more likely than tails on the next flip. Is this right?

    Show the solution
    1. Step 1: The law of large numbers is about the long run: the proportion of heads drifts toward 0.5 over many flips.
    2. Step 2: It doesn't say short-run streaks get corrected. A coin has no memory, so each flip is independent.
    3. Step 3: The next flip still has probability 0.5 of heads.

    Answer: No. P(heads) is still 0.5. The law of large numbers describes long-run proportions, not the next result.

Common mistakes

  • Assigning digits that don't match the probabilities (for 70%, using 0–7 gives 80%).
  • Forgetting to say whether repeated numbers are allowed. Allow repeats when trials are independent; skip them when sampling without replacement.
  • Thinking the law of large numbers makes short-run results balance out.
  • Reporting the count of successes instead of the proportion as the probability estimate.

On the exam

  • Free-response questions often ask you to describe a simulation. Say exactly how numbers map to outcomes, what one trial is, what you record and how you get the estimate.
  • You may be given a dotplot of simulated results and asked to estimate a probability: count the dots meeting the condition and divide by the total.

Connected topics

Videos

  • AP Statistics Topic 2.3 Estimating Probabilities Using Simulation | Lesson + Notes + Practice

    Michael Porinchak - AP Statistics & AP PrecalculusWatch on YouTube (opens in a new tab)

  • AP Statistics – 2.3 Estimating Probabilities Using Simulations

    The AlgebrosWatch on YouTube (opens in a new tab)

  • Random number list to run experiment | Probability | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • Experimental versus theoretical probability simulation | Probability | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • Law of Large Numbers

    The Organic Chemistry TutorWatch on YouTube (opens in a new tab)

Check yourself

4 questions on 2.3 Estimating Probabilities Using Simulation. Pick an answer to see if you got it, and why.

Question 1 of 4Calculator allowed

A basketball player makes 70% of her free throws. Which assignment of random digits (0 through 9) correctly simulates one free throw?

Question 2 of 4Calculator allowed

A game spinner lands on red 25% of the time. A student wants to estimate the probability of getting red at least 3 times in 5 spins. She simulates 5 spins 200 times and gets 3 or more reds in 21 of the 200 trials. What is the estimated probability?

Question 3 of 4Calculator allowed

A fair coin is flipped many times. Which statement is an accurate description of the law of large numbers?

Question 4 of 4Calculator allowed

About 40% of the customers at a bakery buy a coffee. A worker wants to use a simulation to estimate the probability that at least 4 of the next 6 customers buy a coffee. Which procedure is appropriate?

0 of 4 answered