The Central Idea
Suppose independent Bernoulli trials are repeated, each with constant success probability \(p\).
A geometric random variable counts the number of trials required to obtain the first success.
A negative binomial random variable counts the number of trials required to obtain the \(r\)-th success.
Both models are waiting-time distributions built from repeated Bernoulli trials.
The Geometric Assumptions
A geometric model requires:
- each trial has two relevant outcomes, success or failure;
- trials are independent;
- the success probability \(p\) is constant from trial to trial;
- the experiment continues until the first success occurs;
- the random variable counts the number of trials used.
Geometric Notation
If \(X\) is the trial number of the first success, we write
\[ \boxed{X\sim\operatorname{Geometric}(p)}. \]The possible values are
\[ \boxed{X\in\{1,2,3,\ldots\}}. \]The smallest possible value is \(1\) because the first trial itself may be a success.
Deriving the Geometric PMF
For the first success to occur on trial \(k\):
- the first \(k-1\) trials must be failures;
- trial \(k\) must be a success.
The probability of \(k-1\) failures is
\[ (1-p)^{k-1}, \]and the probability of success on trial \(k\) is \(p\).
Therefore,
\[ \boxed{ P(X=k)=(1-p)^{k-1}p } \]for \(k=1,2,3,\ldots\).
Example: First Success on Trial 4
Suppose each trial succeeds with probability
\[ p=0.3. \]Find the probability that the first success occurs on trial \(4\).
\[ P(X=4) = (0.7)^3(0.3). \]Therefore,
\[ \boxed{P(X=4)=0.1029}. \]What the Sequence Looks Like
The event
\[ X=4 \]corresponds to the pattern
\[ F,F,F,S. \]There is only one allowable success-failure pattern because the first success must occur at the final listed trial.
This is why no combination factor appears in the geometric PMF.
Geometric Cumulative Probability
To find the probability that the first success occurs by trial \(k\),
\[ P(X\le k), \]it is often easiest to use the complement.
The event \(X>k\) means the first \(k\) trials are all failures:
\[ P(X>k)=(1-p)^k. \]Therefore,
\[ \boxed{ P(X\le k)=1-(1-p)^k }. \]Example: Success Within Five Trials
Let
\[ X\sim\operatorname{Geometric}(0.2). \]Find
\[ P(X\le5). \]Use the cumulative formula:
\[ P(X\le5) = 1-(0.8)^5. \]Therefore,
\[ \boxed{P(X\le5)=0.67232}. \]Probability of Waiting More Than \(k\) Trials
For a geometric random variable,
\[ \boxed{ P(X>k)=(1-p)^k }. \]This formula directly captures the probability of experiencing \(k\) consecutive failures before any success appears.
The Geometric Mean
If
\[ X\sim\operatorname{Geometric}(p), \]then
\[ \boxed{\mathbb{E}[X]=\frac1p}. \]The expected number of trials needed for the first success is the reciprocal of the success probability.
Interpreting the Geometric Mean
If
\[ p=0.25, \]then
\[ \mathbb{E}[X]=\frac{1}{0.25}=4. \]Over many repeated experiments, the average trial number of the first success tends toward \(4\).
The Geometric Variance
For
\[ X\sim\operatorname{Geometric}(p), \]the variance is
\[ \boxed{ \operatorname{Var}(X)=\frac{1-p}{p^2} }. \]The standard deviation is
\[ \boxed{ \sigma_X=\frac{\sqrt{1-p}}{p} }. \]Geometric Memorylessness
The geometric distribution has a special memoryless property.
If no success has occurred in the first \(m\) trials, then the probability of waiting more than \(n\) additional trials is the same as it was at the beginning:
\[ \boxed{ P(X>m+n\mid X>m)=P(X>n) }. \]Why Memorylessness Occurs
If the trials are independent and the success probability remains \(p\), then previous failures do not change the probability structure of future trials.
After any sequence of failures, the next trial still has success probability
\[ p. \]The process effectively restarts from the same probabilistic state.
Example: Memorylessness
Suppose
\[ X\sim\operatorname{Geometric}(0.2). \]Given that no success occurred in the first \(4\) trials, find the probability that more than \(3\) additional trials are required.
By memorylessness,
\[ P(X>7\mid X>4) = P(X>3). \]Therefore,
\[ \boxed{P(X>7\mid X>4)=(0.8)^3=0.512}. \]An Alternate Geometric Convention
Some textbooks define a geometric random variable as the number of failures before the first success.
Under that convention, the possible values are
\[ 0,1,2,\ldots \]rather than
\[ 1,2,3,\ldots. \]Always check which convention is being used.
Connecting the Two Geometric Conventions
Let \(X\) count trials until the first success and \(Y\) count failures before the first success.
Then
\[ \boxed{Y=X-1}. \]Therefore,
\[ \mathbb{E}[Y] = \frac{1-p}{p}. \]The variance is unchanged by subtracting \(1\):
\[ \operatorname{Var}(Y)=\frac{1-p}{p^2}. \]The Negative Binomial Distribution
The geometric distribution stops at the first success.
The negative binomial distribution generalizes this idea by stopping at the \(r\)-th success.
Let \(X\) be the number of trials required to obtain \(r\) successes.
Negative Binomial Assumptions
A negative binomial model requires:
- repeated Bernoulli trials;
- two relevant outcomes on each trial;
- independent trials;
- constant success probability \(p\);
- a fixed target number of successes \(r\);
- the experiment continues until the \(r\)-th success occurs.
Negative Binomial Notation
If \(X\) is the number of trials needed to obtain the \(r\)-th success, we write
\[ \boxed{ X\sim\operatorname{NegBin}(r,p) }. \]Since at least \(r\) trials are needed to obtain \(r\) successes,
\[ \boxed{ X\in\{r,r+1,r+2,\ldots\} }. \]Deriving the Negative Binomial PMF
For the \(r\)-th success to occur on trial \(k\):
- among the first \(k-1\) trials, there must be exactly \(r-1\) successes;
- trial \(k\) must be a success.
The first \(k-1\) positions contain
\[ r-1 \]successes and
\[ k-r \]failures.
The Negative Binomial Probability Formula
The \(r-1\) earlier successes can occupy
\[ \binom{k-1}{r-1} \]different sets of positions.
Therefore,
\[ \boxed{ P(X=k) = \binom{k-1}{r-1} p^r(1-p)^{k-r} } \]for
\[ k=r,r+1,\ldots. \]Why the Final Trial Is Special
In the negative binomial formula, the final trial must be a success.
That leaves only the first \(k-1\) trial positions available for the first \(r-1\) successes.
This is why the combination factor is
\[ \binom{k-1}{r-1} \]rather than
\[ \binom{k}{r}. \]Example: Third Success on Trial 7
Suppose
\[ p=0.4 \]and \(X\) is the trial on which the third success occurs.
Find
\[ P(X=7). \]Apply the formula:
\[ P(X=7) = \binom62(0.4)^3(0.6)^4. \]Complete the Negative Binomial Example
Since
\[ \binom62=15, \]we obtain
\[ P(X=7) = 15(0.064)(0.1296). \]Therefore,
\[ \boxed{P(X=7)=0.124416}. \]Geometric as a Special Negative Binomial Case
If
\[ r=1, \]the negative binomial PMF becomes
\[ P(X=k) = \binom{k-1}{0} p(1-p)^{k-1}. \]Since
\[ \binom{k-1}{0}=1, \]this reduces to
\[ \boxed{ P(X=k)=(1-p)^{k-1}p }. \]Thus the geometric distribution is the \(r=1\) negative binomial distribution under this convention.
The Negative Binomial Mean
If
\[ X\sim\operatorname{NegBin}(r,p) \]counts trials until the \(r\)-th success, then
\[ \boxed{ \mathbb{E}[X]=\frac{r}{p} }. \]The expected waiting time grows linearly with the target number of successes.
The Negative Binomial Variance
Under the same convention,
\[ \boxed{ \operatorname{Var}(X) = \frac{r(1-p)}{p^2} }. \]Therefore,
\[ \boxed{ \sigma_X = \frac{\sqrt{r(1-p)}}{p} }. \]Why the Mean and Variance Scale with \(r\)
The waiting time for the \(r\)-th success can be viewed as the sum of \(r\) independent geometric waiting times:
\[ X=G_1+G_2+\cdots+G_r. \]Each \(G_i\) has mean
\[ \frac1p \]and variance
\[ \frac{1-p}{p^2}. \]Therefore,
\[ \mathbb{E}[X]=\frac rp \]and
\[ \operatorname{Var}(X)=\frac{r(1-p)}{p^2}. \]Example: Mean and Variance
Suppose
\[ X\sim\operatorname{NegBin}(4,0.25). \]Then
\[ \mathbb{E}[X] = \frac{4}{0.25} = \boxed{16}. \]The variance is
\[ \operatorname{Var}(X) = \frac{4(0.75)}{(0.25)^2} = \boxed{48}. \]Negative Binomial Cumulative Probabilities
To find the probability that the \(r\)-th success occurs by trial \(k\), observe that
\[ X\le k \]means at least \(r\) successes have occurred within the first \(k\) Bernoulli trials.
Therefore,
\[ P(X\le k) = P(\text{at least }r\text{ successes in }k\text{ trials}). \]This creates a useful connection with the binomial distribution.
Connection to the Binomial Distribution
If \(Y\sim\operatorname{Binomial}(k,p)\), then
\[ \boxed{ P(X\le k)=P(Y\ge r) }. \]Similarly,
\[ \boxed{ P(X>k)=P(Y\le r-1) }. \]Waiting-time and fixed-trial-count models are two views of the same Bernoulli process.
Example: Third Success by Trial 8
Let \(X\) be the trial of the third success with
\[ p=0.4. \]Then
\[ P(X\le8) \]equals the probability of obtaining at least \(3\) successes in the first \(8\) trials.
If
\[ Y\sim\operatorname{Binomial}(8,0.4), \]then
\[ \boxed{ P(X\le8)=P(Y\ge3) }. \]Failures-Before-Success Convention
As with the geometric distribution, some textbooks define a negative binomial random variable as the number of failures before the \(r\)-th success.
If \(Y\) counts failures before the \(r\)-th success, then
\[ Y=X-r. \]Its possible values are
\[ 0,1,2,\ldots. \]Mean Under the Failures Convention
Since
\[ Y=X-r, \]we have
\[ \mathbb{E}[Y] = \frac rp-r. \]Therefore,
\[ \boxed{ \mathbb{E}[Y] = \frac{r(1-p)}{p} }. \]The variance remains
\[ \boxed{ \operatorname{Var}(Y) = \frac{r(1-p)}{p^2} }. \]Geometric Versus Negative Binomial
| Geometric | Negative Binomial |
|---|---|
| Wait for the first success. | Wait for the \(r\)-th success. |
| Parameter \(p\) | Parameters \(r,p\) |
| Support \(1,2,3,\ldots\) | Support \(r,r+1,\ldots\) |
| \(\mathbb{E}[X]=1/p\) | \(\mathbb{E}[X]=r/p\) |
| \(\operatorname{Var}(X)=(1-p)/p^2\) | \(\operatorname{Var}(X)=r(1-p)/p^2\) |
Binomial Versus Negative Binomial
The binomial and negative binomial distributions answer different questions.
Binomial: fix the number of trials and count successes.
\[ X=\text{number of successes in }n\text{ trials}. \]Negative binomial: fix the number of successes and count trials.
\[ X=\text{number of trials needed for }r\text{ successes}. \]Recognizing the Correct Model
Ask what is fixed and what is random.
- If the number of trials is fixed, consider a binomial model.
- If the first success ends the experiment, consider a geometric model.
- If the \(r\)-th success ends the experiment, consider a negative binomial model.
Example: Choosing the Model
Suppose independent sales calls each produce a sale with probability \(0.1\).
- The number of sales in \(20\) calls is binomial.
- The number of calls until the first sale is geometric.
- The number of calls until the fifth sale is negative binomial.
The underlying Bernoulli process is the same; the stopping rule changes the distribution.
Common Error: Using the Geometric Formula for a Fixed Number of Trials
The geometric model does not count successes in a predetermined number of trials.
If the experiment always stops after \(n\) trials and the question asks how many successes occurred, use a binomial model instead.
Common Error: Forgetting the \(k-1\) Failures
If the first success occurs on trial \(k\), then exactly
\[ k-1 \]failures must come first.
Therefore the geometric PMF uses
\[ (1-p)^{k-1}p. \]Common Error: Starting the Geometric Support at 0
Under the trials-until-success convention used here, the smallest value is
\[ 1. \]A support beginning at \(0\) corresponds to the alternate failures-before-success convention.
Common Error: Forgetting the Final Success in the Negative Binomial Model
If the \(r\)-th success occurs on trial \(k\), then trial \(k\) must be a success.
Only the first \(k-1\) positions are available for arranging the first \(r-1\) successes.
Common Error: Using \(\binom{k}{r}\)
The correct combination factor is
\[ \boxed{ \binom{k-1}{r-1} }. \]Using
\[ \binom{k}{r} \]incorrectly allows the final success to occur before trial \(k\).
Common Error: Mixing Conventions
A formula for trials until the \(r\)-th success should not be mixed with a support or mean formula for failures before the \(r\)-th success.
State the random variable clearly before using a formula.
A Reliable Procedure for Geometric Problems
- Identify what counts as success.
- Identify the constant success probability \(p\).
- Check independence of trials.
- Confirm that the process stops at the first success.
- Define \(X\) as the trial number of the first success.
- Use \(P(X=k)=(1-p)^{k-1}p\) for an exact waiting time.
- Use complements for cumulative waiting-time questions when convenient.
- Interpret the result in context.
A Reliable Procedure for Negative Binomial Problems
- Identify the success probability \(p\).
- Identify the target number of successes \(r\).
- Check independence and constant \(p\).
- Define \(X\) as the trial number of the \(r\)-th success.
- For \(X=k\), place \(r-1\) successes among the first \(k-1\) trials.
- Make trial \(k\) the final required success.
- Use \(\binom{k-1}{r-1}p^r(1-p)^{k-r}\).
- Use the binomial connection for cumulative probabilities when helpful.
Practice 1: Geometric Exact Probability
Let
\[ X\sim\operatorname{Geometric}(0.25). \]Find
\[ P(X=3). \]Practice 2: Geometric Cumulative Probability
Using Practice 1, find
\[ P(X\le3). \]Practice 3: Geometric Mean
Let
\[ X\sim\operatorname{Geometric}(0.2). \]Find the mean.
Practice 4: Geometric Variance
Using Practice 3, find the variance.
Practice 5: Memorylessness
Let
\[ X\sim\operatorname{Geometric}(0.3). \]Given that no success occurred in the first \(5\) trials, find the probability that more than \(2\) additional trials are required.
Practice 6: Negative Binomial Exact Probability
Let \(X\) be the trial on which the second success occurs, with
\[ p=0.4. \]Find
\[ P(X=5). \]Practice 7: Negative Binomial Mean
Let
\[ X\sim\operatorname{NegBin}(3,0.25). \]Find the mean.
Practice 8: Negative Binomial Variance
Using Practice 7, find the variance.
Practice 9: Choose the Model
Independent attempts succeed with probability \(0.15\).
Identify the appropriate distribution for each quantity:
- the number of successes in \(10\) attempts;
- the number of attempts until the first success;
- the number of attempts until the fourth success.
Practice 10: Identify the Error
A student says the probability that the third success occurs on trial \(8\) is
\[ \binom83p^3(1-p)^5. \]Explain what is wrong.
Practice Answers
Practice 1
\[ P(X=3) = (0.75)^2(0.25). \] \[ = 0.5625(0.25) = \boxed{0.140625}. \]Practice 2
\[ P(X\le3) = 1-(0.75)^3. \] \[ = 1-0.421875 = \boxed{0.578125}. \]Practice 3
\[ \mathbb{E}[X] = \frac1{0.2} = \boxed{5}. \]Practice 4
\[ \operatorname{Var}(X) = \frac{1-0.2}{(0.2)^2}. \] \[ = \frac{0.8}{0.04} = \boxed{20}. \]Practice 5
By memorylessness,
\[ P(X>7\mid X>5) = P(X>2). \] \[ = (0.7)^2 = \boxed{0.49}. \]Practice 6
Here \(r=2\), \(k=5\), and \(p=0.4\). Therefore,
\[ P(X=5) = \binom41(0.4)^2(0.6)^3. \] \[ = 4(0.16)(0.216) = \boxed{0.13824}. \]Practice 7
\[ \mathbb{E}[X] = \frac3{0.25} = \boxed{12}. \]Practice 8
\[ \operatorname{Var}(X) = \frac{3(0.75)}{(0.25)^2}. \] \[ = \frac{2.25}{0.0625} = \boxed{36}. \]Practice 9
- Binomial.
- Geometric.
- Negative binomial.
Practice 10
If the third success occurs on trial \(8\), then trial \(8\) must be the final required success. The first two successes must therefore be arranged among the first seven trials.
The correct combination factor is
\[ \boxed{\binom72}, \]so the correct probability is
\[ \boxed{ \binom72 p^3(1-p)^5 }. \]What to Remember
For the trial number of the first success,
\[ \boxed{ X\sim\operatorname{Geometric}(p) }. \]Its probability mass function is
\[ \boxed{ P(X=k)=(1-p)^{k-1}p }. \]Its mean and variance are
\[ \boxed{\mathbb{E}[X]=\frac1p} \]and
\[ \boxed{ \operatorname{Var}(X)=\frac{1-p}{p^2} }. \]For the trial number of the \(r\)-th success,
\[ \boxed{ X\sim\operatorname{NegBin}(r,p) }. \]Its PMF is
\[ \boxed{ P(X=k) = \binom{k-1}{r-1} p^r(1-p)^{k-r} }. \]Its mean and variance are
\[ \boxed{\mathbb{E}[X]=\frac rp} \]and
\[ \boxed{ \operatorname{Var}(X)=\frac{r(1-p)}{p^2} }. \]The key modeling distinction is: binomial fixes the number of trials, geometric waits for the first success, and negative binomial waits for the \(r\)-th success.
Where We Go Next
Bernoulli-based models describe repeated trials with replacement-like independence. Other important discrete distributions arise when sampling occurs without replacement or when events are counted across time, space, or another exposure interval.
The next lesson, Hypergeometric and Poisson Distributions, develops those two major discrete probability models.