25 Binomial and Negative Binomial Distributions
25.1 Bernoulli trials
In a sequence of Bernoulli(\(p\)) trials:
- There are only two possible outcomes, “success” (1) and “failure” (0), on each trial.
- The unconditional/marginal probability of success is the same on every trial, and equal to \(p\).
- The trials are independent.
25.2 Binomial distributions
Example 25.1 In a random bit stream, the probability that any particular bit is 1 is 0.75, independently of all other bits. Let \(X\) be the number of 1s in the next 10 bits.
Identify by name the distribution of \(X\). Be sure to specify the values of relevant parameters.
Compute and interpret \(\text{P}(X=6)\).
Compute and interpret \(\text{E}(X)\).
- A discrete random variable \(X\) has a Binomial distribution with parameters \(n\), a nonnegative integer, and \(p\in[0, 1]\) if its probability mass function is \[\begin{align*} p_{X}(x) & = \binom{n}{x} p^x (1-p)^{n-x}, & x=0, 1, 2, \ldots, n \end{align*}\] If \(X\) has a Binomial(\(n\), \(p\)) distribution \[\begin{align*} \text{E}(X) & = np\\ \text{Var}(X) & = np(1-p) \end{align*}\]
- If \(X\) counts the number of successes in a fixed number, \(n\), of Bernoulli(\(p\)) trials then \(X\) has a Binomial(\(n, p\)) distribution.
Example 25.2 In each of the following situations determine whether or not \(X\) has a Binomial distribution. If so, specify \(n\) and \(p\). If not, explain why not.
Roll a die 20 times; \(X\) is the number of times the die lands on an even number.
Roll a die 20 times; \(X\) is the number of times the die lands on 6.
Roll a die until it lands on 6; \(X\) is the total number of rolls.
Roll a die 20 times; \(X\) is the sum of the numbers rolled.
Shuffle a standard deck of 52 cards (13 hearts, 39 other cards) and deal 5 without replacement; \(X\) is the number of hearts dealt. (Hint: be careful about why.)
Roll a fair six-sided die 10 times and a fair four-sided die 10 times; \(X\) is the number of 3s rolled (out of 20).
25.3 Geometric distributions
Example 25.3 Maya is a basketball player who makes 40% of her three point field goal attempts. Suppose that she attempts three pointers until she makes one and then stops. Let \(X\) be the total number of shots she attempts. Assume shot attempts are independent.
Does \(X\) have a Binomial distribution? Why or why not?
What are the possible values that \(X\) can take? Is \(X\) discrete or continuous?
Compute and interpret \(\text{P}(X=3)\).
Find the probability mass function of \(X\).
Construct a table, plot, and spinner representing the distribution of \(X\).
Compute and interpret \(\text{P}(X>5)\) without summing. (Hint: consider the first 5 trials.)
What seems like a reasonable general formula for \(\text{E}(X)\)? Make a guess, and then compute and interpret \(\text{E}(X)\) for this example.
Would \(\text{Var}(X)\) be bigger or smaller if \(p=0.9\)? If \(p=0.1\)?
Compute and interpret \(\text{P}(X > 15 | X > 10)\). What do you notice?
- A discrete random variable \(X\) has a Geometric distribution with parameter \(p\in[0, 1]\) if its probability mass function is \[\begin{align*} p_{X}(x) & = p (1-p)^{x-1}, & x=1, 2, 3, \ldots \end{align*}\] If \(X\) has a Geometric(\(p\)) distribution \[\begin{align*} \text{E}(X) & = \frac{1}{p}\\ \text{Var}(X) & = \frac{1-p}{p^2} \end{align*}\]
- Suppose you perform Bernoulli(\(p\)) trials until a single success occurs and then stop; let \(X\) be the total number of trials performed, including the success. Then \(X\) has a Geometric(\(p\)) distribution. In this situation, exactly \(x\) trials are performed if and only if
- the first \(x-1\) trials are failures, and
- the \(x\)th (last) trial results in success.
25.4 Negative Binomial Distributions
Example 25.4 Maya is a basketball player who makes 86% of her free throw attempts. Suppose that she attempts free throws until she makes 5 and then stops. Let \(X\) be the total number of free throws she attempts. Assume shot attempts are independent.
Does \(X\) have a Binomial distribution? A Geometric distribution? Why or why not?
What are the possible values of \(X\)? Is \(X\) discrete or continuous?
Compute and interpret \(\text{P}(X=5)\)
Compute and interpret \(\text{P}(X=6)\)
Compute and interpret \(\text{P}(X=7)\)
Compute and intepret \(\text{P}(Y=8)\)
Find the probability mass function of \(X\).
What seems like a reasonable general formula for \(\text{E}(X)\)? Interpret \(\text{E}(X)\) for this example.
Would the variance be larger or smaller if attempted free throws until she made 10 instead of 5?
- A discrete random variable \(X\) has a Negative Binomial distribution with parameters \(r\), a positive integer, and \(p\in[0, 1]\) if its probability mass function is \[\begin{align*} p_{X}(x) & = \binom{x-1}{r-1}p^r(1-p)^{x-r}, & x=r, r+1, r+2, \ldots \end{align*}\] If \(X\) has a NegativeBinomial(\(r\), \(p\)) distribution \[\begin{align*} \text{E}(X) & = \frac{r}{p}\\ \text{Var}(X) & = \frac{r(1-p)}{p^2} \end{align*}\]
- Suppose you perform a sequence of Bernoulli(\(p\)) trials until \(r\) successes occur and then stop. Let \(X\) be the total number of trials performed, including the trials on which the successes occur. Then \(X\) has a NegativeBinomial(\(r\),\(p\)) distribution. In this situation, exactly \(x\) trials are performed if and only if
- there are exactly \(r-1\) successes among the first \(x-1\) trials, and
- the \(x\)th (last) trial results in success.
- There are \(\binom{x-1}{r-1}\) possible sequences that satisfy the above, and each of these sequences — with \(r\) successes and \(x-r\) failures — has probability \(p^r(1-p)^{x-r}\).
Example 25.5 What is another name for a NegativeBinomial(1,\(p\)) distribution?
Example 25.6 Suppose \(X_1, \ldots, X_r\) are independent each with a Geometric(\(p\)) distribution. What is the distribution of \(X_1+\cdots + X_r\)? Find the expected value and variance of this distribution.
Example 25.7 Each box of a certain type of cereal contains one of \(n\) distinct prizes — labeled \(1, \ldots, n\) — and you want to obtain a complete set. Suppose that each box of cereal is equally likely to contain any one of the \(n\) prizes, independently from box to box. You purchase cereal boxes one box at a time until you have the complete set of \(n\) prizes. Let \(X\) be the number of boxes purchased to obtain a complete set of prizes. Compute and interpret \(\text{E}(X)\) as a function of \(n\).