StatisticsBinomial and Other Distributions3 of 5
Binomial and Other Distributions · 3

The Geometric Distribution

Instead of fixing the number of trials ahead of time and counting successes, we often want to repeat a trial until we get our very first success and find the probability that it takes a specific number of tries.

1

Probability of the First Success on Try kk

Suppose you have a p=0.20\success{p = 0.20} chance of hitting a bullseye on each throw, and you keep throwing until you hit it once. We want to find the probability that your first bullseye happens on try k=3k = 3.

Probability of the First Success on Try k
P(Hit)=0.20P(Miss)=0.80\begin{aligned} P(\htmlClass{lc-blue}{\text{Hit}}) &= \htmlClass{lc-blue}{0.20} \\[3pt] P(\htmlClass{lc-orange}{\text{Miss}}) &= \htmlClass{lc-orange}{0.80} \end{aligned}
P(first Hit on throw 3)= ?P(\text{first Hit on throw }3) = \ ?
11
22
33

Because the game stops the moment you succeed, the hit has to happen on the very last throw, and every try before it had to be a miss. Unlike a Binomial problem, there is only one possible order:

P(X=k)\displaystyle P(X = k) =(1−p)k−1⏟fail first k−1 tries⋅p⏟succeed on try k\displaystyle = \failure{\underbrace{(1 - p)^{k - 1}}_{\text{fail first } k - 1 \text{ tries}}} \cdot \success{\underbrace{p}_{\text{succeed on try } k}}

For our dart game with hit probability p=0.20\success{p = 0.20} and miss probability 1−p=0.80\failure{1 - p = 0.80}, winning on the 3rd throw requires 2 misses followed by 1 hit:

P(X=3)\displaystyle P(X = 3) =(0.80)2(0.20)\displaystyle = \failure{(0.80)^2}\success{(0.20)} =0.128\displaystyle = \prob{0.128}

So there is a 12.8%\prob{12.8\%} chance that your first bullseye happens on throw 3.

2

Shape of the Distribution and Why It Adds to 11

Now let's see how the probabilities behave across all possible numbers of tries, and why an infinite sequence of bars still adds up to 1\prob{1}.

Shape of the Distribution and Why It Adds to 1
P(X=1)+P(X=2)+⋯= ?P(X = 1) + P(X = 2) + \cdots = \ ?
P(Hit)=0.20P(Miss)=0.80\begin{aligned} P(\htmlClass{lc-blue}{\text{Hit}}) &= \htmlClass{lc-blue}{0.20} \\[3pt] P(\htmlClass{lc-orange}{\text{Miss}}) &= \htmlClass{lc-orange}{0.80} \end{aligned}
P(X=k)P(X = k)
0.050.05
0.100.10
0.150.15
0.200.20
11
22
33
44
55
66
77
88
99
1010
⋯\cdots
Try\text{Try}

Each step to the right requires one more miss, so every bar is (1−p)\failure{(1 - p)} times the height of the bar before it:

P(X=1)=0.20,P(X=2)=0.20(0.80)=0.16,P(X=3)=0.16(0.80)=0.128\displaystyle \begin{aligned}P(X = 1) &= \prob{0.20}, \\ P(X = 2) &= \prob{0.20}\failure{(0.80)} = \prob{0.16}, \\ P(X = 3) &= \prob{0.16}\failure{(0.80)} = \prob{0.128}\end{aligned}

Because we multiply by a number less than 11 at every step, Try 1 is always the single most likely outcome, even when p\success{p} is very small.

Because each try takes a fraction p\success{p} of whatever probability is left, the piece still left after nn tries is (1−p)n\failure{(1 - p)^n}, which shrinks toward 00, so the bars use up the whole 100%\prob{100\%} bar.

No matter the bullseye size, Try 1 is always the most likely try, each bar is the same miss fraction of the bar before it, and taking the hit fraction of what's left always fills the whole bar.
3

More Than, At Least, and Fewer Than kk Tries

Next, we want to find the probability that it takes more than 4 tries, P(X>4)P(X > 4). Adding individual bars for Try 5, Try 6, Try 7, and so on would mean adding infinitely many terms, so instead we look at what has to happen on the first few throws for the game to still be going.

