AP Statistics / Unit 2: Probability, Random Variables, and Probability Distributions / Topic 2.3
NUM8ERS study notes · Topic 2.3

Estimating Probabilities Using Simulation

Model a chance process, repeat complete trials, and count when the event happens. Learn to choose a valid random-digit mapping, calculate a simulation estimate, and explain what more trials can—and cannot—tell you.

2026–27 curriculum6 worked examples10 practice questionsSimulation + visual guides

By the end of this lesson, you should be able to:

  • Distinguish a random process, a trial, an outcome and an event.
  • Describe a random mechanism that matches the probabilities and conditions in a model.
  • Define 11 complete trial, including its stopping and recording rules.
  • Estimate an event probability from the number of event hits and complete trials.
  • Explain long-run behavior without expecting short-run results to balance automatically.

Before you start: Be comfortable with counttotal\frac{\text{count}}{\text{total}} and with interpreting a relative frequency. Review Topic 2.2: Summary Statistics for Two Categorical Variables if needed.

First time learning this? Follow the basketball example from the random-digit model to the trial log. Keep asking “What is 11 trial?”

Here to revise? Use the simulation checklist, then try the practice before opening the solutions.

The concept in 60 seconds

A simulation uses a random mechanism to imitate a process. Instead of repeating the real situation, we repeat its model and see how often the event of interest occurs.

For example, random digits can represent made and missed basketball attempts. If our question concerns 33 attempts together, we must simulate the full set of 3\text{of }3 before deciding whether the event happened.

The central calculation:

Estimated event probability=complete trials in which the event occurstotal complete trials\text{Estimated event probability}=\frac{\text{complete trials in which the event occurs}}{\text{total complete trials}}
11 trial: 33 attempts, 11 event decision
1 complete basketball trial1\text{ complete basketball trial}
7→X\mathtt{7}\to\mathtt{X}1→M\mathtt{1}\to\mathtt{M}4→M\mathtt{4}\to\mathtt{M}

Outcome: XMM\texttt{XMM} · Make count: 22

Event: at least 2 makes→Yes\text{Event: at least }2\text{ makes}\to\text{Yes}
FirstGenerate and translate

Use 33 independent digits. M=Make\mathrm{M}=\text{Make}; X=Miss\mathrm{X}=\text{Miss}.

ThenScore the complete set

Record 1 Yes1\text{ Yes} if the set has 2 or 32\text{ or }3 makes.

The outline encloses 11 trial. Its 33 attempts contribute 11 event decision, not 33 trial results.

11 trial may need several random draws. Count the event 1 time per trial\text{Count the event }1\text{ time per trial}, even if there are several individual successes inside that trial.

Quick check: are 33 attempts always 33 trials?

No. It depends on the question. If the event is “at least 22 makes in a set of 33 attempts,” the complete set of 3\text{of }3 is 11 trial. If the question is about a single attempt, then 11 attempt can be 11 trial.

A basketball question

In an original fictional example, a player takes 3 free throws3\text{ free throws}. Our simplified model assumes that each attempt is made with probability 0.700.70 and that attempts are independent: the model’s chance of making an attempt is unchanged by earlier results.

Investigative question: under this model, what is the probability that the player makes at least 2\text{at least }2 of 33 attempts?

“At least 2\text{At least }2” includes exactly 22 makes and all 33 makes. A trial ends after the 3rd attempt3\text{rd attempt}. We record Yes if there are 2 or 32\text{ or }3 makes, and No if there are 0 or 10\text{ or }1.

The 0.700.70 input describes 11 attempt. Our target concerns a set of 33 attempts. These are different events, so do not automatically give 0.700.70 as the answer to the question.

The simulation estimates a probability for the stated model. It does not establish that a real player’s success rate stays constant or that real attempts are independent. Those assumptions must fit the situation before the model’s results are used outside this example.

Key ideas and notation

Random process

A process whose result is determined by chance.

Generating random digits to model a set of free throws.

Trial

One complete repetition of the process being studied.

Simulate all 33 attempts and score the set 1 time\text{score the set }1\text{ time}.

Outcome

The result of 11 trial, recorded at the detail needed for the question.

The ordered pattern Miss–Make–Make, written XMM\texttt{XMM}.

Event

A collection of outcomes that satisfy a specified condition.

At least 22 makes: MMM\texttt{MMM}, MMX\texttt{MMX}, MXM\texttt{MXM} or XMM\texttt{XMM}. M\texttt{M} means Make; X\texttt{X} means Miss.

