WorldClass Statistics · Distributions of random variables

Negative binomial distribution

The geometric distribution describes the probability of observing the first success on the nthn^{th} trial. The negative binomial distribution is more general: it describes the probability of observing the kthk^{th} success on the nthn^{th} trial.

Example 4.42

Each day a high school football coach tells his star kicker, Brian, that he can go home after he successfully kicks four 35 yard field goals. Suppose we say each kick has a probability pp of being successful. If pp is small – e.g. close to 0.1 – would we expect Brian to need many attempts before he successfully kicks his fourth field goal?


We are waiting for the fourth success (k=4k=4). If the probability of a success (pp) is small, then the number of attempts (nn) will probably be large. This means that Brian is more likely to need many attempts before he gets k=4k=4 successes. To put this another way, the probability of nn being small is low.

To identify a negative binomial case, we check 4 conditions. The first three are common to the binomial distribution.

Is it negative binomial? Four conditions to check

(1) The trials are independent.
(2) Each trial outcome can be classified as a success or failure.
(3) The probability of a success (pp) is the same for each trial.
(4) The last trial must be a success.

Guided Practice 4.43

Suppose Brian is very diligent in his attempts and he makes each 35 yard field goal with probability p=0.8p=0.8. Take a guess at how many attempts he would need before making his fourth kick.1

Example 4.44

In yesterday’s practice, it took Brian only 6 tries to get his fourth field goal. Write out each of the possible sequence of kicks.


Because it took Brian six tries to get the fourth success, we know the last kick must have been a success. That leaves three successful kicks and two unsuccessful kicks (we label these as failures) that make up the first five attempts. There are ten possible sequences of these first five kicks, which are shown in Figure 4.11. If Brian achieved his fourth success (k=4k=4) on his sixth attempt (n=6n=6), then his order of successes and failures must be one of these ten possible sequences.

Kick Attempt
1 2 3 4 56
1 FF FF S1\stackrel{1}{S} S2\stackrel{2}{S} S3\stackrel{3}{S} S4\stackrel{4}{S}
2 FF S1\stackrel{1}{S} FF S2\stackrel{2}{S} S3\stackrel{3}{S} S4\stackrel{4}{S}
3 FF S1\stackrel{1}{S} S2\stackrel{2}{S} FF S3\stackrel{3}{S} S4\stackrel{4}{S}
4 FF S1\stackrel{1}{S} S2\stackrel{2}{S} S3\stackrel{3}{S} FF S4\stackrel{4}{S}
5 S1\stackrel{1}{S} FF FF S2\stackrel{2}{S} S3\stackrel{3}{S} S4\stackrel{4}{S}
6 S1\stackrel{1}{S} FF S2\stackrel{2}{S} FF S3\stackrel{3}{S} S4\stackrel{4}{S}
7 S1\stackrel{1}{S} FF S2\stackrel{2}{S} S3\stackrel{3}{S} FF S4\stackrel{4}{S}
8 S1\stackrel{1}{S} S2\stackrel{2}{S} FF FF S3\stackrel{3}{S} S4\stackrel{4}{S}
9 S1\stackrel{1}{S} S2\stackrel{2}{S} FF S3\stackrel{3}{S} FF S4\stackrel{4}{S}
10 S1\stackrel{1}{S} S2\stackrel{2}{S} S3\stackrel{3}{S} FF FF S4\stackrel{4}{S}

Figure 4.11. The ten possible sequences when the fourth successful kick is on the sixth attempt.

Guided Practice 4.45

Each sequence in Figure 4.11 has exactly two failures and four successes with the last attempt always being a success. If the probability of a success is p=0.8p=0.8, find the probability of the first sequence.2

If the probability Brian kicks a 35 yard field goal is p=0.8p=0.8, what is the probability it takes Brian exactly six tries to get his fourth successful kick? We can write this as P(it takes Brian six tries to make four field goals)=P(Brian makes three of his first five field goals, and he makes the sixth one)=P(1st sequence OR 2nd sequence OR ... OR 10th sequence)\begin{aligned} &P(\text{it takes Brian six tries to make four field goals}) \\ & \quad = P(\text{Brian makes three of his first five field goals, and he makes the sixth one}) \\ & \quad = P(\text{}1^{st}\text{ sequence OR }2^{nd}\text{ sequence OR ... OR }10^{th}\text{ sequence}) \end{aligned} where the sequences are from Figure 4.11. We can break down this last probability into the sum of ten disjoint possibilities: P(1st sequence OR 2nd sequence OR ... OR 10th sequence)=P(1st sequence)+P(2nd sequence)+⋯+P(10th sequence)\begin{aligned} &P(\text{}1^{st}\text{ sequence OR }2^{nd}\text{ sequence OR ... OR }10^{th}\text{ sequence}) \\ &\quad = P(\text{}1^{st}\text{ sequence}) + P(\text{}2^{nd}\text{ sequence}) + \cdots + P(\text{}10^{th}\text{ sequence}) \end{aligned} The probability of the first sequence was identified in Guided Practice 4.45 as 0.0164, and each of the other sequences have the same probability. Since each of the ten sequence has the same probability, the total probability is ten times that of any individual sequence.