More Than, At Least, and Fewer Than k Tries
P(Hit)=0.20P(Miss)=0.80P(\htmlClass{lc-blue}{\text{Hit}}) = \htmlClass{lc-blue}{0.20} \qquad P(\htmlClass{lc-orange}{\text{Miss}}) = \htmlClass{lc-orange}{0.80}
Try\text{Try}
11
22
33
44
P(X>4)= ?P(X≥4)= ?P(X > 4) = \ ? \qquad P(X \ge 4) = \ ?
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
⋯\cdots
11
22
33
44
55
66
⋯\cdots
X>4(miss first 4 tries)\begin{matrix}X > 4 \\[-1pt] \text{(miss first }\htmlClass{lc-orange}{4}\text{ tries)}\end{matrix}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
⋯\cdots
11
22
33
44
55
66
⋯\cdots
X≥4(miss first 3 tries,Try 4 included)\begin{matrix}X \ge 4 \\[-1pt] \text{(miss first }\htmlClass{lc-orange}{3}\text{ tries,} \\[-1pt] \text{Try 4 included)}\end{matrix}

Whether the question asks for a long wait or an early win, we just count how many misses in a row at the start it takes to make that happen:

P(X>k)=(1−p)kP(X≥k)=(1−p)k−1\displaystyle \begin{aligned}P(X > k) &= \failure{(1 - p)^k} \\ P(X \ge k) &= \failure{(1 - p)^{k - 1}}\end{aligned}

For the dart game (1−p=0.80\failure{1 - p = 0.80}) at k=4k = 4:

P(X>4)=(0.80)4=0.4096P(X≥4)=(0.80)3=0.512\displaystyle \begin{aligned}P(X > 4) &= \failure{(0.80)^4} = \prob{0.4096} \\ P(X \ge 4) &= \failure{(0.80)^3} = \prob{0.512}\end{aligned}
P(X≤k)=1−(1−p)kP(X<k)=1−(1−p)k−1\displaystyle \begin{aligned}P(X \le k) &= 1 - \failure{(1 - p)^k} \\ P(X < k) &= 1 - \failure{(1 - p)^{k - 1}}\end{aligned}

For k=4k = 4:

P(X≤4)=1−(0.80)4=1−0.4096=0.5904P(X<4)=1−(0.80)3=1−0.512=0.488\displaystyle \begin{aligned}P(X \le 4) &= 1 - \failure{(0.80)^4} \\ &= 1 - \failure{0.4096} = \prob{0.5904} \\[4pt] P(X < 4) &= 1 - \failure{(0.80)^3} \\ &= 1 - \failure{0.512} = \prob{0.488}\end{aligned}

On a test, don't try to memorize which inequality symbol gets k\failure{k} and which gets k−1\failure{k - 1}. Jot down the first few numbers on your paper: seeing that "fewer than 4" means winning on try 1,2,1, 2, or 33 right away shows that 3 misses in a row is what makes you fail.

On the carved 100%\prob{100\%} bar, a divider right after Try mm splits the bar into games already won on the left (1−(1−p)m1 - \failure{(1 - p)^m}) and games still going after m\failure{m} misses on the right ((1−p)m\failure{(1 - p)^m}). Putting the divider before or after Try kk is what includes or excludes Try kk, shifting the number of misses m\failure{m} between k−1\failure{k - 1} and k\failure{k}.

"At least kk tries" and "more than kk tries" are the same cut on opposite sides of Try kk, so including Try kk on the right takes one fewer miss than leaving it out.
4

Mean and Standard Deviation

We also want to know the average number of tries (μ\mean{\mu}) it takes to get the first success, and how much the number of tries typically varies from game to game (σ\spread{\sigma}).

Mean and Standard Deviation
X=number of throwsP(Hit)=0.20\begin{aligned} X &= \text{number of throws} \\[3pt] P(\htmlClass{lc-blue}{\text{Hit}}) &= \htmlClass{lc-blue}{0.20} \end{aligned}
μ= ?σ= ?\htmlClass{lc-violet}{\mu} = \ ? \qquad\quad \htmlClass{lc-pink}{\sigma} = \ ?