A model probability and an estimate

The model gives a 0.700.70 chance for a make on an individual attempt. After simulating sets of 3\text{of }3, the relative frequency of event hits estimates the chance of at least 22 makes per set.

p^=event hitscompleted trials\hat p=\frac{\text{event hits}}{\text{completed trials}}

If an event happens in 7777 of 100100 trials, the estimate is 77100=0.77=77%\frac{77}{100} = 0.77 = 77\%.

You may see this estimate written as p^\hat{p}, read “p-hat.” The mark reminds us that it is an estimate from a finite run. It is not a promise about the next trial.

Probabilities and estimated proportions lie between 00 and 11, or between 0%0\% and 100%100\%. A ratio above 11 is a signal to check what you counted.

Build a valid simulation

1. Choose an appropriate random mechanism

Generate random integers from 00 through 99, inclusive, with each digit equally likely. Map 77 digits to Make and 3 to Miss3\text{ to Miss}. For this independent-attempt model, generate each new digit independently; repeated digits are allowed.

Random-digit mapping: 7 Make digits7\text{ Make digits}, 3 Miss digits3\text{ Miss digits}
00M\texttt{M}11M\texttt{M}22M\texttt{M}33M\texttt{M}44M\texttt{M}55M\texttt{M}66M\texttt{M}77X\texttt{X}88X\texttt{X}99X\texttt{X}
Make · M\texttt{M}00, 11, 22, 33, 44, 55, 66

77 of 1010 equally likely digits
Chance=70%\text{Chance}=70\%

Miss · X\texttt{X}77, 88, 99

33 of 1010 equally likely digits
Chance=30%\text{Chance}=30\%

Both color and the labels M\texttt{M} and X\texttt{X} identify the categories. The digit 00 is a possible value and belongs to Make.

Digits 0–60\text{-}6 contain 77 possible values, including 0\text{including }0. Digits 7–97\text{-}9 contain 3\text{contain }3. Thus the mechanism models Make with chance 710=0.70\frac{7}{10} = 0.70 and Miss with chance 310=0.30\frac{3}{10} = 0.30.

A fair coin mapped to Make and Miss would give 50%50\% and 50%50\%, so it would model a different player. A random mechanism should match the stated probabilities, not just produce 2 possible labels2\text{ possible labels}.

2. Define one complete trial

Generate 33 digits, translate each into M\texttt{M} or X\texttt{X}, and count the makes. Record whether the count is at least 2\text{at least }2. Stop that trial after its 3rd attempt3\text{rd attempt}, then begin a new trial using the same rules.

Keep the boundary: 714∣483∣838\mathtt{714}\mid\mathtt{483}\mid\mathtt{838}
Trial 1 · 33 digits714\texttt{714}

XMM\texttt{XMM} · 22 makes

Event: Yes
Trial 2 · 33 digits483\texttt{483}

MXM\texttt{MXM} · 22 makes

Event: Yes
Trial 3 · 33 digits838\texttt{838}

XMX\texttt{XMX} · 11 make

Event: No

Each outlined group is 11 complete trial. Start a new group after every 3rd digit3\text{rd digit}; translate and score all 33 digits in that group.

3. Repeat and record consistently

Choose a total number of trials before running the simulation. Use enough repetitions for a useful estimate. Keep the random mechanism, assumptions, event definition and trial boundary unchanged throughout the run.

A random-number generator, a random-digit table, or an appropriate physical device can supply randomness. Reading 33 digits per trial from a random-digit table is valid here. Picking numbers you think “look random” can introduce patterns and is not a substitute for a random mechanism.

4. Decide whether replacement belongs in the model

For the basketball model, a digit must be available again on every attempt. If using 1010 digit cards physically, return and mix the card after each draw. Removing cards would change the next attempt’s chances and create dependence.

Match replacement to the process
Independent basketball attemptsRepeated digits are allowed
111144

Accept all 33 digits. They represent distinct attempts with the same make chance.

114→MMM→1 Yes\mathtt{114}\to\mathtt{MMM}\to1\text{ Yes}

22 distinct tickets without replacementRepeated IDs are skipped
1111 · skip88

Accept IDs 11 and 88. The same ticket cannot be selected 2 times\text{same ticket cannot be selected }2\text{ times} within this trial.

Reset all 1010 tickets before the next trial.

Ticket IDs identify distinct objects. A repeated category, such as 22 different winning tickets, is allowed when the IDs are different.

