Tutorials › AP Statistics › Estimating a Probability from Simulation Results

Estimating probability by simulation · Tutorial 212 of 1000

Estimating a Probability from Simulation Results

Use the number of simulated successes out of 50 trials to calculate and clearly state an estimated probability.

Beginner 8 min read

What You'll Learn

  • Identify a success as a simulated trial in which the event of interest occurs.
  • Calculate an estimated probability by dividing the number of successes by the total number of trials.
  • Count successes accurately in a table containing 50 simulated outcomes.
  • Interpret an estimate as a simulated relative frequency, not a guaranteed exact probability.
  • Choose the correct numerator and denominator when outcomes are summarized in a frequency table.

Turn Simulation Results into an Estimate

In Simulating a Fixed Number of Trials, each trial had a clear boundary and a recorded outcome. Once many trials have been completed, those recorded outcomes can help estimate the probability of an event. The basic task is to identify which trial outcomes count as successes, count them, and compare that count with the total number of simulated trials.

Here, success does not mean that an outcome is desirable. It means that the event we are investigating occurred during a trial. If the event is “the sum of two dice is 7,” a trial with a sum of 7 is a success; every other trial is not. Keep the event’s definition fixed while reading the results.

Definition: The estimated probability of an event from simulation results is the number of simulated trials in which the event occurs divided by the total number of simulated trials. It is the event’s simulated relative frequency.
$$ \text{Estimated probability of event } A = \frac{\text{number of simulated successes}}{\text{total number of simulated trials}} $$

We can write this estimate as \(\widehat{P}(A)\), read as “the estimated probability of event \(A\).” If 11 of 50 simulated trials are successes, then \(\widehat{P}(A)=11/50=0.22\), or 22%. The number of successes is the numerator; all completed trials, including those that were not successes, make up the denominator.

The estimate describes the results of the simulation. It is not a claim that the event will happen exactly 22% of the time in every set of 50 real trials, nor does the estimate have to equal the event’s actual model probability. As discussed in What Is a Probability Simulation and The Law of Large Numbers in Simulations, repeated simulated trials produce a relative frequency that can vary. The value you calculate is the estimate from the results you have.

Count the Event, Not Just a Convenient Outcome

A table may list every trial’s outcome, or it may summarize outcomes by category. In either format, first state the event clearly. Then determine which listed outcomes meet its definition. Count each qualifying trial once, and use the number of completed trials as the denominator.

1
State the event.
Specify exactly what must happen in a trial for it to count as a success.
2
Count the successes.
Read the full results table and count the trials whose outcomes meet the event definition.
3
Check the total.
Confirm how many trials were completed. Include both successes and nonsuccesses.
4
Divide and state the estimate.
Calculate successes divided by total trials, then describe the result in context.

Work from a Table of 50 Simulated Trials

Suppose each simulated trial represents rolling two fair dice once, and the recorded outcome is the sum of the two dice. We want to estimate the probability that the sum is 7. Each completed roll is one trial, and a result of 7 is a success for this event. The table below lists 50 simulated outcomes in five groups of ten.

Worked Example: Estimate the Probability of a Sum of 7

Use the table to estimate the probability that the sum of two dice is 7. Count the successes and divide by the total number of simulated trials.

TrialsRecorded sums, in trial orderNumber of sums equal to 7
1–104, 7, 9, 6, 5, 7, 8, 3, 10, 73
11–202, 7, 11, 5, 6, 8, 7, 4, 9, 32
21–307, 6, 4, 8, 12, 5, 7, 9, 2, 62
31–403, 10, 7, 5, 8, 4, 6, 7, 11, 22
41–509, 7, 3, 6, 5, 12, 8, 7, 4, 102

State: The event is that the sum of the two dice is 7. A simulated trial is a success exactly when its recorded sum is 7.

Plan: Count the 7s in all five groups, check that the table contains 50 trials, and calculate successes divided by total trials. The five groups of ten show that there are \(5 \times 10=50\) recorded trials.

Do: The groups contain 3, 2, 2, 2, and 2 sums equal to 7. The total number of successes is \(3+2+2+2+2=11\). Therefore, the estimated probability is

$$ \widehat{P}(\text{sum is 7}) = \frac{11}{50} = 0.22 = 22\% $$

Conclude: In these 50 simulated rolls, the estimated probability that the sum of two dice is 7 is 0.22, or 22%. This statement describes the simulation results; it does not say that exactly 22 of every 100 future rolls must have a sum of 7.

Counting by groups is a useful check, but the group counts must cover the entire table. Here, the five group totals add to 11 successes, and the groups account for all 50 trials. A count of 11 out of 50 is different from 11 out of 11: the latter would leave out all the trials that did not produce a 7.

Use a Frequency Table When Outcomes Are Summarized

Sometimes a simulation table combines identical outcomes into a frequency table. The frequency tells how many trials had an outcome in a listed category. If the event includes more than one category, add the frequencies of all categories that meet the event definition. Then divide by the total frequency, which is the total number of trials.

