Click or press any key to close help Help screen describing the interactive elements

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.

Parameter Range Description
r r = 1, 2, ... Number of successes required
p 0 < p ≤ 1 Probability of success

Probability Mass Function

P ( X = x | r , p ) = ( x 1 r 1 ) p r ( 1 p ) x r

Support

x = r , r + 1 ,

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)

Chart of the negative binomial distribution Chart area for displaying the negative binomial pmf, cdf, visualization, and simulation

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.

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.

Y = Negative Binomial(1, p) ~ Geometric(p) Σ Xᵢ ~ Negative Binomial(Σrᵢ, p) limr→∞ X ~ Normal(r/p, r(1 - p)/p²)

Chart of the related distribution Chart area for displaying the related pdf, cdf, visualization, and simulation

E(Y) = , Var(Y) =