The way to compute this negative binomial probability is similar to how the binomial problems were solved in Section 4.3. The probability is broken into two pieces: P(it takes Brian six tries to make four field goals)=[Number of possible sequences]×P(Single sequence)\begin{aligned} &P(\text{it takes Brian six tries to make four field goals}) \\ &= [\text{Number of possible sequences}] \times P(\text{Single sequence}) \end{aligned} Each part is examined separately, then we multiply to get the final result.

We first identify the probability of a single sequence. One particular case is to first observe all the failures (n−kn-k of them) followed by the kk successes: P(Single sequence)=P(n−k failures and then k successes)=(1−p)n−kpk\begin{aligned} &P(\text{Single sequence}) \\ &= P(\text{}n-k\text{ failures and then }k\text{ successes}) \\ &= (1-p)^{n-k} p^{k} \end{aligned}

We must also identify the number of sequences for the general case. Above, ten sequences were identified where the fourth success came on the sixth attempt. These sequences were identified by fixing the last observation as a success and looking for all the ways to arrange the other observations. In other words, how many ways could we arrange k−1k-1 successes in n−1n-1 trials? This can be found using the nn choose kk coefficient but for n−1n-1 and k−1k-1 instead: (n−1k−1)=(n−1)!(k−1)!((n−1)−(k−1))!=(n−1)!(k−1)!(n−k)!\begin{aligned} {n-1 \choose k-1} = \frac{(n-1)!}{(k-1)! \left((n-1) - (k-1)\right)!} = \frac{(n-1)!}{(k-1)! \left(n - k\right)!} \end{aligned} This is the number of different ways we can order k−1k-1 successes and n−kn-k failures in n−1n-1 trials. If the factorial notation (the exclamation point) is unfamiliar, see Section 4.3.

Negative binomial distribution

The negative binomial distribution describes the probability of observing the kthk^{th} success on the nthn^{th} trial, where all trials are independent: P(the kth success on the nth trial)=(n−1k−1)pk(1−p)n−k\begin{aligned} P(\text{the }k^{th}\text{ success on the }n^{th}\text{ trial}) = {n-1 \choose k-1} p^{k}(1-p)^{n-k} \end{aligned} The value pp represents the probability that an individual trial is a success.

Example 4.46

Show using the formula for the negative binomial distribution that the probability Brian kicks his fourth successful field goal on the sixth attempt is 0.164.


The probability of a single success is p=0.8p=0.8, the number of successes is k=4k=4, and the number of necessary attempts under this scenario is n=6n=6. (n−1k−1)pk(1−p)n−k = 5!3!2!(0.8)4(0.2)2 = 10×0.0164 = 0.164\begin{aligned} {n-1 \choose k-1}p^k(1-p)^{n-k}\ =\ \frac{5!}{3!2!} (0.8)^4 (0.2)^2\ =\ 10\times 0.0164\ =\ 0.164 \end{aligned}

Guided Practice 4.47

The negative binomial distribution requires that each kick attempt by Brian is independent. Do you think it is reasonable to suggest that each of Brian’s kick attempts are independent?3

Guided Practice 4.48

Assume Brian’s kick attempts are independent. What is the probability that Brian will kick his fourth field goal within 5 attempts?4

Binomial versus negative binomial

In the binomial case, we typically have a fixed number of trials and instead consider the number of successes. In the negative binomial case, we examine how many trials it takes to observe a fixed number of successes and require that the last observation be a success.

Guided Practice 4.49

On 70% of days, a hospital admits at least one heart attack patient. On 30% of the days, no heart attack patients are admitted. Identify each case below as a binomial or negative binomial case, and compute the probability.5

  1. What is the probability the hospital will admit a heart attack patient on exactly three days this week?

  2. What is the probability the second day with a heart attack patient will be the fourth day of the week?

  3. What is the probability the fifth day of next month will be the first day with a heart attack patient?

Exercises

Exercise 4.27

Rolling a die. Calculate the following probabilities and indicate which probability distribution model is appropriate in each case. You roll a fair die 5 times. What is the probability of rolling

  1. the first 6 on the fifth roll?

  2. exactly three 6s?

  3. the third 6 on the fifth roll?

Exercise 4.28

