Tutorials › AP Statistics › Setting Up a Simulation Model

Estimating probability by simulation · Tutorial 203 of 1000

Setting Up a Simulation Model

You will define a free-throw chance model, list its possible outcomes, and decide what one trial means for the probability question.

Beginner 9 min read

What You'll Learn

  • Describe a free-throw chance process using a stated make probability and model assumptions
  • Distinguish the outcome of one shot from the outcome of a multi-shot trial
  • Define one trial to match the probability question being investigated
  • List possible sequences of makes and misses for a trial
  • Identify which outcomes meet a stated event rule
  • Explain why possible sequences do not necessarily have equal probabilities

Start With the Chance Process

In What Is a Probability Simulation, a probability simulation was defined as a chance-based process that imitates a real or model situation. In The Law of Large Numbers in Simulations, we saw that the relative frequency of an event tends to settle near its model probability across many repeated trials. Before carrying out those repetitions, we need a clear model: what happens by chance, what outcomes are possible, and what counts as one trial?

Suppose a basketball player makes 70% of free throws over the conditions we want to represent. We will use \(0.70\) as the model probability that the player makes any one shot. A chance process is the chance-based procedure being represented. Here, it is the result of a free-throw attempt: the shot is either made or missed.

This model makes assumptions that should be stated. For now, assume that each shot is independent of the others and has the same probability, \(0.70\), of being made. Those assumptions make the process repeatable in a consistent way. They may be reasonable for a simplified model, but actual shooting probabilities could change with fatigue, pressure, or other conditions.

Definition: To set up a probability simulation, specify the chance process, the possible outcomes of that process, the event of interest, and the unit that counts as one trial. The model should also state the probability assumptions used for the chance outcomes.

For one shot, there are two outcomes: a make, which we will write as \(M\), or a miss, written as \(X\). The probability of \(M\) is \(0.70\), and the probability of \(X\) is \(1-0.70=0.30\). In a multi-shot question, the outcome of a trial can be a sequence, such as \(MXX\), rather than just one letter.

Choose a Trial That Matches the Question

A trial is one repetition of the process being simulated. It is not automatically one shot. If the question asks about the result of a single free throw, one trial is one shot. If it asks about a set of three shots, one trial is one three-shot set. The trial definition determines what result gets recorded each time the simulation is repeated.

A useful way to choose the trial is to first state the probability question in ordinary language. Then decide what single, repeatable chunk of the chance process would provide one answer to that question. Finally, define the event that will count as a success within that chunk. In simulation language, “success” means that the event of interest occurs; it does not necessarily mean a basketball shot was made.

1
State the question.
Identify the chance event whose probability you want to estimate, such as making at least two shots in a three-shot set.
2
Describe the chance process.
Specify what happens by chance and the probabilities or assumptions governing its outcomes.
3
Define one trial and its outcomes.
Choose one repetition that answers the question and list the possible recorded results for that repetition.
4
Mark the event.
State which possible outcomes count as a success. This makes the result to be counted in each trial unambiguous.

A simulation model can be clear even before we decide how to generate its random outcomes. The next tutorial will address assigning random digits to outcomes. Here, the priority is to define what the random digits—or any other chance device—will need to represent.

Worked Example: Making at Least Two of Three Shots

A coach wants to estimate the probability that the player makes at least two of three consecutive free throws. Set up the chance process, outcomes, trial, and event.

Chance process and assumptions: Each shot results in a make, \(M\), with probability \(0.70\), or a miss, \(X\), with probability \(0.30\). Assume the three shots are independent and have the same make probability.

Define one trial: One trial is one set of three consecutive free throws. The recorded outcome is the ordered sequence of results for those three shots.

List the possible outcomes: Each of the three positions can be \(M\) or \(X\), so the set of possible sequences is:

$$ MMM,\ MMX,\ MXM,\ MXX,\ XMM,\ XMX,\ XXM,\ XXX $$

There are \(2 \times 2 \times 2=8\) possible sequences. The event “makes at least two of three” includes \(MMM\), \(MMX\), \(MXM\), \(XMM\), and \(XMX\), because each of those sequences has two or three makes. The other three sequences, \(MXX\), \(XXM\), and \(XXX\), do not meet the rule.

For each repetition of the simulation, the result to record as a success is whether its three-shot sequence is in that event set. This setup answers the coach’s question because it defines one trial as exactly the three-shot set described in the question.

Sequences Have Probabilities, Not Just Labels

Listing the possible sequences does not mean they are all equally likely. Under the stated model, the probability of an individual sequence depends on how many makes and misses it contains. If a sequence has \(k\) makes in three shots, its probability is \(0.70^k(0.30)^{3-k}\), because the model assumes independent outcomes.

For example, \(MMM\) has three makes, so its probability is \(0.70^3=0.343\). The sequence \(MMX\) has two makes and one miss, so its probability is \(0.70^2(0.30)=0.147\). Under this model, the number of makes determines the probability of an individual sequence; sequences with the same number of makes have the same probability. Order can matter when deciding whether a sequence meets the event rule.

That distinction is useful when the event depends on more than the total number of makes. For “at least two makes,” \(MMX\) and \(MXM\) both qualify. But if the event is “at least two consecutive makes,” \(MMX\) qualifies and \(MXM\) does not. They have the same number of makes and the same individual-sequence probability, but they do not have the same status under that event rule.

Key distinction: A list of possible outcomes tells you what can happen. It does not say that each outcome has the same probability. Use the model assumptions to determine outcome probabilities, and use the event rule to decide which outcomes count as successes.

