Tutorials › AP Statistics › Simulating Events with Equal Probabilities

Estimating probability by simulation · Tutorial 207 of 1000

Simulating Events with Equal Probabilities

Use randInt to simulate 20 selections from five equally likely people, then tally one person’s wins and report the relative frequency.

Beginner 9 min read

What You'll Learn

  • Label five people so each has one equally likely random integer.
  • Use randInt to generate 20 simulated winners in one command or two batches.
  • Define one trial as one winner selection and identify the event to tally.
  • Count how often a chosen person wins and calculate the simulated relative frequency.
  • Explain why a 20-trial estimate may differ from the model probability.
  • Avoid common tallying and interpretation errors in simulation reports.

Simulate a Winner from Five Equally Likely People

In What Is a Probability Simulation and Setting Up a Simulation Model, you learned to specify a chance process, define one trial, and identify the event to record. In Simulating with randInt on a Calculator, you used randInt to generate outcomes. Now use that command to imitate a selection in which exactly one of five people wins, with each person equally likely to be selected.

Suppose five people enter a drawing and the winner is selected at random. Label them 1, 2, 3, 4, and 5. One simulated trial is one selection of a winner. If we want to track person 3, the event of interest is “person 3 wins.” A trial either has this event or it does not.

Definition: In this simulation, one trial is one selection of a winner from five equally likely people. Each person has one label from 1 through 5. The event of interest is that a specified person’s label is selected.

The model assumes that each selection gives all five people the same chance of winning. It also treats repeated trials as independent selections: the outcome of one simulated trial does not change the chance of any person winning in the next trial. These assumptions fit a process in which each new trial represents a fresh, fair selection from the same five people.

Under this model, a particular person has probability \(1/5=0.20\) of winning a single selection. A simulation does not change that model probability. Instead, its relative frequency gives an estimate based on the particular random outcomes generated. In 20 trials, the chosen person might win more or fewer than four times.

Generate 20 Winners with randInt

The TI-84 command randInt(lower, upper, number of values) generates random integers from the lower endpoint through the upper endpoint, including both endpoints. For this model, enter randInt(1,5,20). The calculator returns 20 integers from 1 through 5. Each integer represents the winner of one trial.

$$ \text{One simulated trial}=\text{one generated integer from 1 through 5} $$

Here, the final argument 20 means “generate 20 values,” so it represents 20 trials. This differs from using randInt(1,5,4) in the birthday example in Simulating with randInt on a Calculator, where four generated values represented four people in one group. Always match the number of generated values to the trial definition for the current simulation.

Choose the person you want to track before you inspect the results. Then count every appearance of that person’s label in the 20 generated values. Each appearance is one win for that person. Values with other labels are not wins for the person being tracked, but they are still valid outcomes and remain part of the 20 trials.

Formula: The simulated relative frequency for a specified person is the number of trials in which that person wins divided by the total number of simulated trials.
$$ \text{Simulated relative frequency} = \frac{\text{number of wins for the specified person}} {\text{total number of simulated trials}} $$

The relative frequency is an estimate of the model probability, not a guarantee that the person will win that proportion of trials in every run. As explained in The Law of Large Numbers in Simulations, results from more repeated trials tend to settle near the model probability, but a particular run can vary.

Work Through the Simulation Carefully

1
Define the trial and event.
One trial is one winner selection. Name the person whose wins will be counted.
2
Assign labels and generate outcomes.
Give each person one label from 1 through 5, then use randInt(1,5,20) for 20 trials.
3
Tally the chosen label.
Count its appearances, counting each trial once.
4
Calculate and interpret.
Divide the tally by 20 and describe the result as an estimate from this run.

A tally table can help prevent mistakes. It is not necessary to count how many times every other person wins if the question asks only about one person. However, recording all five tallies provides a useful check: together they should add to 20, because every trial has exactly one winner.

Worked Example: Tally Person 4’s Wins in 20 Trials

Five students are equally likely to win a prize in a drawing. They are labeled 1 through 5, and person 4 is the person of interest. One calculator run of randInt(1,5,20) produces the following illustrative results.

State: Estimate the probability that person 4 wins a selection, using 20 simulated selections.
Plan: Treat each generated integer as one winner selection. The labels 1 through 5 give each of the five people one outcome, so the model represents equally likely winners. Use the 20 generated values as 20 trials, and count each appearance of label 4 as a win for person 4.

Do: The simulated outcomes are:

$$ 4,\ 1,\ 3,\ 5,\ 2,\ 4,\ 4,\ 1,\ 5,\ 3,\ 4,\ 2,\ 1,\ 4,\ 5,\ 3,\ 2,\ 4,\ 1,\ 5 $$

Label 4 appears in trials 1, 6, 7, 11, 14, and 18. Therefore, person 4 wins 6 of the 20 simulated trials. The relative frequency is:

$$ \frac{\text{wins for person 4}}{\text{simulated trials}} = \frac{6}{20} = 0.30 $$

As a check, the full tally is: label 1 appears 4 times, label 2 appears 3 times, label 3 appears 3 times, label 4 appears 6 times, and label 5 appears 4 times. The counts add to \(4+3+3+6+4=20\), as they should.

