The Negative Binomial Distribution

Definition: A negative binomial experiment is conducted by repeating independent bernoulli trials, each with an identical probability of success $p$, until a fixed number of successes $r$ are reached. A negative binomial random variable $Y$ is one that counts the number of trials in a negative binomial experiment.

Problem: Which of the following are negative binomial random variables?

  1. The number of times you draw cards from a deck of 52 cards until you draw an ace
  2. The number of times you roll a pair of dice until you get doubles twice
  3. The number of dead AA batteries in a pack of 12
  4. The number of times the barrista at starbucks gets my order wrong before finally getting it right

The pmf for a negative binomial random variable can be derived from the binomial pmf. Let $Y$ be a negative binomial random variable with $r$ successful trials and probability of success $p$. In order for there to be $y$ total trials, there must have been $r-1$ successful trials in the first $y-1$ trials, and one successful trial at the very end. Thus, the pmf is \begin{align} g_r(y) = f_{y-1}(r-1)f_1(1), \end{align} where $f_{y-1}(r-1)$ is the binomial pmf for $r-1$ successes with $y-1$ trials and $f_1(1)$ is the probability of success on one trial. Plugging in the definitions gives \begin{align} g_r(y) &= \binom{y-1}{r-1}p^{r-1}(1-p)^{y-1-(r-1)}p\\ &= \binom{y-1}{r-1}p^r(1-p)^{y-r}. \end{align} The range of $Y$ is $\{r,r+1,r+2,...\}$, since there must be at least $r$ trials before there are $r$ successful trials.

Example: Anna is surveying sites for a mining company. Her contract is fulfilled once she has found 3 suitable sites. Suppose that the probability each site is suitable is independant and equal to $1/4$.

  1. What is the probability she surveys more than 4 sites?
  2. What is the probability she surveys exactly 4 unsuitable sites before finishing?

Side Note: An alternative definition of a negative binomial random variable is one that counts the number of failures in a negative binomial experiment. If $K$ counts the number of failures, $r$ is the number of successes, then there are $Y = K+r$ trials. The pmf for $K$ can be written as \begin{align} \tilde{g}_r(k) &= g_r(k+r) = \binom{r+k-1}{r-1}p^{r}(1-p)^{r+k-r}\\ &= \binom{r+k-1}{k}p^r(1-p)^k, \end{align} since \begin{align} \binom{r+k-1}{r-1} &= \frac{(r+k-1)!}{(r+k-1-(r-1))!(r-1)!}\\ &= \frac{(r+k-1)!}{k!(r-1)!}\\ &= \frac{(r+k-1)!}{k!(r-1+k-k)!}\\ &= \binom{r+k-1}{k}. \end{align}

The range of $K$ is $\{0,1,2,3,4,...\}$.

Exercises

  • The geometric distribution is a special case of the negative binomial distribution with $r=1$. I.e. it counts the number of trials that occur before there is a success.
    1. Write the simplified pmf for the geometric distribution with probability of success $p$.
    2. Find the expected value for a geometric random variable with probability of success $p$.
    3. We can think of a negative binomial random variable with $r$ successes as a sum of $r$ geometric random variables. Use this interpretation to find the expected value for a negative binomial random variable with $r$ successes and probability of success $p$.
  • Billy's basketball coach is making him practice three point shots. He can stop when he makes 10 baskets. Assuming that the probability that Billy makes a basket is $1/8$, and doesn't change over time.
    1. What is the probability that Billy makes 10 of his first 11 shots?
    2. What is the probability that Billy takes more than 15 shots?
    3. How many shots should Billy expect to take?