# Negative binomial distribution #### Everything You Need in One Place

Homework problems? Exam preparation? Trying to grasp a concept or just brushing up the basics? Our extensive help & practice library have got you covered. #### Learn and Practice With Ease

Our proven video lessons ease you through problems quickly, and you get tonnes of friendly practice on questions that trip students up on tests and finals. #### Instant and Unlimited Help

Our personalized learning platform enables you to instantly find the exact walkthrough to your specific type of question. Activate unlimited help now! ##### Intros
###### Lessons

1. • Deriving negative binomial distribution
• Formula for negative binomial distribution
• Relation of geometric distribution to the negative binomial distribution
##### Examples
###### Lessons
1. Identifying Negative Binomial Distributions
Identify which of the following experiments below are negative binomial distributions?
i.
A fair coin is flipped until head comes up 4 times. What is the probability that the coin will be flipped exactly 6 times?
ii.
Cards are drawn out of a deck until 2 exactly aces are drawn. What is the probability that a total of 10 cards will be drawn?
iii.
An urn contains 3 red balls and 2 black balls. If 2 balls are drawn with replacement what is the probability that 1 of them will be black?
iv.
Roll a die until the first six comes up. What is the probability that this will take 3 rolls?
1. Determining the Negative Binomial Distribution
A fair coin is flipped until head comes up 4 times. What is the probability that the coin will be flipped exactly 6 times?
1. Determining the Cumulative Negative Binomial Distribution
A sculptor is making 3 exhibits for an art gallery. There is a probability of 0.75 that every piece of wood she carves into will be good enough to be part of the exhibit. What is the probability that she uses 4 pieces of wood or less?

## Negative binomial distribution

When studying the different discrete probability distributions that exist in statistical analysis you will find that some of them share many characteristics and seem to respond to the same problem just with a few shifted things. This is the case for the difference between the binomial and the negative binomial distribution that we will talk about today.

For that, let us go back a little bit and recall what a binomial distribution is, and from that, on the second section of this lesson we will study what the negative version of it is.

#### What is a binomial distribution?

A binomial probability distribution is a discrete probability distribution which can have two possible outcomes: either a success or a failure; this kind of distribution shows the possible successful results to occur in a series of finite trials and so, the possible outcomes just range between yes and no (did the expected outcome happened? Or did it not?), or true and false, or anything that refers to an event being a success for our result expectation or a failure.
The general probability formula of a binomial distribution (which can be sometimes simply referred as the binomial distribution formula), is defined as follows:

$P(x) = \, _{n}C_{x}p^{x} (1-p)^{n-x} =$ $\large \frac{n!}{x!(n-x)!}$ $p^{x}(1-p^{n-x})$

Where:
$n$ = number of trials
$x$ = number of successes in $n$ trials
$p$ = probability of success in each trial
$_{n}C_{x} =$ $\large \frac{n!}{x!(n-x)!}$ = number of success outcomes
$P(x)$ = probability of getting $x$ successes out of $n$ trials
When studying a discrete random variable x and it has a binomial distribution, we are looking for the number of successes in a certain amount of trials. In order to be sure that our statistical experiment is based on such a discrete distribution, there are a few conditions it must meet:

1. The experiment has a fixed number of trials. And so, the value of $n$ is defined.
2. Each trial has only two possible outcomes, the result is either a success or a failure.
3. The probability of success for each individual trial is equal.

This last condition is the result of what we call running the trials with replacement, meaning that all of the possible outcomes of the first attempt, are kept for the second, third and nth attempt. No matter how many trials are run, every single one has the same amount and equal possible outcomes, meaning that its probability of success remains the same throughout all of the trials.

#### Negative binomial distribution

While the binomial distribution is concerned on studying the number of successes in a certain amount of trials, the negative binomial distribution studies the amount of runs in the experiments that have to pass so a certain number of successes occur. Just as in the binomial distribution, the negative binomial distribution has only two possible outcomes in each trial: either a success or a failure. Just as the binomial distribution, the negative binomial distribution has certain conditions:
1. There are only two possible outcomes for each trial in the experiment.
2. The probability of success in each trial is constant, in other words, it doesnt matter how many trials are run in the experiment, the value of the probability of success in each is the same.
3. There is a set number of trials to run in the experiment, and each of these trials is independent from the others.

With that in mind, the negative binomial distribution equation for probability is defined as

$P(n) = \, _{(n-1)}C_{(x-1)}p^{x} (1-p)^{n-x} =$ $\large \frac{(n-1)!}{(x-1)!(n-x)!}$ $p^{x}(1-p^{n-x})$

Where:
$n$ = number of trials
$x$ = number of successes in n trials
$p$ = probability of success in each trial
$_{(n-1)}C_{(x-1)} =$ $\large \frac{(n-1)!}{(x-1)!(n-x)!}$ = probability combinations for successes
$P(x)$ = probability of getting $x$ successes out of $n$ trials

Do not confuse the probability of the negative binomial distribution thinking this means the probabilities calculated are negative! There is no such thing as a negative probability! This distribution has the word negative on its name given the nature of the perspective by which the problem is looked at, kind of a backwards perspective when comparing it to the binomial distribution, and thus the name.

#### Negative binomial distribution examples

Using the negative binomial definition as presented above, let us work through a few examples to gain practice:

#### Example 1

We start with an example focused on knowing when you have negative binomial distributions presented to you. And so, identify which of the following experiments below are negative binomial distributions, we recommend you to use the three conditions mentioned on our last section, plus figure 1, so you do not confuse them with simple binomial distributions.

$\quad$ A fair coin is flipped until head comes up 4 times. What is the probability that the coin will be flipped exactly 6 times?
This is a typical example of a negative binomial distribution since the problems asks about the number of trials needed in order to obtain a certain amount of successes.