Conclude: In these 20 simulated selections, person 4 won 6 times, for a relative frequency of 0.30, or 30%. This run estimates the person’s chance of winning under the equal-probability model; it does not establish that the model probability is 0.30.

Choose the Person Before Counting

The simulation can estimate the chance for any one of the five people. The label you track changes which values count as the event, but it does not change the winner-selection model. For example, to track person 2, count each 2 in the generated list. Do not count the values that look unusual or decide which person to track only after seeing the outcomes. State the event first so that the tally follows a clear, consistent rule.

You can generate 20 values in one command, or generate two batches of 10 values and keep a running tally. Two batches can make the work easier to manage, but they still make up one simulation of 20 trials. Do not restart the tally between batches. The chosen person’s count after the second batch is the total number of wins across both batches.

Worked Example: Combine Two Batches to Track Person 2

A student tracks person 2 in a fair selection among five people. To make tallying manageable, the student generates two batches of 10 values using randInt(1,5,10). Determine person 2’s simulated relative frequency across all 20 trials.

First batch: The calculator returns \(5, 2, 1, 4, 3, 5, 1, 4, 2, 3\). Label 2 appears in positions 2 and 9, so the running tally is 2 wins.

Second batch: The calculator returns \(5, 1, 4, 3, 5, 2, 1, 4, 3, 5\). Label 2 appears once, so add 1 to the running tally. Person 2 has \(2+1=3\) wins in all.

The two batches contain \(10+10=20\) trials. The simulated relative frequency is:

$$ \frac{\text{wins for person 2}}{\text{total trials}} = \frac{3}{20} = 0.15 $$
Conclude: Person 2 won 3 of the 20 selections in this run, so the simulated relative frequency is 0.15, or 15%. The run’s result can differ from the model probability of 0.20 because random outcomes vary from run to run.

Read the Tally in Context

A result such as 0.15 means that the selected person won 15% of the simulated trials in that run. It does not mean that the calculator made that person less likely to win, or that the person’s chance in the model has changed. The model gives each person a probability of 0.20 for a single selection. The simulation reports what happened across the specific 20 generated trials.

If the question asks for the estimated probability based on the simulation, give the count and the total as well as the relative frequency. “Person 2 won 3 times” is incomplete without saying there were 20 trials. “The estimated probability is 0.15” is clearer when tied to the event and the simulated run.

Worked Example: Report a 20-Trial Tally Clearly

In a new fair selection among five equally likely people, a student tracks person 5. The 20 simulated outcomes contain label 5 exactly 5 times. Write the relative frequency and a conclusion that accurately describes what the simulation shows.

Identify the count and denominator: Person 5 wins 5 times, and the simulation contains 20 trials.

Calculate the relative frequency:

$$ \frac{5}{20}=0.25 $$

The fraction is based on the 20 generated outcomes. It estimates the probability under the stated model; it is not the exact model probability. For one selection, the model probability is \(1/5=0.20\), while this particular simulation produced a relative frequency of 0.25.

Conclude: Person 5 won 5 of the 20 simulated selections, so the relative frequency for this run is 0.25, or 25%. This is an estimate from the simulation, while the model assigns person 5 a 0.20 chance of winning any one selection.

Common Mistakes and AP Exam Tips

  • Using the wrong trial definition. Here, one generated integer is one whole trial: one winner selection. Do not treat the 20 integers from randInt(1,5,20) as 20 possible people in a single selection.
  • Counting the wrong label. Decide which person is the event of interest before tallying. If tracking person 4, count 4s—not the number of different labels, the largest label, or a string of consecutive outcomes.
  • Changing the tally rule mid-simulation. Every appearance of the chosen label counts as one win, wherever it appears in the sequence. Apply the same rule to all 20 trials.
  • Restarting the count between batches. If you use two sets of 10, add the second batch’s wins to the first batch’s tally. The denominator for the combined run is 20.
  • Calling the simulated result the exact probability. The relative frequency is an estimate from those trials. A complete conclusion names the person, gives the number of wins and total trials, and says the result estimates the chance under the model.
  • Assuming every run must have exactly four wins for a person. Four is the average count suggested by 20 trials at probability 0.20, not a required result. A simulation may produce a different count.

For a clear AP-style response, state the chance model, define one trial, explain how the person’s label is counted, show the relative-frequency calculation, and interpret the result in context. If you use a calculator, say that randInt(1,5,20) represents 20 separate winner selections. A well-described process makes it possible for someone else to repeat the simulation and understand exactly what the tally represents.

Key takeaway: Label the five equally likely people 1 through 5, use randInt(1,5,20) to simulate 20 winner selections, and count each appearance of the specified person’s label. Divide that tally by 20 to estimate the person’s chance of winning. Describe the result as a relative frequency from the simulated run, not as a guaranteed or exact probability.

Check Your Understanding

Use the model in which five people are equally likely to win each selection.

  1. In randInt(1,5,20), what does the final argument 20 represent?
  2. If you are tracking person 3, which generated values count as wins for that person?
  3. In 20 simulated trials, person 1 wins 7 times. Calculate the relative frequency and describe what it estimates.
  4. A student generates two batches of 10 outcomes and gets two wins for person 4 in the first batch and one in the second. What is person 4’s relative frequency across all 20 trials?
  5. Why does a simulated relative frequency of 0.25 not change the model probability for one person in a single selection?