The negative binomial distribution models the number of Bernoulli trials needed for a certain number of successes to occur. A sequence of independent Bernoulli trials are conducted, each with the same probability of success p. The trial at which the rth success occurs is a negative binomial(r, p) random variable X.
The function ⌊x⌋ in the cdf denotes the "floor" or greatest integer function.
Parameter | Range | Description |
---|---|---|
r | r = 1, 2, ... | Number of successes required |
p | 0 < p ≤ 1 | Probability of success |
Probability Mass Function
Support
Mean
Variance
Example | r | p |
---|---|---|
A coin is tossed repeatedly. Let X be the number of times the coin is tossed until three heads have occurred. | 3 | 0.5000 |
The probability of a pregnancy resulting in a girl is 48.8%. A couple plan to stop having children once they have two girls. Let X be the number of children the couple have when this occurs. | 2 | 0.4880 |
Six programmers need to be hired, and the probability that an applicant is suitable is 0.7. Let X be the number of applicants interviewed until every job is filled. | 6 | 0.7000 |
X ∼ Negative Binomial(r, p)
E(X) = , Var(X) =
Note that, because the earliest the rth success can occur is the rth trial, negative binomial random variables can only take integer values greater than or equal to r.
Note that, because the earliest the rth success can occur is the rth trial, negative binomial random variables can only take integer values greater than or equal to r.
The illustration above shows a sequence of independent Bernoulli(p) trials. The random variable X is the trial at which the rth success occurs, which has a negative binomial(r, p) distribution.
The simulation above shows a sequence of independent Bernoulli(p) trials. Successful trials are shown in green and failures in grey. The random variable X is the trial at which the rth success occurs, which has a negative binomial(r, p) distribution. The histogram accumulates the results of each simulation.