Worked Example: Looking for Consecutive Makes

Now the coach asks for the probability that the player makes at least two consecutive shots in a set of three. Use the same free-throw model, and identify the successful outcomes.

Keep the chance process and trial: Each shot is independently made with probability \(0.70\) and missed with probability \(0.30\). One trial is still one set of three shots, recorded as an ordered sequence.

Apply the event rule: A sequence is a success if it contains two makes in adjacent positions. The successful sequences are \(MMM\), \(MMX\), and \(XMM\). The sequence \(MXM\) has two makes, but they are separated by a miss, so it is not a success.

Check the sequence probabilities: The probability of \(MMX\) is:

$$ P(MMX) = (0.70)(0.70)(0.30) = 0.147 $$

The sequence \(XMM\) has the same probability, \( (0.30)(0.70)(0.70)=0.147\), because it also has two makes and one miss. The sequence \(MXM\) also has probability \(0.147\), but it does not meet the consecutive-makes rule. In the simulation, each trial is marked a success only for \(MMM\), \(MMX\), or \(XMM\).

This example shows why the outcome must retain enough detail to apply the event rule. If the result recorded only the number of makes, \(MXM\) and \(MMX\) would both be recorded as “two makes,” and the information needed to decide whether the event occurred would be lost.

Set the Trial Boundary Before Repeating

The right trial depends on the question, not on a universal rule. Imagine instead that the coach asks about the probability of making exactly four shots in a five-shot practice set. One trial should then be one five-shot set, not one shot and not one three-shot set. Each trial has an ordered five-letter sequence, and the event is that exactly four letters are \(M\).

For five shots, there are \(2^5=32\) possible sequences. For instance, \(MMMMX\) and \(XMMMM\) both have exactly four makes and count as successes for this question. There are five successful sequences, one for each possible position of the single miss. The probability of each particular four-make sequence is \(0.70^4(0.30)=0.07203\), under the independence and constant-probability assumptions. The model does not treat the 32 sequences as equally likely.

The definition of one trial also determines the denominator in a later relative frequency. If 100 trials each represent a five-shot set, the simulation has represented 100 sets, or 500 individual shots. For the question about exactly four makes in a set, the relevant relative frequency is the number of successful sets divided by 100—not the number of made shots divided by 500.

Worked Example: Exactly Four Makes in Five Shots

A student plans to estimate the probability that the player makes exactly four free throws in a five-shot set. Specify one trial, the outcomes, the success rule, and what should be counted.

Define the chance process: For every shot, the model gives probability \(0.70\) to a make and \(0.30\) to a miss. Assume the five outcomes within a set are independent and use the same make probability.

Define one trial and its outcomes: One trial is one five-shot set. Its outcome is an ordered string of five symbols, each \(M\) or \(X\). There are \(2^5=32\) possible strings.

Identify the success event: The trial is a success if exactly one of its five symbols is \(X\), so that exactly four shots are made. Examples of success outcomes are \(MMMMX\), \(MMXMM\), and \(XMMMM\). A sequence such as \(MMMXX\) is not a success because it has only three makes.

State what the simulation will summarize: After repeating the five-shot trial, count the number of successful sets and divide by the number of sets simulated. For example, if 38 of 100 simulated sets contain exactly four makes, the relative frequency for this run is \(38/100=0.38\). This is an estimate from that run, not a statement that the model probability equals \(0.38\).

Common Mistakes and AP Exam Tips

  • Calling one shot a trial when the question concerns a set. If the event is about a three-shot or five-shot set, define one trial as that whole set. Otherwise the recorded result will not directly answer the question.
  • Leaving the event vague. “A good set” is not a precise event. Say exactly what counts, such as “at least two makes in three shots” or “at least two consecutive makes in three shots.”
  • Recording too little information. If order matters to the event rule, record the sequence, not just the total number of makes. For a consecutive-makes event, \(MMX\) and \(MXM\) cannot be treated as interchangeable.
  • Assuming possible sequences are equally likely. Under the 70% make model, \(MMM\) and \(XXX\) do not have the same probability. State the make and miss probabilities and use the independence assumption when considering sequences.
  • Confusing a made shot with a successful trial. A simulation success is the event being studied. In a question about exactly four makes in five shots, a successful trial is a whole set with that result, not an individual made shot.
  • Forgetting to state assumptions. A full setup says whether shots are assumed independent and whether the make probability stays the same. If those assumptions are not appropriate, the model may need to be revised.

For a clear AP response, connect every part of the model to the question: name the chance process, give its possible outcomes and probabilities, define one trial, and state exactly which trial outcomes count as the event. That setup makes it possible for someone else to repeat the simulation and interpret its relative frequency correctly.

Key takeaway: A simulation model begins with a precise chance process and a trial definition that matches the probability question. For multi-shot trials, preserve the sequence when order matters, and do not assume that possible sequences are equally likely.

Check Your Understanding

Use a model in which each free throw is independently made with probability \(0.70\) and missed with probability \(0.30\).

  1. A player takes four shots. If the question is the probability of making exactly three, what is one trial, and what event counts as a success?
  2. For a three-shot trial, list the sequences that represent at least two consecutive makes.
  3. Compare the probabilities of \(MMX\) and \(XMM\) under the model. Explain why they are equal.
  4. Does \(MXM\) count as a success for “at least two makes in three shots”? Does it count for “at least two consecutive makes”? Explain.
  5. Why should a simulation of “exactly four makes in a five-shot set” record successful sets rather than divide the number of made shots by the total number of shots?