Because the first throw always takes 11 try, and missing it (probability 1−p\failure{1 - p}) leaves you with the exact same expected wait μ\mean{\mu} all over again, we can solve for the mean directly:

μ=1+(1−p)μ1st throw plus expected wait after a misspμ=1Subtract (1−p)μ from both sidesμ=1pDivide by p\displaystyle \begin{aligned} \mean{\mu} &= 1 + \failure{(1 - p)}\mean{\mu} \\ &\scriptstyle\text{1st throw plus expected wait after a miss} \\[8pt] \success{p}\mean{\mu} &= 1 \\ &\scriptstyle\text{Subtract } \failure{(1 - p)}\mean{\mu} \text{ from both sides} \\[8pt] \mean{\mu} &= \mean{\frac{1}{\success{p}}} \\ &\scriptstyle\text{Divide by } \success{p} \end{aligned}

Because long streaks of misses occasionally happen, the distribution has a long right tail. That makes the spread from game to game large, nearly as big as the mean itself whenever p\success{p} is small:

μ=1pσ=1−pp\displaystyle \begin{aligned}\mean{\mu} &= \mean{\frac{1}{\success{p}}} \\ \spread{\sigma} &= \frac{\spread{\sqrt{\failure{1 - p}}}}{\success{p}}\end{aligned}

For our dart game with p=0.20\success{p = 0.20}:

μ=10.20=5 throwsσ=1−0.200.20=0.800.20≈0.89440.20≈4.47 throws\displaystyle \begin{aligned}\mean{\mu} &= \mean{\frac{1}{\success{0.20}}} = \mean{5} \text{ throws} \\ \spread{\sigma} &= \frac{\spread{\sqrt{\failure{1 - 0.20}}}}{\success{0.20}} = \frac{\spread{\sqrt{\failure{0.80}}}}{\success{0.20}} \\ &\approx \frac{\spread{0.8944}}{\success{0.20}} \approx \spread{4.47} \text{ throws}\end{aligned}

So if we play this game many times, it will take an average of 5\mean{5} throws to hit the first bullseye, and the number of throws will typically vary from that 5\mean{5}-throw average by about 4.47\spread{4.47} throws.

5

The Memoryless Property

Suppose you have already missed 15 throws in a row and want to find the probability of winning on Throw 16, or how many additional throws you should expect to wait from now on. The memoryless property says that past misses have no effect on future tries: once a streak of misses has happened, the remaining wait behaves like a brand-new game starting at Try 1.

The Memoryless Property
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
⋯\cdots
11
22
1414
1515
1616
15 misses\htmlClass{lc-orange}{15\ \text{misses}}
P(Hit on throw 16)= ?P(\text{Hit on throw }16) = \ ?

Because every bar is (1−p)\failure{(1 - p)} times the height of the bar before it, the bars left after any streak of misses have the exact same shape as the whole distribution. If you scale that leftover piece of the 100%\prob{100\%} bar back up to 100%\prob{100\%}, the remaining bars return to the original heights (0.20,0.16,0.128,…\prob{0.20}, \prob{0.16}, \prob{0.128}, \dots), and the average wait from that point on is still 5\mean{5} throws.

After any streak of misses, the remaining bars rescale to the exact same shape, so your average wait from that point on is still 5 throws.
6

Recognizing a Geometric Setting

Before using these formulas on a word problem, we need to check that the random variable actually follows a Geometric distribution rather than a Binomial distribution.

Recognizing a Geometric Setting
Binomial\htmlClass{lc-mute}{\text{Binomial}}
Geometric\text{Geometric}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
Miss\htmlClass{lc-orange}{\text{Miss}}
Hit\htmlClass{lc-blue}{\text{Hit}}

A setting is Geometric when trials are binary (success or failure), independent, have the same success probability p\success{p} on every try, and repeat until the first success with no fixed number of trials nn.

7

Worked Example: Inspecting Lightbulbs

On a large assembly line, 2%\success{2\%} of lightbulbs are defective (p=0.02\success{p = 0.02}). An inspector picks bulbs one by one at random until finding the first defective bulb. Let XX be the number of bulbs inspected. We want to find:

