The **negative binomial distribution** describes the probability of experiencing a certain amount of failures before experiencing a certain amount of successes in a series of Bernoulli trials.

A

Bernoulli trialis an experiment with only two possible outcomes – “success” or “failure” – and the probability of success is the same each time the experiment is conducted.

An example of a Bernoulli trial is a coin flip. The coin can only land on two sides (we could call heads a “success” and tails a “failure”) and the probability of success on each flip is 0.5, assuming the coin is fair.

If a random variable *X* follows a negative binomial distribution, then the probability of experiencing *k *failures before experiencing a total of *r* successes can be found by the following formula:

**P(X=k) = **_{k+r-1}C_{k} * (1-p)^{r} *p^{k}

where:

**k:**number of failures**r:**number of successes**p:**probability of success on a given trialnumber of combinations of (k+r-1) things taken k at a time_{k+r-1}C_{k}:

For example, suppose we flip a coin and define a “successful” event as landing on heads. What is the probability of experiencing 6 failures before experiencing a total of 4 successes?

To answer this, we can use the negative binomial distribution with the following parameters:

**k:**number of failures = 6**r:**number of successes = 4**p:**probability of success on a given trial = 0.5

Plugging these numbers in the formula, we find the probability to be:

**P(X=6 failures) **= _{6+4-1}C_{6} * (1-.5)^{4} *(.5)^{6} = (84)*(.0625)*(.015625) = **0.08203**.

**Properties of the Negative Binomial Distribution**

The negative binomial distribution has the following properties:

The mean number of failures we expect before achieving *r *successes is **pr / (1-p)**.

The variance in the number of failures we expect before achieving *r *successes is **pr**** / (1-p) ^{2}**.

For example, suppose we flip a coin and define a “successful” event as landing on heads.

The mean number of failures (e.g. landing on tails) we expect before achieving 4 successes would be **pr/(1-p) ** = (.5*4) / (1-.5) = **4**.

The variance in the number of failures we expect before achieving 4 successes would be **pr / (1-p) ^{2} **= (.5*4) / (1-.5)

^{2}=

**8**.

**Negative Binomial Distribution Practice Problems**

Use the following practice problems to test your knowledge of the negative binomial distribution.

**Note: **We will use the Negative Binomial Distribution Calculator to calculate the answers to these questions.

**Problem 1**

**Question: **Suppose we flip a coin and define a “successful” event as landing on heads. What is the probability of experiencing 3 failures before experiencing a total of 4 successes?

**Answer:** Using the Negative Binomial Distribution Calculator with k = 3 failures, r = 4 successes, and p = 0.5, we find that P(X=3) = **0.15625**.

**Problem 2**

**Question: **Suppose we go door to door selling candy. We consider it a “success” if someone buys a candy bar. The probability that any given person will buy a candy bar is 0.4. What is the probability of experiencing 8 failures before we experience a total of 5 successes?

**Answer:** Using the Negative Binomial Distribution Calculator with k = 8 failures, r = 5 successes, and p = 0.4, we find that P(X=8) = **0.08514**.

**Problem 3**

**Question: **Suppose we roll a die and define a “successful” roll as landing on the number 5. The probability that the die lands on a 5 on any given roll is 1/6 = 0.167. What is the probability of experiencing 4 failures before we experience a total of 3 successes?

**Answer:** Using the Negative Binomial Distribution Calculator with k = 4 failures, r = 3 successes, and p = 0.167, we find that P(X=4) = **0.03364**.

Would you double check the formula for P(X=k)?

I think the correct formula is:

P (X = k) = (k+r-1 Choose r-1)* 𝑝^r * (q^k)