Replacement is not a universal rule. When a real situation draws distinct objects without replacement, a faithful simulation must reproduce that dependence within a trial. To make successive whole trials independent, reset to the original setup between trials.

A complete plan names: the device and mapping, assumptions, 11 trial’s steps, its stopping rule, the recorded result, the repetition count, and the final ratio.

Read and estimate from a simulation log

The following log comes from a computer-generated example run of the basketball model. 44 trials are shown as cards; open the full 10-trial10\text{-trial} log to trace every result. M\texttt{M} means Make and X\texttt{X} means Miss.

From trial outcomes to an event-frequency estimate
Trial 1714→XMM\mathtt{714}\to\mathtt{XMM}

22 makes

At least 22? Yes
Trial 2483→MXM\mathtt{483}\to\mathtt{MXM}

22 makes

At least 22? Yes
Trial 3838→XMX\mathtt{838}\to\mathtt{XMX}

11 make

At least 22? No
Trial 4880→XXM\mathtt{880}\to\mathtt{XXM}

11 make

At least 22? No
Open the full 10-trial10\text{-trial} simulation log
First 1010 complete trials from one generated example run. M=Make\mathrm{M}=\text{Make}; X=Miss\mathrm{X}=\text{Miss}.
TrialDigitsOutcomeMakesEvent: at least 22
1714\texttt{714}XMM\texttt{XMM}22Yes
2483\texttt{483}MXM\texttt{MXM}22Yes
3838\texttt{838}XMX\texttt{XMX}11No
4880\texttt{880}XXM\texttt{XXM}11No
5103\texttt{103}MMM\texttt{MMM}33Yes
6114\texttt{114}MMM\texttt{MMM}33Yes
7796\texttt{796}XXM\texttt{XXM}11No
8530\texttt{530}MMM\texttt{MMM}33Yes
9127\texttt{127}MMX\texttt{MMX}22Yes
10232\texttt{232}MMM\texttt{MMM}33Yes

710=0.70\frac{7}{10}=0.70

Original computer-generated example: independent uniform digits 0–90\text{-}9; digits 0–6↦Make\text{digits }0\text{–}6\mapsto\text{Make}. This small run illustrates the method, rather than establishing the exact event probability.

There are 77 event hits in 1010 complete trials, so the estimate from this small run is 710=0.70=70%\frac{7}{10} = 0.70 = 70\%. The denominator is 1010 sets, not 3030 attempts. The event was scored 1 time\text{event was scored }1\text{ time} for each complete set.

This small estimate happens to equal the input make probability, 0.700.70, but the 22 numbers describe different events. Longer simulated runs need not keep that equality. In the same generated run, the event occurs in 7777 of the first 100100 trials and 791791 of the first 1,0001{,}000 trials, giving estimates of 77%77\% and 79.1%79.1\%.

Cumulative totals and separate batches

The 1010-trial, 100100-trial and 1,0001{,}000-trial summaries are prefixes of the same run. Do not add them: the first 1010 trials are already included in the first 100\text{first }100, and all of those are included in the first 1,000\text{first }1{,}000.

When combining separate runs that use the same model and event, add event hits and add completed trials. Do not average percentages unless the run sizes are equal. Keep incomplete trials separate until they can be completed under the defined rules.

Why does MMM\texttt{MMM} count as 11 event hit rather than 3\text{rather than }3?

The event is defined for the complete set: “at least 22 makes in 33 attempts.” MMM\texttt{MMM} satisfies that condition 1 time\text{satisfies that condition }1\text{ time}. Counting its 33 makes would estimate an individual-attempt quantity instead of counting event hits for complete sets.

Understand the long run

The probability of an outcome or event describes its long-run relative frequency. A finite simulation gives an estimate, which varies from run to run.

The law of large numbers explains why, for independent repetitions of the same chance process, the cumulative relative frequency tends to stabilize near the event’s probability as the number of trials grows. It does not require every new estimate to be closer than the previous one.

To see this clearly, switch to a separate fair-coin experiment. Here 11 trial is 11 toss, the event is Heads, and the model probability is 0.500.50. These trials are not the 3-attempt3\text{-attempt} basketball sets.

Long-run relative frequency: one fair-coin simulation
One generated fair-coin run: cumulative Heads share fluctuates and reaches 49.4% after 1,000 tosses. Dashed line: model probability 50%. 0 250 500 750 1000 Complete toss trials 0% 25% 50% 75% 100% Cumulative Heads share 494/1,000 = 49.4% Simulated Heads share Fair-coin model: 50 percent
One generated fair-coin run: cumulative Heads share fluctuates and reaches 49.4% after 1,000 tosses. Dashed line: model probability 50%. 0 500 1000 Complete toss trials 0% 25% 50% 75% 100% Cumulative Heads share 494/1,000 = 49.4% Simulated Heads share Fair-coin model: 50 percent