Worked Example: Inspecting Lightbulbs
P(Defective)=0.02P(Normal)=0.98P(\htmlClass{lc-blue}{\text{Defective}}) = \htmlClass{lc-blue}{0.02} \qquad P(\htmlClass{lc-orange}{\text{Normal}}) = \htmlClass{lc-orange}{0.98}
X=bulbs inspected untilthe first defective\begin{gathered} X = \text{bulbs inspected until} \\[-1pt] \text{the first defective} \end{gathered}
P(X=5)= ?P(X = 5) = \ ?
Text solution
Check the Geometric conditionsEach bulb is either defective (p=0.02\success{p = 0.02}) or normal (1−p=0.98\failure{1 - p = 0.98}), bulbs from the large production line are independent with the same p\success{p} on each check, and the inspector stops at the first defective bulb.
X is Geometric with p=0.02,1−p=0.98\displaystyle \begin{aligned}X \text{ is Geometric with } &\success{p = 0.02}, \\ &\failure{1 - p = 0.98}\end{aligned}
First defective bulb on the 5th checkFinding the first defective bulb on the 5th check means checking 4 normal bulbs in a row followed by 1 defective bulb.
P(X=5)\displaystyle P(X = 5) =(0.98)4(0.02)≈0.0184\displaystyle = \failure{(0.98)^4}\success{(0.02)} \approx \prob{0.0184}
More than 20 bulbs vs. at least 20 bulbsChecking more than 20 bulbs means the first 20 bulbs must all be normal, while checking at least 20 bulbs includes bulb 20 and only requires the first 19 bulbs to be normal.
P(X>20)=(0.98)20≈0.6676P(X≥20)=(0.98)19≈0.6812\displaystyle \begin{aligned}P(X > 20) &= \failure{(0.98)^{20}} \approx \prob{0.6676} \\ P(X \ge 20) &= \failure{(0.98)^{19}} \approx \prob{0.6812}\end{aligned}
Fewer than 10 inspectionsFinding a defective bulb in fewer than 10 inspections means finding it within bulbs 1 through 9, which fails only if the first 9 bulbs are all normal.
P(X<10)\displaystyle P(X < 10) =1−(0.98)9≈1−0.8337\displaystyle = 1 - \failure{(0.98)^9} \approx 1 - \failure{0.8337} =0.1663\displaystyle = \prob{0.1663}
Mean and standard deviationDivide 11 by the defect probability p=0.02\success{p = 0.02} to find the average wait, and multiply by 1−p\spread{\sqrt{\failure{1 - p}}} to find the typical variation from that average.
μ=10.02=50 bulbsσ=1−0.020.02=0.980.02≈0.989950.02≈49.50 bulbs\displaystyle \begin{aligned}\mean{\mu} &= \mean{\frac{1}{\success{0.02}}} = \mean{50} \text{ bulbs} \\ \spread{\sigma} &= \frac{\spread{\sqrt{\failure{1 - 0.02}}}}{\success{0.02}} = \frac{\spread{\sqrt{\failure{0.98}}}}{\success{0.02}} \\ &\approx \frac{\spread{0.98995}}{\success{0.02}} \approx \spread{49.50} \text{ bulbs}\end{aligned}

If the inspector repeats this search many times, they will inspect an average of 50\mean{50} bulbs to find the first defective one, and the number of bulbs inspected will typically vary from that 50\mean{50}-bulb average by about 49.5\spread{49.5} bulbs.

Key concepts

Use the Geometric distribution when independent trials with the same success probability p\success{p} on each try repeat until the first success and XX counts how many tries it took. Do not use it when the number of trials nn is fixed ahead of time (throwing 10 darts and counting bullseyes is Binomial) or when trials are drawn without replacement so p\success{p} changes from try to try.

Every probability question comes down to counting the streak of misses (1−p)\failure{(1 - p)} that has to happen first (shown below for p=0.20\success{p = 0.20} and 1−p=0.80\failure{1 - p = 0.80}):

First success on exact try kk

