When a probability problem has too many combinations to list by hand and we can't run the real-world experiment thousands of times, we can estimate the probability by imitating the chance process with random numbers.
1
Simulating a Chance Process with Random Digits
Suppose a basketball player makes 70% of their free throws and takes 5 shots in tonight's game. We want to find the probability that they make at least 3 shots in a row.
Simulating a Chance Process with Random Digits
Text solution
Assign digits to match the 70% probabilityBecause there are 10 equally likely single digits from 0 to 9 (10% each), we assign 7 digits to a Make and 3 digits to a Miss.
Make (M,70%)0,1,2,3,4,5,6Miss (X,30%)7,8,9
Translate 5-digit trials and check for at least 3 in a rowEach row of 5 random digits represents one full 5-shot game, and we check whether at least 3M's appear right next to each other.
one trial(5 shots)48205⟶MX3 in a rowM M M(YES)93728⟶XMXMX(NO)11684⟶3 in a rowM M MXM(YES)62943⟶M MXM M(NO, 4 makes total, but the9 broke the streak)05327⟶4 in a rowM M M MX(YES, 4 in a row counts asat least 3)
Divide the successful trials by the total number of trialsCounting how many trials had the streak out of the 5 trials we ran gives our estimate.
Estimated Probability=Total number oftrials we ranHow many trials hadthe event happen=53=0.60=60%
So from these 5 simulated games, we estimate a 60% chance that the player makes at least 3 free throws in a row. A 5-trial estimate still bounces around with luck, but repeating the process hundreds of times makes the running proportion settle down to the true long-run probability of about 54.9%.
Try changing the player's shooting percentage to see how assigning more digits to Make creates more streaks and raises the long-run probability.
Changing which digits count as a Make lets you test any shooting percentage in 10% steps with the same random digits, turning misses into makes so 3-in-a-row streaks happen more often.
2
Two-Digit Numbers and Skipping Unused Digits
Single digits from 0 to 9 only split probability into 10% steps. Now we want to simulate a shooter who makes 73% of their shots, or a penalty kick with an equal 31 chance of going Left, Center, or Right.
Two-Digit Numbers and Skipping Unused Digits
Text solution
Read two-digit pairs (00 to 99) for single-percent probabilitiesEach pair from 00 to 99 has a 1% chance, and because 00 counts as the first number, the first 73 pairs stop at 72, not 73.
Make (73 pairs=73%)00,01,02,…,72Miss (27 pairs=27%)73,74,…,99
Assign equal-sized groups and skip leftover digits when 10 doesn't divide evenlyTo give Left, Center, and Right an exact 31 chance each, we give 3 digits to each direction and leave 0 unassigned so no direction gets an extra digit.
Left (93=31)1,2,3Center (93=31)4,5,6Right (93=31)7,8,9Skip0
Cross out skipped digits as you read the lineWhenever an unassigned digit shows up, ignore it and move to the next digit; the same rule works when picking from 8 players labeled 1 through 8, where we skip 9 and 0.
3085⟶Left, Right, Center
3
Simulating Without Replacement
In basketball and penalty kicks, every shot is independent: getting a 4 on the first shot doesn't use up the digit 4 for the next shot. Now suppose a hat holds 10 raffle tickets: tickets 1,2, and 3 belong to your friend group, and the other 7 belong to strangers. If 2 tickets are drawn for prizes without putting the first ticket back, we want to find the probability that both prizes go to your friend group.
Simulating Without Replacement
Text solution
Give each individual ticket its own digitHere each digit from 0 to 9 represents one specific ticket in the hat rather than just a percentage.
Skip repeated digits within the same trialOnce Ticket 2 is pulled for the first prize, it is no longer in the hat for the second prize, so we cross out a repeated 2 and keep reading until we have 2 different tickets.
Once a trial finishes, all 10 tickets go back into the hat for the next trial, so digits 2 and 3 can be drawn again in the following trial.
4
Running Trials Until an Event Happens
In the basketball and raffle problems, we knew before starting how many valid digits each trial needed (5 shots or 2 tickets). Now suppose a cereal company puts a golden ticket in 20% of its boxes, and you keep buying boxes until you find one. We want to find the probability that it takes more than 4 boxes to get a golden ticket.
Running Trials Until an Event Happens
Text solution
Assign digits for the 20% golden ticket rateTwo of the ten single digits represent finding a golden ticket, which also stops the trial.
Golden Ticket (20%, stop trial)0,1Empty Box (80%)2,3,4,5,6,7,8,9
Read continuously and end each trial the moment a 0 or 1 appearsInstead of grouping the digits into a fixed size ahead of time, we place a stop bar right after each 0 or 1 and count how many boxes we opened in that trial (remembering that "more than 4" means 5 or more).
Divide the trials that took more than 4 boxes by the 4 completed trials.
Estimated Probability=42=0.50=50%
So from these 4 trials, we estimate a 50% chance that it takes more than 4 boxes to find a golden ticket.
How many digits stand for a Golden Ticket decides where each trial stops and how many boxes it takes to find one.
5
Reading a Simulation Dotplot and Testing a Claim
Four trials by hand show how the simulation works, but we need many trials for a reliable probability. That also lets us test the company's 20% claim if a friend has to buy 6 boxes (or 18 boxes) to find a ticket. We have a computer run 100 trials assuming the 20% rate is true and plot how many boxes each simulated shopper needed.
Reading a Simulation Dotplot and Testing a Claim
Text solution
Count the dots for "more than 4 boxes" (5 or more) out of 100Because each dot on the plot is one complete trial of a shopper buying until they get a ticket, we add the dot counts from 5 up to 16 boxes.
Estimated P(more than 4 boxes)=1008+8+6+4+3+2+1+1+0+1+0+1=10035=0.35=35%
Test a 6-box wait by counting the dots at 6 or moreWe check how often a shopper waits at least 6 boxes just by random chance when the 20% claim is true.
Estimated P(6 or more boxes)=1008+6+4+3+2+1+1+0+1+0+1=10027=0.27=27%
Test an 18-box wait by counting the dots at 18 or moreEven the unluckiest simulated shopper out of 100 only needed 16 boxes.
Estimated P(18 or more boxes)=1000=0%
Because waiting 6 or more boxes happens in 27% of trials just by ordinary bad luck, a 6-box wait gives no reason to doubt the company's 20% claim. On the other hand, an 18-box wait (0% of trials) would almost never happen by chance if the rate were truly 20%, giving strong evidence against the claim. Running a large computer simulation like this to estimate probabilities is called a Monte Carlo simulation.
Try testing different wait times on the dotplot to see where ordinary bad luck turns into strong evidence against the 20% claim.
In 100 trials where the 20% golden ticket claim is true, the share of dots at or past any wait time shows whether waiting that many boxes is ordinary bad luck or strong evidence against the claim.
Key concepts
Every simulation estimates a probability the same way: match a random number assignment to the real-world chances, run repeated trials, and count how often the event happens.
Estimated Probability=Total number oftrials we ranHow many trials hadthe event happen
Single digits vs. two-digit pairs
Use single digits (0–9,10 digits) when probabilities are multiples of 10%, such as 0–6=Make (70%). Switch to two-digit pairs (00–99,100 pairs) for single-percent probabilities, starting at 00 so a 73% event uses 00–72 (73 pairs).
When to skip unused digits
When 10 or 100 doesn't divide evenly among equally likely outcomes (like 3 directions at 31 each, or 8 players), give every outcome the exact same number of digits (1–3,4–6,7–9) and cross out leftover digits (0) whenever they appear.
When to skip repeated digits (and when not to)
Keep repeated digits when shots or spins are independent (11684 starts with two Makes). Only skip a repeated digit within a trial when drawing specific items without replacement (227 skips the second Ticket 2), and still keep two different digits that belong to the same group (23 is two different friend-group tickets). Once the next trial begins, all digits can be used again.
Fixed length vs. until an event
Count out a fixed number of valid digits when the number of attempts is set (5 shots, 2 tickets), or read a continuous line of digits and stop each trial right after a target digit appears when waiting for an event (74931∣ takes 5 boxes).
Testing a claim on a dotplot
Each dot is one complete trial assuming the claim is true. Count the dots at or beyond the observed result: a high percentage (27% at 6+ boxes) means the wait can easily happen by ordinary bad luck, while a percentage near 0% (0% at 18+ boxes) is strong evidence against the claim.
6
Practice
1
A baseball player gets a hit in 60% of their at-bats. In tonight's game, they will bat 4 times. Using digits 0–5 for a Hit (H) and 6–9 for an Out (O), translate the 5 trials of random digits below and estimate the probability that the player gets a hit in at least 2 at-bats in a row.
Watch out at Trial 3: the player gets 2 hits total, but the Out at digit 7 separates them. Counting Trial 3 as a streak gives the wrong answer 54=80%.Also watch Trial 5: leaving out 3 in a row when the question asks for at least2 in a row gives 52=40%.
Translate each digit to H or O first. In which rows do at least two H's sit right next to each other without an O between them?
Trial 1:Trial 2:Trial 3:Trial 4:Trial 5:7248⟶O2 in a rowH HO1935⟶HO2 in a rowH H0746⟶HOHO8692⟶O O OH3107⟶3 in a rowH H HO(YES, middle two)(YES, last two)(NO)(NO)(YES, 3 in a row counts as at least 2)
(Watch out at Trial 3: the player gets 2 hits total, but the Out at digit 7 separates them. Counting Trial 3 as a streak gives the wrong answer 54=80%. Also watch Trial 5: leaving out 3 in a row when the question asks for at least2 in a row gives 52=40%.)
Estimated Probability=53=0.60=60%
2
A transit agency reports that 82% of its morning trains arrive on time. A commuter rides the morning train 3 days in a row. (a) Assign two-digit numbers from 00 to 99 to simulate whether a train is on time or late. (b) Using your assignment and the 4 trials of two-digit pairs below, estimate the probability that all 3 of the commuter's trains arrive on time.
Watch out: assigning 00–82 gives 83 numbers to On Time instead of 82, which miscounts pair 82 in Trial 2 as On Time and leads to the wrong answer 43=75%.
Because 00 counts as the first two-digit pair, which two-digit number is the 82nd pair?
(a)
On Time (82 numbers)00–81Late (18 numbers)82–99
(Watch out: assigning 00–82 gives 83 numbers to On Time instead of 82, which miscounts pair 82 in Trial 2 as On Time and leads to the wrong answer 43=75%.)
(b)
Trial 1:Trial 2:Trial 3:Trial 4:410079⟶On Time, On Time, On Time658214⟶On Time, Late (82 is Late), On Time198153⟶On Time, On Time (81 is On Time), On Time902768⟶Late, On Time, On Time(YES)(NO)(YES)(NO)
Estimated Probability=42=0.50=50%
3
On a game show, a contestant spins a wheel with 3 equal sections (Red, Blue, and Green, 31 chance each) twice. Let 1,2,3=Red,4,5,6=Blue,7,8,9=Green, and skip 0. Read the continuous line of random digits below from left to right to run 4 trials of 2 valid spins each, and estimate the probability that the contestant lands on the same color on both spins.
`2 0 3 5 8 8 0 6 9 7`
Watch out: if you forget to skip 0 in Trial 1 and read 20 as the first two spins, every trial shifts and gives the wrong answer 41=25%.
Cross out every 0 before grouping the remaining digits into pairs of 2 valid spins per trial.
(Watch out: if you forget to skip 0 in Trial 1 and read `2 0` as the first two spins, every trial shifts and gives the wrong answer 41=25%. Also, spinning a wheel is with replacement, so neither the second 8 nor the second Green digit in `9 7` is skipped.)
Estimated Probability=42=0.50=50%
4
A drawer holds 10 flashlights: 4 have dead batteries (labeled 1,2,3,4) and 6 have working batteries (labeled 5,6,7,8,9,0). You grab 2 flashlights at random without replacement. Read each trial of random digits below from left to right until 2 different flashlights are chosen, and estimate the probability that both flashlights you grab have dead batteries.
Watch out at Trial 1: you cannot grab Flashlight 3 twice. Forgetting to skip the repeated 3 counts 33 as two dead flashlights and gives the wrong answer 54=80%.
Because you grab 2 flashlights without replacement, what do you do when the exact same flashlight number repeats inside Trial 1 or Trial 5?
(Watch out at Trial 1: you cannot grab Flashlight 3 twice. Forgetting to skip the repeated 3 counts `3 3` as two dead flashlights and gives the wrong answer 54=80%.)
Estimated Probability=53=0.60=60%
5
A video game boss drops a rare key 30% of the time you defeat it, and you keep battling the boss until it drops the key. Using 0,1,2=Key drops (30%) and 3–9=No key (70%), read the continuous line of random digits below from left to right to run trials until each key drops, and estimate the probability that it takes more than 3 battles to get the key.
`6 4 1 8 5 9 3 0 2 7 4 6 2 9 1`
Watch out at Trial 1: "more than 3 battles" means 4 or more. Counting Trial 1's 3 battles as a success gives the wrong answer 53=60%.
Place a stop bar right after every 0,1, or 2, count the digits in each trial, and check whether "more than 3 battles" includes 3.
(Watch out at Trial 1: "more than 3 battles" means 4 or more. Counting Trial 1's 3 battles as a success gives the wrong answer 53=60%.)
Estimated Probability=52=0.40=40%
6
A coffee shop claims that 25% of its promotional cups are winners. A computer simulates 100 customers, each buying cups until they get their first winner, assuming the 25% claim is true. The dotplot of the 100 trials has these counts for the number of cups needed:
(a) What is the estimated probability that it takes a customer more than 5 cups to find a winner? (b) Customer A needed 7 cups to get their first winner, while Customer B needed 15 cups. Which customer has strong evidence against the coffee shop's 25% claim, and why?
Watch out: including the 9 trials at 5 cups gives 10030=30% instead of starting at 6 cups.
For (a), does "more than 5 cups" start at 5 or at 6? For (b), count how many of the 100 simulated customers waited at least as long as Customer A (7+ cups) and Customer B (15+ cups).
(a) More than 5 cups means 6 or more cups: (Watch out: including the 9 trials at 5 cups gives 10030=30% instead of starting at 6 cups.)
(b) Customer B has strong evidence against the claim. In the simulation, needing 7 or more cups happened in 5+4+2+2+0+1=14 out of 100 trials (14%), so Customer A's wait happens regularly by ordinary bad luck when the 25% claim is true (watch out: count all trials from 7 upward, not just the 5 dots at 7 cups). Needing 15 or more cups (where the most in 100 trials was 12 cups) happened in: