What I know about the mean of the negative binomial distribution is E(x)=r(1-p)/p. but there are some questions use E(x)=r/p as the mean. Very confusing and I don't understand at all.

For example:

Repeatedly roll a fair die until outcome 3 has occurred for the 4th time. Let X be the number of times needed in order to achieve this goal. Find E(X) and Var(X)? My answer: negative binomial with r=4, p=1/6. E(x)=r(1-p)/p=20 However, the right answer is: E(x)=r/q=24

and for this question: The probability that a basketball player makes a free-throw shot is 60%. The player was asked not to leave practice unless he makes 10 shots. Let Y be the number of free-throws missed prior to the 10th shots. Find the mean and the variance of Y. My answer is right. Negative Binomial with r=10,p=0.6. E(y)=r(1-p)/p=6.67

I don't understand why there are 2 formulas and how to tell the difference, which one I should use?


closed as off-topic by user44191, Yemon Choi, Chris Godsil, Gro-Tsen, Margaret Friedland Jul 11 at 21:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "MathOverflow is for mathematicians to ask each other questions about their research. See Math.StackExchange to ask general questions in mathematics." – user44191, Chris Godsil, Gro-Tsen, Margaret Friedland
If this question can be reworded to fit the rules in the help center, please edit the question.


Unfortunately, different authors use different conventions, and there are two different families of distributions that are called "the negative binomial distribution". One is for the number of trials until the $r$'th success, the other is for the number of failures before the $r$'th success. These differ by exactly $r$, and their expected values also differ by $r$. So (if $p$ is the probability of success on each trial) the expected number of trials until the $r$'th success has mean $r/p$, while the expected number of failures before the $r$'th success has mean $r(1-p)/p$.

As another source of confusion, the roles of "success" and "failure" are sometimes interchanged. For some authors you are waiting for the $r$'th success, and for others you are waiting for the $r$'th failure. Of course it's entirely arbitrary which outcome you consider as "success" and which "failure", but traditionally $p$ is the probability of "success" and $1-p$, sometimes denoted as $q$, the probability of "failure".

  • $\begingroup$ It's very helpful. I got it now. Thank you. $\endgroup$ – Lucy Jul 11 at 18:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.