Playing darts. Calculate the following probabilities and indicate which probability distribution model is appropriate in each case. A very good darts player can hit the bull’s eye (red circle in the center of the dart board) 65% of the time. What is the probability that he

  1. hits the bullseye for the 10th10^{th} time on the 15th15^{th} try?

  2. hits the bullseye 10 times in 15 tries?

  3. hits the first bullseye on the third try?

Exercise 4.29

Sampling at school. For a sociology class project you are asked to conduct a survey on 20 students at your school. You decide to stand outside of your dorm’s cafeteria and conduct the survey on a random sample of 20 students leaving the cafeteria after dinner one evening. Your dorm is comprised of 45% males and 55% females.

  1. Which probability model is most appropriate for calculating the probability that the 4th4^{th} person you survey is the 2nd2^{nd} female? Explain.

  2. Compute the probability from part (a).

  3. The three possible scenarios that lead to 4th4^{th} person you survey being the 2nd2^{nd} female are {M,M,F,F},{M,F,M,F},{F,M,M,F}\{M, M, F, F\}, \{M, F, M, F\}, \{F, M, M, F\} One common feature among these scenarios is that the last trial is always female. In the first three trials there are 2 males and 1 female. Use the binomial coefficient to confirm that there are 3 ways of ordering 2 males and 1 female.

  4. Use the findings presented in part (c) to explain why the formula for the coefficient for the negative binomial is (n−1k−1){n-1 \choose k-1} while the formula for the binomial coefficient is (nk){n \choose k}.

Exercise 4.30

Serving in volleyball. A not-so-skilled volleyball player has a 15% chance of making the serve, which involves hitting the ball so it passes over the net on a trajectory such that it will land in the opposing team’s court. Suppose that her serves are independent of each other.

  1. What is the probability that on the 10th10^{th} try she will make her 3rd3^{rd} successful serve?

  2. Suppose she has made two successful serves in nine attempts. What is the probability that her 10th10^{th} serve will be successful?

  3. Even though parts (a) and (b) discuss the same scenario, the probabilities you calculated should be different. Can you explain the reason for this discrepancy?

Notes

  1. One possible answer: since he is likely to make each field goal attempt, it will take him at least 4 attempts but probably not more than 6 or 7. ↩

  2. The first sequence: 0.2×0.2×0.8×0.8×0.8×0.8=0.01640.2 \times 0.2 \times 0.8 \times 0.8 \times 0.8 \times 0.8 = 0.0164. ↩

  3. Answers may vary. We cannot conclusively say they are or are not independent. However, many statistical reviews of athletic performance suggests such attempts are very nearly independent. ↩

  4. If his fourth field goal (k=4k=4) is within five attempts, it either took him four or five tries (n=4n=4 or n=5n=5). We have p=0.8p=0.8 from earlier. Use the negative binomial distribution to compute the probability of n=4n = 4 tries and n=5n=5 tries, then add those probabilities together: P(n=4 OR n=5)=P(n=4)+P(n=5)=(4−14−1)0.84+(5−14−1)(0.8)4(1−0.8)=1×0.41+4×0.082=0.41+0.33=0.74\begin{aligned} & P(n=4\text{ OR }n=5) = P(n=4) + P(n=5) \\ &\quad = {4-1 \choose 4-1} 0.8^4 + {5-1 \choose 4-1} (0.8)^4(1-0.8) = 1\times 0.41 + 4\times 0.082 = 0.41 + 0.33 = 0.74 \end{aligned} ↩

  5. In each part, p=0.7p=0.7. (a) The number of days is fixed, so this is binomial. The parameters are k=3k=3 and n=7n=7: 0.097. (b) The last “success” (admitting a heart attack patient) is fixed to the last day, so we should apply the negative binomial distribution. The parameters are k=2k=2, n=4n=4: 0.132. (c) This problem is negative binomial with k=1k=1 and n=5n=5: 0.006. Note that the negative binomial case when k=1k=1 is the same as using the geometric distribution. ↩

Credit and licence

“4.4 Negative binomial distribution” is from OpenIntro Statistics, Fourth Edition, by David M Diez, Mine Çetinkaya-Rundel and Christopher D Barr, shared under a CC BY-SA 3.0 license. WorldClass Statistics is a derivative of OpenIntro Statistics, shared under the same license; the original book may be found at openintro.org/book/os.

Source: https://www.openintro.org/book/os/

Licence: CC BY-SA 3.0 (creativecommons.org/licenses/by-sa/3.0/). You may share and adapt it under the same licence, with this credit. WorldClass adapted the formatting only: the text is the authors', with interactive parts and links to other sites left out.

Build status · Flash Infinity AI™ is a trademark of AI-Flash Inc.. WorldClass is not affiliated with, approved or accredited by any exam board, curriculum provider or university unless a page says so.