```{r setup, include=FALSE} knitr::opts_chunk$set(echo = FALSE) ``` ```{r, echo=F, message=F, warning=F} library(readr) library(openintro) data(COL) ``` # Negative binomial distribution ## Negative binomial distribution - The **negative binomial distribution** describes the probability of observing the $k^{th}$ success on the $n^{th}$ trial. - The following four conditions are useful for identifying a negative binomial case: \begin{enumerate} \item The trials are independent. \item Each trial outcome can be classified as a success or failure. \item The probability of success $(p)$ is the same for each trial. \item The last trial must be a success. \end{enumerate} Note that the first three conditions are common to the binomial distribution P($k^{th}$ success on the $n^{th}$ trial) $= {n-1 \choose k-1}p^k(1-p)^{n-k}$, Where $p$ is the probability that an individual trial is a success. All trials are assumed to be independent. ## Practice \alert{A college student working at a psychology lab is asked to recruit 10 couples to participate in a study. She decides to stand outside the student center and ask every $5^{th}$ person leaving the building whether they are in a relationship and, if so, whether they would like to participate in the study with their significant other. Suppose the probability of finding such a person is 10\%. What is the probability that she will need to ask 30 people before she hits her goal?} ## Practice \alert{A college student working at a psychology lab is asked to recruit 10 couples to participate in a study. She decides to stand outside the student center and ask every $5^{th}$ person leaving the building whether they are in a relationship and, if so, whether they would like to participate in the study with their significant other. Suppose the probability of finding such a person is 10\%. What is the probability that she will need to ask 30 people before she hits her goal?} Given: $p=0.10,k=10,n=30.$ We are asked to find the probability of $10^{th}$ success on the $30^{th}$ trial, therefore we use the negative binomial distribution. ## Practice \alert{A college student working at a psychology lab is asked to recruit 10 couples to participate in a study. She decides to stand outside the student center and ask every $5^{th}$ person leaving the building whether they are in a relationship and, if so, whether they would like to participate in the study with their significant other. Suppose the probability of finding such a person is 10\%. What is the probability that she will need to ask 30 people before she hits her goal?} Given: $p=0.10,k=10,n=30.$ We are asked to find the probability of $10^{th}$ success on the $30^{th}$ trial, therefore we use the negative binomial distribution. \begin{align*} P(10^{th} \text{ success on the } 30^{th} \text{ trial}) &= {29 \choose 9} \times 0.10^10 \times 0.90^20 \end{align*} ## Practice \alert{A college student working at a psychology lab is asked to recruit 10 couples to participate in a study. She decides to stand outside the student center and ask every $5^{th}$ person leaving the building whether they are in a relationship and, if so, whether they would like to participate in the study with their significant other. Suppose the probability of finding such a person is 10\%. What is the probability that she will need to ask 30 people before she hits her goal?} Given: $p=0.10,k=10,n=30.$ We are asked to find the probability of $10^{th}$ success on the $30^{th}$ trial, therefore we use the negative binomial distribution. \begin{align*} P(10^{th} \text{ success on the } 30^{th} \text{ trial}) &= {29 \choose 9} \times 0.10^10 \times 0.90^20 \\ &= 10,015 \times 0.10^10 \times 0.90^20 \end{align*} ## Practice \alert{A college student working at a psychology lab is asked to recruit 10 couples to participate in a study. She decides to stand outside the student center and ask every $5^{th}$ person leaving the building whether they are in a relationship and, if so, whether they would like to participate in the study with their significant other. Suppose the probability of finding such a person is 10\%. What is the probability that she will need to ask 30 people before she hits her goal?} Given: $p=0.10,k=10,n=30.$ We are asked to find the probability of $10^{th}$ success on the $30^{th}$ trial, therefore we use the negative binomial distribution. \begin{align*} P(10^{th} \text{ success on the } 30^{th} \text{ trial}) &= {29 \choose 9} \times 0.10^10 \times 0.90^20 \\ &= 10,015 \times 0.10^10 \times 0.90^20 \\ &= 0.00012 \end{align*} ## Binomial vs Negative binomial \alert{How is the negative binomial distribution different from the binomial distribution?} ## Binomial vs Negative binomial \alert{How is the negative binomial distribution different from the binomial distribution?} - 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. ## Practice \alert{Which of the following describes a case where we would use the negative binomial distribution to calculate the desired probability?} A) Probability that a 5 year old boy is taller than 42 inches. B) Probability that 3 out of 10 softball throws are successful. C) Probability if being dealt a straight flush hand in poker. D) Probability of missing 8 shots before the first hit E) Probability of hitting the ball for the $3^{rd}$ time on the $8^{th}$ try. ## Practice \alert{Which of the following describes a case where we would use the negative binomial distribution to calculate the desired probability?} A) Probability that a 5 year old boy is taller than 42 inches. B) Probability that 3 out of 10 softball throws are successful. C) Probability if being dealt a straight flush hand in poker. D) Probability of missing 8 shots before the first hit E) \alert{Probability of hitting the ball for the $3^{rd}$ time on the $8^{th}$ try.}