Worked Example: Estimate a Probability from Outcome Frequencies

A simulation of a three-shot practice round records the number of successful shots in each trial. Across 50 simulated rounds, the frequency table is as follows. Estimate the probability that exactly two shots are successful in a round.

Successful shots in a trialNumber of trials
05
114
220
311
Total50

The event is “exactly two successful shots.” Only the row for 2 successful shots counts, so there are 20 successes. The denominator is 50, as confirmed by adding all the frequencies: \(5+14+20+11=50\). Thus,

$$ \widehat{P}(\text{exactly 2 successful shots}) = \frac{20}{50} = 0.40 = 40\% $$

The estimated probability that exactly two shots are successful in a simulated round is 0.40, or 40%. The other rows are not successes for this particular event, but they still belong in the denominator because they are part of the 50 simulated trials.

Check: In a frequency table, a row’s frequency is a count of trials, not a probability. Add the frequencies for qualifying outcomes to get the numerator, and use the sum of all frequencies for the denominator.

Pay attention to the wording of the event. “Exactly two successful shots” includes the row for 2, but not the rows for 0, 1, or 3. A different event could include multiple rows, so do not choose the numerator until you have matched the event definition to the table.

Combine Categories That Meet the Event

A category table can also make it necessary to combine several rows. For example, an event defined as a wait of 5 minutes or less includes every simulated wait in the 0–2 minute and 3–5 minute categories. It does not include a whole category just because some values in that category are close to the cutoff. A grouped table only supports counting at the level of the categories it provides.

Worked Example: Count All Categories Included in an Event

A community shuttle’s waiting time is simulated 50 times, with each wait recorded in whole minutes, and summarized in the frequency table below. Estimate the probability that a simulated wait is 5 minutes or less.

Simulated waiting timeNumber of trials
0–2 minutes8
3–5 minutes17
6–8 minutes15
9–11 minutes10
Total50

The event is a waiting time of 5 minutes or less. The first two categories qualify, so the number of successes is \(8+17=25\). The denominator is the total of all four frequencies, \(8+17+15+10=50\). The estimate is

$$ \widehat{P}(\text{wait is 5 minutes or less}) = \frac{25}{50} = 0.50 = 50\% $$

Based on the 50 simulated waits, the estimated probability of a wait of 5 minutes or less is 0.50, or 50%. The 6–8 minute and 9–11 minute categories are excluded from the numerator because their recorded waits exceed 5 minutes, but they remain part of the denominator.

This example also shows why reading the event precisely matters. “5 minutes or less” includes 5 minutes; “less than 5 minutes” would not. If a table groups outcomes in categories, check that the category boundaries let you count the event correctly. Do not count only some of a category when the table does not provide enough detail to separate those trials.

Common Mistakes and AP Exam Tips

  • Using the number of successes as the denominator. The denominator is the total number of completed trials, not the success count. If 11 of 50 trials are successes, use \(11/50\), not \(11/11\).
  • Leaving out nonsuccesses. Every completed trial belongs in the denominator, even when the event did not occur.
  • Counting outcomes that do not meet the event. Translate the event into a clear rule before counting. For “exactly two,” count only two; for “5 minutes or less,” include qualifying categories through 5 minutes.
  • Confusing a frequency with a probability. A frequency such as 20 is a count. Divide it by the number of trials to obtain the estimated probability, such as \(20/50=0.40\).
  • Calling the estimate an exact or guaranteed probability. State that it is the estimate from the simulated trials. Simulation results can vary from one run to another.
  • Reporting a number without context. A statement like “0.22” does not identify the event or the trials. Say, for example, “The estimated probability that a simulated roll of two dice has a sum of 7 is 0.22.”

For a full-credit response, make the event, count, denominator, calculation, and interpretation easy to find. A complete statement can be short: “The event occurred in 11 of the 50 simulated trials, so the estimated probability that the sum is 7 is \(11/50=0.22\), or 22%.” This reports the simulated relative frequency in context without suggesting it is a guaranteed result for future trials.

Key takeaway: To estimate a probability from simulation results, count the trials in which the specified event occurs and divide by the total number of completed trials. State the result as an estimate for that event, based on those simulated trials.

Check Your Understanding

Use the simulated results and event descriptions to calculate each estimated probability. State what each estimate means in context.

  1. In 50 simulated trials, an event occurs 14 times. What is its estimated probability as a decimal and as a percentage?
  2. A frequency table lists 50 simulated outcomes: 0 occurs 8 times, 1 occurs 12 times, 2 occurs 19 times, and 3 occurs 11 times. Estimate the probability that the outcome is exactly 2.
  3. Using the same frequency table, estimate the probability that the outcome is 2 or 3. Identify the success count and denominator.
  4. A student counts 9 successes in a table of 50 trials and reports \(9/9=1\). Explain the mistake and give the correct calculation.
  5. Why should an estimated probability from 50 simulated trials not be described as a guarantee about the next 50 real trials?