Miss the first k−1\failure{k - 1} tries, then succeed on try kk: P(X=k)=(1−p)k−1pP(X = k) = \failure{(1 - p)^{k - 1}}\success{p}, so P(X=3)=(0.80)2(0.20)=0.128P(X = 3) = \failure{(0.80)^2}\success{(0.20)} = \prob{0.128}.

Long wait (X>kX > k vs. X≥kX \ge k)

Check whether try kk is included to see how many initial tries you must miss. "More than 4" excludes try 4 and needs 4 misses, P(X>4)=(0.80)4P(X > 4) = \failure{(0.80)^4}, while "at least 4" includes try 4 and only needs 3 misses, P(X≥4)=(0.80)3P(X \ge 4) = \failure{(0.80)^3}.

Early win (X≤kX \le k vs. X<kX < k)

Subtract the miss streak that causes failure from 11. "4 or fewer" fails after 4 misses, P(X≤4)=1−(0.80)4P(X \le 4) = 1 - \failure{(0.80)^4}, while "fewer than 4" (tries 1,2,31, 2, 3) fails after 3 misses, P(X<4)=1−(0.80)3P(X < 4) = 1 - \failure{(0.80)^3}.

Center, spread, and streaks of misses

The expected wait is μ=1p\mean{\mu} = \mean{\frac{1}{\success{p}}} and the standard deviation is σ=1−pp\spread{\sigma} = \frac{\spread{\sqrt{\failure{1 - p}}}}{\success{p}} (for p=0.20\success{p = 0.20}, μ=10.20=5\mean{\mu} = \mean{\frac{1}{\success{0.20}}} = \mean{5} and σ=0.800.20≈4.47\spread{\sigma} = \frac{\spread{\sqrt{\failure{0.80}}}}{\success{0.20}} \approx \spread{4.47}), even though Try 1 (P(X=1)=pP(X = 1) = \success{p}) is always the single tallest bar. Because the distribution is memoryless, past misses never make a hit more likely to happen soon: after any streak of misses, the next try still has probability p\success{p} of succeeding and the expected additional wait is still 1p\mean{\frac{1}{\success{p}}}.

8

Practice

1

Which of the following random variables has a Geometric distribution, and why do the others fail the conditions? (A) Rolling a fair die 12 times and counting how many 6s appear. (B) Drawing cards without replacement from a standard 52-card deck until the first Ace appears and counting how many cards it took. (C) Flipping a biased coin with a 30% chance of Heads on each flip until the first Heads appears and counting how many flips it took.

Check two things for each scenario: are we stopping at the first success instead of fixing the number of trials nn, and does the probability of success p\success{p} stay the same from trial to trial?