Solid olive curve: cumulative Heads countcompleted tosses\frac{\text{cumulative Heads count}}{\text{completed tosses}}. Dashed line: 50%50\% model probability. This is one generated run of 1,0001{,}000 independent fair-coin tosses; another run will differ. The curve need not get closer at every step.

Selected cumulative prefixes of the same fair-coin run. The denominator is the number of complete toss trials.
Complete toss trialsCumulative HeadsHeads relative frequency
1010440.4000.400 (40.0%40.0\%)
2020770.3500.350 (35.0%35.0\%)
505017170.3400.340 (34.0%34.0\%)
10010043430.4300.430 (43.0%43.0\%)
20020091910.4550.455 (45.5%45.5\%)
5005002432430.4860.486 (48.6%48.6\%)
100010004944940.4940.494 (49.4%49.4\%)

In this run, the Heads share is 410=0.40\frac{4}{10} = 0.40 after 1010 tosses and 720=0.35\frac{7}{20} = 0.35 after 20\text{after }20. It moved farther from 0.500.50 over that interval. Later, 4941,000=0.494\frac{494}{1{,}000} = 0.494 is close to 0.500.50. That illustrates the difference between a long-run tendency and a guarantee about the next step.

More trials do not repair a wrong model

If you wrongly map 8 of 108\text{ of }10 digits to Make, the simulated player has an 80%80\% single-attempt make probability. Running thousands of trials estimates probabilities for that incorrect model more steadily; it does not turn the model into a 70%70\% player.

Earlier results do not make a correction “due”

For independent fair-coin tosses, the next toss still has a 0.500.50 chance of Heads after a long run of Heads. A coin does not remember the earlier imbalance. Its proportion can move toward 0.500.50 over many tosses without forcing the next toss to be Tails.

Use both ideas: a suitable model determines what you are estimating; many independent complete trials help make that estimate more stable. Neither guarantees an exact answer from a particular finite run.

Six worked examples

Example 1: score one complete basketball trial

Question: The digits are 22, 66, 88. Does the event “at least 22 makes in 33 attempts” occur?

  1. 0–60\text{-}6 maps to
    Posted on Google Google
    0000003998 : Abdad Alam Shamim Alam profile picture
    0000003998 : Abdad Alam Shamim Alam
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    This is the bestest institution I have ever come to and I love it very much.
    Posted on Google Google
    Aliki S profile picture
    Aliki S
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    Posted on Google Google
    Ali profile picture
    Ali
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    Sly is him
    Posted on Google Google
    Jitendra Kumar Kumawat profile picture
    Jitendra Kumar Kumawat
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    Posted on Google Google
    Raahil Hasan profile picture
    Raahil Hasan
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    Posted on Google Google
    Tina Mudarres profile picture
    Tina Mudarres
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    The classes are amazing and my child learnt so much
    Posted on Google Google
    alisha gadoya profile picture
    alisha gadoya
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    I have experienced a lot of good things, it has taught me so many things and from B/Cs I have gone to an A! This is wonderful and Mavish’s class is awesome.
    Posted on Google Google
    smasher 123 profile picture
    smasher 123
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    It’s sensational my kid went. First he only would get C now it’s all A’s really good and recommend
    Posted on Google Google
    Mosa Al- Samaraie profile picture
    Mosa Al- Samaraie
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    AMAZING PRICES GREAT TEACHERS STRAIGHT FORWARD LEARNING STEADY PACE IN TUTORING
    Posted on Google Google
    Cael Dagnelie profile picture
    Cael Dagnelie
    Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
    I had a great experience learning math with Ms. Mavish. She explains complex topics in a very clear and simple way, which made it easier for me to understand and enjoy the subject. Her patience and dedication really stood out, and she always made sure that everyone in the class was keeping up. I especially appreciated how approachable she was — I never felt afraid to ask questions, and she was always willing to help. Thanks to her teaching, my confidence in math has grown a lot. I’m really thankful for the effort she puts into every lesson!

    NUM8ERS is one of finest tutoring institutes in UAE, Located in Al Barsha 1, Dubai. Close to DUBAI AMERICAN ACADEMY (DAA) & AMERICAN SCHOOL OF DUBAI (ASD).