StatisticsProbability Rules2 of 7
Probability Rules · 2

Simulation

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%\counted{70\%} of their free throws and takes 55 shots in tonight's game. We want to find the probability that they make at least 33 shots in a row.

Simulating a Chance Process with Random Digits
70% shooter\htmlClass{lc-blue}{70\%}\text{ shooter}
5 shots\text{5 shots}
P(at least 3 in a row)= ?P(\text{at least 3 in a row}) = \,?
Text solution
Assign digits to match the 70%\counted{70\%} probabilityBecause there are 1010 equally likely single digits from 00 to 99 (10%10\% each), we assign 7\counted{7} digits to a Make and 3\other{3} digits to a Miss.
0,1,2,3,4,5,6⏟Make (M, 70%)7,8,9⏟Miss (X, 30%)\displaystyle \counted{\underbrace{0, 1, 2, 3, 4, 5, 6}_{\text{Make } (\text{M},\, 70\%)}} \qquad \other{\underbrace{7, 8, 9}_{\text{Miss } (\text{X},\, 30\%)}}
Translate 55-digit trials and check for at least 33 in a rowEach row of 55 random digits represents one full 55-shot game, and we check whether at least 33 M\counted{\text{M}}'s appear right next to each other.
4  8  2  0  5⏟one trial(5 shots)⟶M X M M M⏟3 in a row(YES)9  3  7  2  8⟶X M X M X(NO)1  1  6  8  4⟶M M M⏟3 in a row X M(YES)6  2  9  4  3⟶M M X M M(NO, 4 makes total, but the9 broke the streak)0  5  3  2  7⟶M M M M⏟4 in a row X(YES, 4 in a row counts asat least 3)\displaystyle \begin{aligned} &\underbrace{4\ \ 8\ \ 2\ \ 0\ \ 5}_{\begin{gathered}\scriptstyle\text{one trial} \\ \scriptstyle\text{(5 shots)}\end{gathered}} \longrightarrow \text{\counted{M} \other{X} }\event{\underbrace{\text{\counted{M M M}}}_{\text{3 in a row}}} \\ &\qquad\text{(\event{YES})} \\[4pt] &9\ \ 3\ \ 7\ \ 2\ \ 8 \longrightarrow \text{\other{X} \counted{M} \other{X} \counted{M} \other{X}} \\ &\qquad\text{(NO)} \\[4pt] &1\ \ 1\ \ 6\ \ 8\ \ 4 \longrightarrow \event{\underbrace{\text{\counted{M M M}}}_{\text{3 in a row}}}\text{ \other{X} \counted{M}} \\ &\qquad\text{(\event{YES})} \\[4pt] &6\ \ 2\ \ 9\ \ 4\ \ 3 \longrightarrow \text{\counted{M M} \other{X} \counted{M M}} \\ &\qquad\text{(NO, } 4 \text{ makes total, but the} \\ &\qquad 9 \text{ broke the streak)} \\[4pt] &0\ \ 5\ \ 3\ \ 2\ \ 7 \longrightarrow \event{\underbrace{\text{\counted{M M M M}}}_{\text{4 in a row}}}\text{ \other{X}} \\ &\qquad\text{(\event{YES}, } 4 \text{ in a row counts as} \\ &\qquad\text{at least } 3\text{)} \end{aligned}
Divide the successful trials by the total number of trialsCounting how many trials had the streak out of the 55 trials we ran gives our estimate.
Estimated Probability=How many trials hadthe event happenTotal number oftrials we ran=35=0.60=60%\displaystyle \begin{aligned} &\text{Estimated Probability} \\ &\qquad = \frac{\begin{gathered}\text{\event{How many trials had}} \\ \text{\event{the event happen}}\end{gathered}}{\begin{gathered}\text{Total number of} \\ \text{trials we ran}\end{gathered}} \\ &\qquad = \frac{\event{3}}{5} = \event{0.60} = \event{60\%} \end{aligned}

So from these 55 simulated games, we estimate a 60%\event{60\%} chance that the player makes at least 33 free throws in a row. A 55-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%\reference{54.9\%}.