$\quad$ Cards are drawn out of a deck until 2 exactly aces are drawn. What is the probability that a total of 10 cards will be drawn?
Although this problem asks for the chances of a certain number of trials to be done in order to reach the successes desired, this is not a negative binomial distribution because every time a card is drawn, the probability of success of each trial changes. So if the probability of success in each trial is not constant, this cannot be a negative binomial distribution.

$\quad$ An urn contains 3 red balls and 2 black balls. If 2 balls are drawn with replacement what is the probability that 1 of them will be black?
This is not a negative binomial distribution example, since the problem asks about the probability of a certain amount of successes per two trials: therefore this is a binomial distribution.

$\quad$Roll a die until the first six comes up. What is the probability that this will take 3 rolls?
This is not a negative binomial distribution because the problem focuses in an experiment that will go on until the first success occurs; as we learnt in our past lesson, this is a geometric distribution.

#### Example 2

On this negative binomial example we focus on calculating the distribution using the equation for the probability defined in equation 2.
A fair coin is flipped until head comes up 4 times. What is the probability that the coin will be flipped exactly 6 times?

For this case we have that:
$n = 6,$ number of times the coin will be flipped.
$x = 4,$ number of successes we want.
$p = 0.5,$ the probability of success in each trial must be one half since there are 50% chances a particular face comes up when flipping a coin.
$(1-p) = 1 - 0.5 = 0.5$ which makes sense, since there are 50% chances of success in each flip, there are 50% chances of a failure in each flip.

And so, we calculate the probability that the coin will be flipped 6 times and we will obtain 4 successes:

$P(n) =$ $\large \frac{(n-1)!} {(x-1)!(n-x)!}$ $p^{x} (1-p)^{n-x} \;$$\; P(6) =$ $\large \frac{(6-1)!} {(4-1)!(6-4)!}$ $(0.5)^{4}(0.5)^{6-4}$

$P(6) =$ $\large \frac{(6-1)!} {(4-1)!(6-4)!}$ $(0.5)^{4}(0.5)^{6-4} =$ $\large \frac{5\, \times \, 4 \, \times \, 3 \, \times \, 2 \, \times \, 1} {(3 \, \times \, 2 \, \times \, 1) (2 \, \times \, 1) }$ $(0.5)^{4}(0.5)^{2} = (10)(0.015625) = 0.15625$

Therefore, there are 15.625% chances of flipping a coin six times and obtaining four successes on that run.

#### Example 3

Determining the Cumulative Negative Binomial Distribution
A sculptor is making 3 pieces to exhibit at an art gallery. There is a probability of 0.75 that every piece of wood she carves into will be good enough to be part of the exhibit. What is the probability that she uses 4 pieces of wood or less in order to produce the 3 final to exhibit at the gallery?

For this case we have that:
$n \leq 4,$ number of pieces of wood she will use to obtain the final carved pieces to exhibit..
$x = 3,$ number of successes we want.
$p = 0.75,$ the probability of each carved piece to be part of the sculptors exhibit.
$(1-p) = 1 - 0.75 = 0.25 \,$ is the probability of a piece not to be used in an exhibit.

In this case it is important to note that n cannot have a value of zero, actually, it cannot have a value smaller than three since the sculptor MUST use at least one piece of wood to produce one piece of art. Therefore n is less or equal to 4, but is higher than 3 for this case.
And so, we calculate the cumulative probability, for using four pieces of wood or less, which means that we have to add the probabilities of the sculptor using three and four pieces of wood:

$P(n \leq 4)=P(3)+P(4)$

Therefore, we calculate the probability for the different values of $n$ separately:

$P(n) =$ $\large \frac{(n-1)!} {(x-1)!(n-x)!}$ $p^{x}(1-p)^{n-x} \;$$\; P(3) =$ $\large \frac{(3-1)!} {(3-1)!(3-3)!}$ $(0.75)^{3}(0.25)^{3-3}$

$P(3) =$ $\large \frac{(3-1)!} {(3-1)!(3-3)!}$ $0.75)^{3}(0.25)^{3-3} = (1)(0.75)^{3}(1) = 0.42187$

and

$P(n) =$ $\large \frac{(n-1)!} {(x-1)!(n-x)!}$ $p^{x}(1-p)^{n-x} \;$$\; P(4) =$ $\large \frac{(4-1)!} {(3-1)!(4-3)!}$ $(0.75)^{3}(0.25)^{4-3}$

$P(4) =$ $\large \frac{(4-1)!} {(3-1)!(4-3)!}$ $0.75)^{3}(0.25)^{4-3} = (4)(0.75)^{3}(0.25) = 0.42187$

Therefore the final result for the probability is:

$P(n \leq 4) = P(3) + P(4) = 0.42187 + 0.42187 = 0.84374$

So now that you have learned the negative binomial distribution definition and worked through a few problems, you are ready for the last discrete probability distribution we will see in this course: the hypergeometric distribution.
But before that, let us recommend you some other study materials: on this negative binomial distribution lecture you can find an example for negative binomial variance and mean. On this lesson on the hypergeometric and negative binomial distributions you can see the relationship between these two and the simple binomial distribution, and their differences, such lesson can serve as an introduction to our next one.

And so, this is it for today, we hope you enjoyed this lesson, and see you in the next one!.
• Negative Binomial Distribution: $P(n)=_{(n-1)}C_{(x-1)}p^x(1-p)^{n-x}$
$n$: number of trials
$x$: number of success in n trials
$p$: probability of success in each trial
$P(n)$: probability of getting the $x$ success on the $n^{th}$ trial