(A) Not Geometric (Binomial)The number of trials is fixed ahead of time at n=12n = 12, and the variable counts the number of successes rather than waiting for the first 6.
(B) Not GeometricWatch out for seeing the phrase "until the first Ace appears" and stopping there. Because cards are drawn without replacement, the probability of getting an Ace changes after every card (from 452\success{\frac{4}{52}} on the first draw to 451\success{\frac{4}{51}} if the first card wasn't an Ace), so the trials are not independent and p\success{p} does not stay the same.
(C) GeometricEach flip is binary (Heads or Tails), independent, has the same success probability p=0.30\success{p = 0.30} on every flip, and repeats until the first Heads appears.
2

A basketball player has a 25% chance (p=0.25\success{p = 0.25}) of making a half-court shot on any attempt, and attempts are independent. If she keeps shooting until she makes her first half-court shot, what is the probability that she makes her first shot on her 4th attempt?

For her 4th attempt to be her first make, what had to happen on attempts 1, 2, and 3?

She must miss her first 3 attempts (1−p=0.75\failure{1 - p = 0.75}) and make the 4th attempt (p=0.25\success{p = 0.25}). Watch out for raising 0.75\failure{0.75} to the 4th power (which gives (0.75)4(0.25)≈0.0791(0.75)^4(0.25) \approx 0.0791) or multiplying by 44 as in a Binomial problem (which gives 4(0.75)3(0.25)≈0.42194(0.75)^3(0.25) \approx 0.4219). The make has to happen on the 4th attempt after 4−1=3\failure{4 - 1} = \failure{3} misses:
P(X=4)=(0.75)3(0.25)=0.421875(0.25)≈0.1055 (or 10.55%)\displaystyle \begin{aligned}P(X = 4) &= \failure{(0.75)^3}\success{(0.25)} \\ &= \failure{0.421875}\success{(0.25)} \\ &\approx \prob{0.1055} \text{ (or } \prob{10.55\%})\end{aligned}
3

A cereal company puts a rare prize in 10% of its boxes (p=0.10\success{p = 0.10}). You buy boxes independently at random until you find your first prize. (a) What is the probability that it takes you more than 6 boxes? (b) What is the probability that it takes you at least 6 boxes?

Write out the first few box numbers: does "at least 6 boxes" include winning on box 6, and how many empty boxes in a row does it take to reach box 6?

With p=0.10\success{p = 0.10}, the probability of an empty box (a miss) is 1−p=0.90\failure{1 - p = 0.90}.
(a)To take more than 6 boxes (X>6X > 6), you must miss on all of the first 6 boxes:
P(X>6)\displaystyle P(X > 6) =(0.90)6≈0.5314\displaystyle = \failure{(0.90)^6} \approx \prob{0.5314}
(b)To take at least 6 boxes (X≥6X \ge 6), box 6 is included as a winning box, so you only have to miss on the first 5 boxes. Watch out for reusing the exponent 66 from part (a) (which gives 0.53140.5314) or multiplying by 0.10\success{0.10} at the end (which gives (0.90)5(0.10)≈0.0590(0.90)^5(0.10) \approx 0.0590, the probability of winning on exactly box 6):
P(X≥6)\displaystyle P(X \ge 6) =(0.90)5≈0.5905\displaystyle = \failure{(0.90)^5} \approx \prob{0.5905}
4

A customer service phone line is busy on 85% of calls, leaving a 15% chance (p=0.15\success{p = 0.15}) of getting through on any single dial. If you redial independently until you get through, what is the probability that you get through in fewer than 5 tries?

List the try numbers that count as "fewer than 5 tries": how many busy signals in a row would cause you to fail that goal?

"Fewer than 5 tries" (X<5X < 5) means getting through on try 1,2,3,1, 2, 3, or 44, which only fails if you get a busy signal (1−p=0.85\failure{1 - p = 0.85}) on all of the first 4 tries. Watch out for using exponent 55 instead of 44 (which gives 1−(0.85)5≈0.55631 - (0.85)^5 \approx 0.5563, the probability for "5 or fewer tries," X≤5X \le 5) or forgetting to subtract from 11 (which leaves (0.85)4≈0.5220(0.85)^4 \approx 0.5220, the probability of failing to get through in the first 4 tries):
P(X<5)=1−(0.85)4≈1−0.5220=0.4780 (or 47.8%)\displaystyle \begin{aligned}P(X < 5) &= 1 - \failure{(0.85)^4} \approx 1 - \failure{0.5220} \\ &= \prob{0.4780} \text{ (or } \prob{47.8\%})\end{aligned}
5

At a blood drive, 4% of donors have O-negative blood (p=0.04\success{p = 0.04}). Donors arrive independently and are tested one by one until the first O-negative donor is found. Let XX be the number of donors tested. Find the mean and standard deviation of XX, and interpret both in context.

If 4 out of every 100 donors have O-negative blood (11 in 2525), how many donors do you expect to test on average to find the first one?

For p=0.04\success{p = 0.04} and 1−p=0.96\failure{1 - p = 0.96}:
μ\displaystyle \mean{\mu} =10.04\displaystyle = \mean{\frac{1}{\success{0.04}}} =25 donors\displaystyle = \mean{25} \text{ donors}
When computing the standard deviation, watch out for placing the denominator 0.04\success{0.04} inside the square root (which gives 0.960.04=24≈4.90\sqrt{\frac{0.96}{0.04}} = \sqrt{24} \approx 4.90 donors); only 1−p=0.96\failure{1 - p = 0.96} is under the square root:
σ=1−0.040.04=0.960.04≈0.97980.04≈24.49 donors\displaystyle \begin{aligned}\spread{\sigma} &= \frac{\spread{\sqrt{\failure{1 - 0.04}}}}{\success{0.04}} = \frac{\spread{\sqrt{\failure{0.96}}}}{\success{0.04}} \\ &\approx \frac{\spread{0.9798}}{\success{0.04}} \approx \spread{24.49} \text{ donors}\end{aligned}
If the clinic repeats this search many times, it will take an average of 25\mean{25} donors to find the first O-negative donor, and the actual number of donors tested will typically vary from that 25\mean{25}-donor average by about 24.49\spread{24.49} donors.
6

A carnival ring-toss game has a 5% chance of winning on any toss (p=0.05\success{p = 0.05}), and tosses are independent. A player has just missed 30 tosses in a row and keeps playing until their first win. (a) What is the probability they win on Toss 31? (b) How many additional tosses should they expect to need on average from this point onward? (c) What is the probability it takes them more than 10 additional tosses from now to win?

Given that the first 30 misses have already happened, how does the game look from Toss 31 onward compared to Toss 1?

By the memoryless property, the 30 past misses have already happened and do not affect future tosses. Watch out for including the 30 past misses in your exponents, such as computing (0.95)30(0.05)≈0.0107(0.95)^{30}(0.05) \approx 0.0107 in (a) or (0.95)40≈0.1285(0.95)^{40} \approx 0.1285 in (c), which are the probabilities before the game started rather than after 30 misses have already happened:
(a)The next toss (Toss 31) is just a single try with success probability p=0.05\success{p = 0.05} (or 5%\prob{5\%}).
(b)The expected additional wait from this point onward is still μ=10.05=20\mean{\mu} = \mean{\frac{1}{\success{0.05}}} = \mean{20} additional tosses.
(c)Taking more than 10 additional tosses from now means missing the next 10 tosses in a row:
P(more than 10 additional tosses)=(0.95)10≈0.5987 (or 59.9%)\displaystyle \begin{aligned}&P(\text{more than 10 additional tosses}) \\ &\quad = \failure{(0.95)^{10}} \\ &\quad \approx \prob{0.5987} \text{ (or } \prob{59.9\%})\end{aligned}
7

An automated randomized test has a constant probability p\success{p} of catching a software bug on each independent run, and on average it takes 8 runs to catch the bug for the first time. (a) What is the probability p\success{p} of catching the bug on any single run? (b) A colleague argues that because the average wait is 8 runs, Run 8 must be the single most likely run on which the bug is caught. Explain why this is wrong and compare P(X=1)P(X = 1) with P(X=8)P(X = 8).

Use μ=1p\mean{\mu} = \mean{\frac{1}{\success{p}}} to find p\success{p} first, then consider what has to happen on Runs 1 through 7 for the first catch to wait until Run 8.

(a)Since μ=1p=8\mean{\mu} = \mean{\frac{1}{\success{p}}} = \mean{8}, the probability of catching the bug on any single run is:
p\displaystyle \success{p} =18\displaystyle = \success{\frac{1}{8}} =0.125 (or 12.5%)\displaystyle = \success{0.125} \text{ (or } \success{12.5\%})
(b)Run 1 is always the single most likely outcome in a Geometric distribution because every later run requires a catch (0.125\success{0.125}) plus a streak of prior failed runs (1−p=0.875\failure{1 - p = 0.875}), making each bar 0.875\failure{0.875} times the height of the bar before it. Comparing Run 1 and Run 8 (watch out for using 8 failed runs instead of 8−1=7\failure{8 - 1} = \failure{7} failed runs, which would give (0.875)8(0.125)≈0.0429(0.875)^8(0.125) \approx 0.0429):
P(X=1)\displaystyle P(X = 1) =0.125 (or 12.5%)\displaystyle = \prob{0.125} \text{ (or } \prob{12.5\%})
P(X=8)\displaystyle P(X = 8) =(0.875)7(0.125)≈0.0491 (or 4.91%)\displaystyle = \failure{(0.875)^7}\success{(0.125)} \approx \prob{0.0491} \text{ (or } \prob{4.91\%})