I was looking at the solution to this problem below and I don't understand how they used a negative binomial R.V. to solve the problem.
A research study is concerned with the side effects of a new drug. The drug is given to patients, one at a time, until two patients develop side effects. If the probability of getting a side effect from the drug is $1/6$, what is the probability that eight patients are needed?
The answer that is given to the question is below.
Let $Y$ be the number of patients who do not show side effects. Then $Y$ follows a negative binomial distribution with $r=2$, $y=6$ and $p=1/6$. Thus, $$P(Y=6)={(2+6)-1\choose 6}\left(\frac{1}{6}\right)^2 \left(\frac{5}{6}\right)^6 = 0.0651.$$
Now this is where I'm getting confused. I have my notes on the negative binomial R.V. below:
Suppose that independent trials each having probability $0<p<1$ of being a success are performed until a total of $r$ successes is accumulated. If we let $X$ equal the number of trials required then $$ P(X=n)={n-1\choose r-1}p^r (1-p)^{n-r}.$$
- Why does it seem like $6$ is used for $r$ in one part of the answer but $2$ is used for $r$ in another part of the answer?
- If the value for $Y$ that is used in the answer is supposed to be the same as the value for $n$ in my notes why do they add $2$ to $n$?
- Why is the value for $n-r$ equal to $6$ instead of $4=6-2$?
Any clarifying explanations would be really appreciated.