0%\text{0\%}
50%\text{50\%}
100%\text{100\%}
11
22
33
44
55
trial\text{trial}
proportion with the event\text{proportion with the event}
100%\htmlClass{lc-green}{100\%}
50%\htmlClass{lc-green}{50\%}
66.7%\htmlClass{lc-green}{66.7\%}
50%\htmlClass{lc-green}{50\%}
60%\htmlClass{lc-green}{60\%}
0%\text{0\%}
50%\text{50\%}
100%\text{100\%}
11
1010
100100
1,0001{,}000
number of trials\text{number of trials}
54.9%\htmlClass{lc-violet}{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 00 to 99 only split probability into 10%10\% steps. Now we want to simulate a shooter who makes 73%\counted{73\%} of their shots, or a penalty kick with an equal 13\tfrac{1}{3} chance of going Left, Center, or Right.

Two-Digit Numbers and Skipping Unused Digits
00
11
22
33
44
55
66
77
88
99
Make 70%\htmlClass{lc-blue}{\text{Make 70\%}}
Miss 30%\htmlClass{lc-orange}{\text{Miss 30\%}}
73% shooter\htmlClass{lc-blue}{73\%}\text{ shooter}
4% defects\text{4\% defects}
Text solution
Read two-digit pairs (0000 to 9999) for single-percent probabilitiesEach pair from 0000 to 9999 has a 1%1\% chance, and because 00\counted{00} counts as the first number, the first 73\counted{73} pairs stop at 72\counted{72}, not 73\other{73}.
00,01,02,…,72⏟Make (73 pairs=73%)73,74,…,99⏟Miss (27 pairs=27%)\displaystyle \counted{\underbrace{00, 01, 02, \dots, 72}_{\text{Make } (73\text{ pairs} = 73\%)}} \quad \other{\underbrace{73, 74, \dots, 99}_{\text{Miss } (27\text{ pairs} = 27\%)}}
Assign equal-sized groups and skip leftover digits when 1010 doesn't divide evenlyTo give Left, Center, and Right an exact 13\tfrac{1}{3} chance each, we give 33 digits to each direction and leave 00 unassigned so no direction gets an extra digit.
1,2,3⏟Left (39=13)4,5,6⏟Center (39=13)7,8,9⏟Right (39=13)0⏟Skip\displaystyle \begin{gathered}\groupone{\underbrace{1, 2, 3}_{\textstyle\text{Left } (\tfrac{3}{9} = \tfrac{1}{3})}} \qquad \grouptwo{\underbrace{4, 5, 6}_{\textstyle\text{Center } (\tfrac{3}{9} = \tfrac{1}{3})}} \\ \groupthree{\underbrace{7, 8, 9}_{\textstyle\text{Right } (\tfrac{3}{9} = \tfrac{1}{3})}} \qquad \skipped{\underbrace{0}_{\textstyle\text{Skip}}}\end{gathered}
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 88 players labeled 11 through 88, where we skip 99 and 00.
3  0  8  5⟶Left, Right, Center\displaystyle 3\ \ \skipped{\cancel{0}}\ \ 8\ \ 5 \longrightarrow \text{\groupone{Left}, \groupthree{Right}, \grouptwo{Center}}
3

Simulating Without Replacement

In basketball and penalty kicks, every shot is independent: getting a 44 on the first shot doesn't use up the digit 44 for the next shot. Now suppose a hat holds 1010 raffle tickets: tickets 1,2,\counted{1}, \counted{2}, and 3\counted{3} belong to your friend group, and the other 7\other{7} belong to strangers. If 22 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
P(both prizes to friend group)= ?P(\text{both prizes to }\htmlClass{lc-blue}{\text{friend group}}) = \,?
11
22
33
44
55
66
77
88
99
00
friend group\htmlClass{lc-blue}{\text{friend group}}
strangers\htmlClass{lc-orange}{\text{strangers}}
Prize 1\text{Prize 1}
Prize 2\text{Prize 2}
Text solution
Give each individual ticket its own digitHere each digit from 00 to 99 represents one specific ticket in the hat rather than just a percentage.
1,2,3⏟Friend group’s tickets (3 tickets)4,5,6,7,8,9,0⏟Strangers’ tickets (7 tickets)\displaystyle \begin{gathered}\counted{\underbrace{1, 2, 3}_{\text{Friend group's tickets } (3\text{ tickets})}} \\ \other{\underbrace{4, 5, 6, 7, 8, 9, 0}_{\text{Strangers' tickets } (7\text{ tickets})}}\end{gathered}
Skip repeated digits within the same trialOnce Ticket 2\counted{2} is pulled for the first prize, it is no longer in the hat for the second prize, so we cross out a repeated 22 and keep reading until we have 22 different tickets.
Same ticket repeats:2  2  7⟶Ticket 2 (Friend),Ticket 7 (Stranger)(NO)Two different friend tickets:2  3⟶Ticket 2 (Friend),Ticket 3 (Friend)(YES)\displaystyle \begin{aligned} &\text{Same ticket repeats:} \\ &\quad 2\ \ \skipped{\cancel{2}}\ \ 7 \longrightarrow \text{\counted{Ticket 2 (Friend)},} \\ &\qquad\quad \text{\other{Ticket 7 (Stranger)}} \quad \text{(NO)} \\[6pt] &\text{Two different friend tickets:} \\ &\quad 2\ \ 3 \longrightarrow \text{\counted{Ticket 2 (Friend)},} \\ &\qquad\quad \text{\counted{Ticket 3 (Friend)}} \quad \text{(\event{YES})} \end{aligned}

Once a trial finishes, all 1010 tickets go back into the hat for the next trial, so digits 2\counted{2} and 3\counted{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 (55 shots or 22 tickets). Now suppose a cereal company puts a golden ticket in 20%\reference{20\%} of its boxes, and you keep buying boxes until you find one. We want to find the probability that it takes more than 44 boxes to get a golden ticket.

Running Trials Until an Event Happens
claim: golden ticket in 20% of boxes\text{claim: golden ticket in }\htmlClass{lc-violet}{20\%}\text{ of boxes}
P(more than 4 boxes)= ?P(\text{more than 4 boxes}) = \,?
Text solution
Assign digits for the 20%\counted{20\%} golden ticket rateTwo of the ten single digits represent finding a golden ticket, which also stops the trial.
0,1⏟Golden Ticket (20%, stop trial)2,3,4,5,6,7,8,9⏟Empty Box (80%)\displaystyle \begin{gathered}\counted{\underbrace{0, 1}_{\text{Golden Ticket } (20\%,\text{ stop trial})}} \\ \other{\underbrace{2, 3, 4, 5, 6, 7, 8, 9}_{\text{Empty Box } (80\%)}}\end{gathered}
Read continuously and end each trial the moment a 0\counted{0} or 1\counted{1} appearsInstead of grouping the digits into a fixed size ahead of time, we place a stop bar right after each 0\counted{0} or 1\counted{1} and count how many boxes we opened in that trial (remembering that "more than 44" means 55 or more).
7  4  9  3  1⏟Trial 1: 5 boxes(YES) ∣ 6  0⏟Trial 2: 2 boxes(NO) ∣ 8  1⏟Trial 3: 2 boxes(NO) ∣ 5  2  8  4  9  0⏟Trial 4: 6 boxes(YES) ∣\displaystyle \begin{aligned} &\underbrace{7\ \ 4\ \ 9\ \ 3\ \ \counted{\mathbf{1}}}_{\substack{\text{Trial 1: } 5\text{ boxes} \\ (\text{\event{YES}})}} \,\Big|\, \underbrace{6\ \ \counted{\mathbf{0}}}_{\substack{\text{Trial 2: } 2\text{ boxes} \\ (\text{NO})}} \,\Big|\, \\ &\underbrace{8\ \ \counted{\mathbf{1}}}_{\substack{\text{Trial 3: } 2\text{ boxes} \\ (\text{NO})}} \,\Big|\, \underbrace{5\ \ 2\ \ 8\ \ 4\ \ 9\ \ \counted{\mathbf{0}}}_{\substack{\text{Trial 4: } 6\text{ boxes} \\ (\text{\event{YES}})}} \,\Big| \end{aligned}
Divide the trials that took more than 44 boxes by the 44 completed trials.
Estimated Probability\displaystyle \text{Estimated Probability} =24\displaystyle = \frac{\event{2}}{4} =0.50\displaystyle = \event{0.50} =50%\displaystyle = \event{50\%}

So from these 44 trials, we estimate a 50%\event{50\%} chance that it takes more than 44 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%\reference{20\%} claim if a friend has to buy 6\observed{6} boxes (or 18\observed{18} boxes) to find a ticket. We have a computer run 100100 trials assuming the 20%\reference{20\%} rate is true and plot how many boxes each simulated shopper needed.

Reading a Simulation Dotplot and Testing a Claim
P(more than 4 boxes)= ?P(\text{more than 4 boxes}) = \,?
20% claim\htmlClass{lc-violet}{\text{20\% claim}}
749317\hspace{0.553em}4\hspace{0.553em}9\hspace{0.553em}3\hspace{0.553em}\htmlClass{lc-blue}{\mathbf{1}}
606\hspace{0.553em}\htmlClass{lc-blue}{\mathbf{0}}
818\hspace{0.553em}\htmlClass{lc-blue}{\mathbf{1}}
5284905\hspace{0.553em}2\hspace{0.553em}8\hspace{0.553em}4\hspace{0.553em}9\hspace{0.553em}\htmlClass{lc-blue}{\mathbf{0}}
55
22
22
66
11
22
33
44
55
66
77
88
99
1010
1212
1414
1616
1818
boxes needed to get a golden ticket\text{boxes needed to get a golden ticket}
11
22
33
44
55
66
77
88
99
1010
1212
1414
1616
1818
2323
1818
1414
1010
88
88
66
44
33
22
11
11
00
11
00
11
00
00
Number of boxes needed\text{Number of boxes needed}
to get a Golden Ticket\text{to get a Golden Ticket}
Text solution
Count the dots for "more than 44 boxes" (55 or more) out of 100100Because each dot on the plot is one complete trial of a shopper buying until they get a ticket, we add the dot counts from 55 up to 1616 boxes.
Estimated P(more than 4 boxes)=8+8+6+4+3+2+1+1+0+1+0+1100=35100=0.35=35%\displaystyle \begin{aligned} &\text{Estimated P}(\text{more than } 4\text{ boxes}) \\ &\quad = \frac{\begin{gathered}8 + 8 + 6 + 4 + 3 + 2 \\ {}+ 1 + 1 + 0 + 1 + 0 + 1\end{gathered}}{100} \\ &\quad = \frac{\event{35}}{100} = \event{0.35} = \event{35\%} \end{aligned}
Test a 6\observed{6}-box wait by counting the dots at 6\observed{6} or moreWe check how often a shopper waits at least 6\observed{6} boxes just by random chance when the 20%\reference{20\%} claim is true.
Estimated P(6 or more boxes)=8+6+4+3+2+1+1+0+1+0+1100=27100=0.27=27%\displaystyle \begin{aligned} &\text{Estimated P}(\observed{6}\text{ or more boxes}) \\ &\quad = \frac{\begin{gathered}8 + 6 + 4 + 3 + 2 + 1 \\ {}+ 1 + 0 + 1 + 0 + 1\end{gathered}}{100} \\ &\quad = \frac{\event{27}}{100} = \event{0.27} = \event{27\%} \end{aligned}
Test an 18\observed{18}-box wait by counting the dots at 18\observed{18} or moreEven the unluckiest simulated shopper out of 100100 only needed 1616 boxes.
Estimated P(18 or more boxes)\displaystyle \text{Estimated P}(\observed{18}\text{ or more boxes}) =0100\displaystyle = \frac{\event{0}}{100} =0%\displaystyle = \event{0\%}

Because waiting 6\observed{6} or more boxes happens in 27%\event{27\%} of trials just by ordinary bad luck, a 6\observed{6}-box wait gives no reason to doubt the company's 20%\reference{20\%} claim. On the other hand, an 18\observed{18}-box wait (0%\event{0\%} of trials) would almost never happen by chance if the rate were truly 20%\reference{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%\reference{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=How many trials hadthe event happenTotal number oftrials we ran\displaystyle \boxed{\begin{aligned}&\text{Estimated Probability} \\ &\quad = \frac{\begin{gathered}\text{\event{How many trials had}} \\ \text{\event{the event happen}}\end{gathered}}{\begin{gathered}\text{Total number of} \\ \text{trials we ran}\end{gathered}}\end{aligned}}
Single digits vs. two-digit pairs

Use single digits (0–90\text{–}9, 1010 digits) when probabilities are multiples of 10%10\%, such as 0–6=Make\counted{0\text{–}6} = \counted{\text{Make}} (70%\counted{70\%}). Switch to two-digit pairs (00–9900\text{–}99, 100100 pairs) for single-percent probabilities, starting at 00\counted{00} so a 73%\counted{73\%} event uses 00–72\counted{00\text{–}72} (73\counted{73} pairs).

When to skip unused digits

When 1010 or 100100 doesn't divide evenly among equally likely outcomes (like 33 directions at 13\tfrac{1}{3} each, or 88 players), give every outcome the exact same number of digits (1–3\groupone{1\text{–}3}, 4–6\grouptwo{4\text{–}6}, 7–9\groupthree{7\text{–}9}) and cross out leftover digits (00) whenever they appear.

When to skip repeated digits (and when not to)

Keep repeated digits when shots or spins are independent (1 1 6 8 41\ 1\ 6\ 8\ 4 starts with two Makes). Only skip a repeated digit within a trial when drawing specific items without replacement (2 2 72\ \skipped{\cancel{2}}\ 7 skips the second Ticket 22), and still keep two different digits that belong to the same group (2 32\ 3 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 (55 shots, 22 tickets), or read a continuous line of digits and stop each trial right after a target digit appears when waiting for an event (7 4 9 3 1∣7\ 4\ 9\ 3\ \counted{\mathbf{1}}\mid takes 55 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%\event{27\%} at 6+\observed{6+} boxes) means the wait can easily happen by ordinary bad luck, while a percentage near 0%0\% (0%\event{0\%} at 18+\observed{18+} boxes) is strong evidence against the claim.

6

Practice

1

A baseball player gets a hit in 60%\counted{60\%} of their at-bats. In tonight's game, they will bat 44 times. Using digits 0–5\counted{0\text{–}5} for a Hit (H\counted{\text{H}}) and 6–9\other{6\text{–}9} for an Out (O\other{\text{O}}), translate the 55 trials of random digits below and estimate the probability that the player gets a hit in at least 22 at-bats in a row.

Trial 1: `7 2 4 8` Trial 2: `1 9 3 5` Trial 3: `0 7 4 6` Trial 4: `8 6 9 2` Trial 5: `3 1 0 7`

Translate each digit to H\counted{\text{H}} or O\other{\text{O}} first. In which rows do at least two H\counted{\text{H}}'s sit right next to each other without an O\other{\text{O}} between them?

Trial 1:7  2  4  8⟶O H H⏟2 in a row O(YES, middle two)Trial 2:1  9  3  5⟶H O H H⏟2 in a row(YES, last two)Trial 3:0  7  4  6⟶H O H O(NO)Trial 4:8  6  9  2⟶O O O H(NO)Trial 5:3  1  0  7⟶H H H⏟3 in a row O(YES, 3 in a row counts as at least 2)\displaystyle \begin{aligned} \text{Trial 1:}\quad & 7\ \ 2\ \ 4\ \ 8 \longrightarrow \text{\other{O} }\event{\underbrace{\text{\counted{H H}}}_{\text{2 in a row}}}\text{ \other{O}} &&\text{(\event{YES}, middle two)} \\ \text{Trial 2:}\quad & 1\ \ 9\ \ 3\ \ 5 \longrightarrow \text{\counted{H} \other{O} }\event{\underbrace{\text{\counted{H H}}}_{\text{2 in a row}}} &&\text{(\event{YES}, last two)} \\ \text{Trial 3:}\quad & 0\ \ 7\ \ 4\ \ 6 \longrightarrow \text{\counted{H} \other{O} \counted{H} \other{O}} &&\text{(NO)} \\ \text{Trial 4:}\quad & 8\ \ 6\ \ 9\ \ 2 \longrightarrow \text{\other{O O O} \counted{H}} &&\text{(NO)} \\ \text{Trial 5:}\quad & 3\ \ 1\ \ 0\ \ 7 \longrightarrow \event{\underbrace{\text{\counted{H H H}}}_{\text{3 in a row}}}\text{ \other{O}} &&\text{(\event{YES}, } 3 \text{ in a row counts as at least } 2\text{)} \end{aligned}
(Watch out at Trial 3: the player gets 22 hits total, but the Out at digit 77 separates them. Counting Trial 3 as a streak gives the wrong answer 45=80%\tfrac{4}{5} = 80\%. Also watch Trial 5: leaving out 33 in a row when the question asks for at least 22 in a row gives 25=40%\tfrac{2}{5} = 40\%.)
Estimated Probability\displaystyle \text{Estimated Probability} =35\displaystyle = \frac{\event{3}}{5} =0.60\displaystyle = \event{0.60} =60%\displaystyle = \event{60\%}
2

A transit agency reports that 82%\counted{82\%} of its morning trains arrive on time. A commuter rides the morning train 33 days in a row. (a) Assign two-digit numbers from 0000 to 9999 to simulate whether a train is on time or late. (b) Using your assignment and the 44 trials of two-digit pairs below, estimate the probability that all 33 of the commuter's trains arrive on time.

Trial 1: `41 00 79` Trial 2: `65 82 14` Trial 3: `19 81 53` Trial 4: `90 27 68`

Because 0000 counts as the first two-digit pair, which two-digit number is the 82nd82\text{nd} pair?

(a)
00–81⏟On Time (82 numbers)82–99⏟Late (18 numbers)\displaystyle \counted{\underbrace{00\text{–}81}_{\text{On Time } (82\text{ numbers})}} \qquad \other{\underbrace{82\text{–}99}_{\text{Late } (18\text{ numbers})}}
(Watch out: assigning 00–8200\text{–}82 gives 8383 numbers to On Time instead of 8282, which miscounts pair 8282 in Trial 2 as On Time and leads to the wrong answer 34=75%\tfrac{3}{4} = 75\%.)
(b)
Trial 1:41  00  79⟶On Time, On Time, On Time(YES)Trial 2:65  82  14⟶On Time, Late (82 is Late), On Time(NO)Trial 3:19  81  53⟶On Time, On Time (81 is On Time), On Time(YES)Trial 4:90  27  68⟶Late, On Time, On Time(NO)\displaystyle \begin{aligned} \text{Trial 1:}\quad & 41\ \ 00\ \ 79 \longrightarrow \text{\counted{On Time}, \counted{On Time}, \counted{On Time}} &&\text{(\event{YES})} \\ \text{Trial 2:}\quad & 65\ \ 82\ \ 14 \longrightarrow \text{\counted{On Time}, \other{Late (82 is Late)}, \counted{On Time}} &&\text{(NO)} \\ \text{Trial 3:}\quad & 19\ \ 81\ \ 53 \longrightarrow \text{\counted{On Time}, \counted{On Time (81 is On Time)}, \counted{On Time}} &&\text{(\event{YES})} \\ \text{Trial 4:}\quad & 90\ \ 27\ \ 68 \longrightarrow \text{\other{Late}, \counted{On Time}, \counted{On Time}} &&\text{(NO)} \end{aligned}
Estimated Probability\displaystyle \text{Estimated Probability} =24\displaystyle = \frac{\event{2}}{4} =0.50\displaystyle = \event{0.50} =50%\displaystyle = \event{50\%}
3

On a game show, a contestant spins a wheel with 33 equal sections (Red, Blue, and Green, 13\tfrac{1}{3} chance each) twice. Let 1,2,3=Red\groupone{1, 2, 3} = \groupone{\text{Red}}, 4,5,6=Blue\grouptwo{4, 5, 6} = \grouptwo{\text{Blue}}, 7,8,9=Green\groupthree{7, 8, 9} = \groupthree{\text{Green}}, and skip 00. Read the continuous line of random digits below from left to right to run 44 trials of 22 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`

Cross out every 00 before grouping the remaining digits into pairs of 22 valid spins per trial.

2  0  3⏟Trial 1: Red, Red(YES) ∣ 5  8⏟Trial 2: Blue, Green(NO) ∣ 8  0  6⏟Trial 3: Green, Blue(NO) ∣ 9  7⏟Trial 4: Green, Green(YES)\displaystyle \underbrace{2\ \ \skipped{\cancel{0}}\ \ 3}_{\substack{\text{Trial 1: \groupone{Red}, \groupone{Red}} \\ (\text{YES})}} \,\Big|\, \underbrace{5\ \ 8}_{\substack{\text{Trial 2: \grouptwo{Blue}, \groupthree{Green}} \\ (\text{NO})}} \,\Big|\, \underbrace{8\ \ \skipped{\cancel{0}}\ \ 6}_{\substack{\text{Trial 3: \groupthree{Green}, \grouptwo{Blue}} \\ (\text{NO})}} \,\Big|\, \underbrace{9\ \ 7}_{\substack{\text{Trial 4: \groupthree{Green}, \groupthree{Green}} \\ (\text{YES})}}
(Watch out: if you forget to skip 00 in Trial 1 and read `2 0` as the first two spins, every trial shifts and gives the wrong answer 14=25%\tfrac{1}{4} = 25\%. Also, spinning a wheel is with replacement, so neither the second 88 nor the second Green digit in `9 7` is skipped.)
Estimated Probability\displaystyle \text{Estimated Probability} =24\displaystyle = \frac{2}{4} =0.50\displaystyle = 0.50 =50%\displaystyle = 50\%
4

A drawer holds 1010 flashlights: 4\counted{4} have dead batteries (labeled 1,2,3,4\counted{1, 2, 3, 4}) and 6\other{6} have working batteries (labeled 5,6,7,8,9,0\other{5, 6, 7, 8, 9, 0}). You grab 22 flashlights at random without replacement. Read each trial of random digits below from left to right until 22 different flashlights are chosen, and estimate the probability that both flashlights you grab have dead batteries.

Trial 1: `3 3 7 2` Trial 2: `1 4 8 5` Trial 3: `4 2 2 9` Trial 4: `6 1 3 0` Trial 5: `2 2 2 1`

Because you grab 22 flashlights without replacement, what do you do when the exact same flashlight number repeats inside Trial 1 or Trial 5?

Trial 1:3  3  7  2⟶3 (dead), 7 (working)(NO)Trial 2:1  4  8  5⟶1 (dead), 4 (dead)(YES)Trial 3:4  2  2  9⟶4 (dead), 2 (dead)(YES)Trial 4:6  1  3  0⟶6 (working), 1 (dead)(NO)Trial 5:2  2  2  1⟶2 (dead), 1 (dead)(YES)\displaystyle \begin{aligned} \text{Trial 1:}\quad & 3\ \ \skipped{\cancel{3}}\ \ 7\ \ 2 \longrightarrow \text{\counted{3 (dead)}, \other{7 (working)}} &&\text{(NO)} \\ \text{Trial 2:}\quad & 1\ \ 4\ \ 8\ \ 5 \longrightarrow \text{\counted{1 (dead)}, \counted{4 (dead)}} &&\text{(\event{YES})} \\ \text{Trial 3:}\quad & 4\ \ 2\ \ 2\ \ 9 \longrightarrow \text{\counted{4 (dead)}, \counted{2 (dead)}} &&\text{(\event{YES})} \\ \text{Trial 4:}\quad & 6\ \ 1\ \ 3\ \ 0 \longrightarrow \text{\other{6 (working)}, \counted{1 (dead)}} &&\text{(NO)} \\ \text{Trial 5:}\quad & 2\ \ \skipped{\cancel{2}}\ \ \skipped{\cancel{2}}\ \ 1 \longrightarrow \text{\counted{2 (dead)}, \counted{1 (dead)}} &&\text{(\event{YES})} \end{aligned}
(Watch out at Trial 1: you cannot grab Flashlight 33 twice. Forgetting to skip the repeated 33 counts `3 3` as two dead flashlights and gives the wrong answer 45=80%\tfrac{4}{5} = 80\%.)
Estimated Probability\displaystyle \text{Estimated Probability} =35\displaystyle = \frac{\event{3}}{5} =0.60\displaystyle = \event{0.60} =60%\displaystyle = \event{60\%}
5

A video game boss drops a rare key 30%\counted{30\%} of the time you defeat it, and you keep battling the boss until it drops the key. Using 0,1,2=Key drops\counted{0, 1, 2} = \counted{\text{Key drops}} (30%\counted{30\%}) and 3–9=No key\other{3\text{–}9} = \other{\text{No key}} (70%\other{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 33 battles to get the key.

`6 4 1 8 5 9 3 0 2 7 4 6 2 9 1`

Place a stop bar right after every 0,1,\counted{0}, \counted{1}, or 2\counted{2}, count the digits in each trial, and check whether "more than 33 battles" includes 33.

6  4  1⏟Trial 1: 3 battles(NO) ∣ 8  5  9  3  0⏟Trial 2: 5 battles(YES) ∣ 2⏟Trial 3: 1 battle(NO) ∣ 7  4  6  2⏟Trial 4: 4 battles(YES) ∣ 9  1⏟Trial 5: 2 battles(NO) ∣\displaystyle \underbrace{6\ \ 4\ \ \counted{\mathbf{1}}}_{\substack{\text{Trial 1: } 3\text{ battles} \\ (\text{NO})}} \,\Big|\, \underbrace{8\ \ 5\ \ 9\ \ 3\ \ \counted{\mathbf{0}}}_{\substack{\text{Trial 2: } 5\text{ battles} \\ (\text{\event{YES}})}} \,\Big|\, \underbrace{\counted{\mathbf{2}}}_{\substack{\text{Trial 3: } 1\text{ battle} \\ (\text{NO})}} \,\Big|\, \underbrace{7\ \ 4\ \ 6\ \ \counted{\mathbf{2}}}_{\substack{\text{Trial 4: } 4\text{ battles} \\ (\text{\event{YES}})}} \,\Big|\, \underbrace{9\ \ \counted{\mathbf{1}}}_{\substack{\text{Trial 5: } 2\text{ battles} \\ (\text{NO})}} \,\Big|
(Watch out at Trial 1: "more than 33 battles" means 44 or more. Counting Trial 1's 33 battles as a success gives the wrong answer 35=60%\tfrac{3}{5} = 60\%.)
Estimated Probability\displaystyle \text{Estimated Probability} =25\displaystyle = \frac{\event{2}}{5} =0.40\displaystyle = \event{0.40} =40%\displaystyle = \event{40\%}
6

A coffee shop claims that 25%\reference{25\%} of its promotional cups are winners. A computer simulates 100100 customers, each buying cups until they get their first winner, assuming the 25%\reference{25\%} claim is true. The dotplot of the 100100 trials has these counts for the number of cups needed:

1 cup: 26;1\text{ cup: } 26; 2 cups: 19;2\text{ cups: } 19; 3 cups: 14;3\text{ cups: } 14; 4 cups: 11;4\text{ cups: } 11; 5 cups: 9;5\text{ cups: } 9; 6 cups: 7;6\text{ cups: } 7; 7 cups: 5;7\text{ cups: } 5; 8 cups: 4;8\text{ cups: } 4; 9 cups: 2;9\text{ cups: } 2; 10 cups: 2;10\text{ cups: } 2; 11 cups: 0;11\text{ cups: } 0; 12 cups: 1;12\text{ cups: } 1; 13 or more cups: 0.13\text{ or more cups: } 0.

(a) What is the estimated probability that it takes a customer more than 55 cups to find a winner? (b) Customer A needed 7\observed{7} cups to get their first winner, while Customer B needed 15\observed{15} cups. Which customer has strong evidence against the coffee shop's 25%\reference{25\%} claim, and why?

For (a), does "more than 55 cups" start at 55 or at 66? For (b), count how many of the 100100 simulated customers waited at least as long as Customer A (7+\observed{7+} cups) and Customer B (15+\observed{15+} cups).

(a) More than 55 cups means 66 or more cups: (Watch out: including the 99 trials at 55 cups gives 30100=30%\tfrac{30}{100} = 30\% instead of starting at 66 cups.)
Estimated Probability=7+5+4+2+2+0+1100=21100=0.21=21%\displaystyle \begin{aligned} \text{Estimated Probability} &= \frac{7 + 5 + 4 + 2 + 2 + 0 + 1}{100} \\ &= \frac{\event{21}}{100} = \event{0.21} = \event{21\%} \end{aligned}
(b) Customer B has strong evidence against the claim. In the simulation, needing 7\observed{7} or more cups happened in 5+4+2+2+0+1=145 + 4 + 2 + 2 + 0 + 1 = \event{14} out of 100100 trials (14%\event{14\%}), so Customer A's wait happens regularly by ordinary bad luck when the 25%\reference{25\%} claim is true (watch out: count all trials from 77 upward, not just the 55 dots at 77 cups). Needing 15\observed{15} or more cups (where the most in 100100 trials was 1212 cups) happened in:
Estimated Probability\displaystyle \text{Estimated Probability} =0100\displaystyle = \frac{\event{0}}{100} =0%\displaystyle = \event{0\%}