For $NB(r,p)$ where $r$ is the number of successes and the $p$ is the probability of success. Also we have: $$f(x) = {r+x-1\choose r-1}p^rq^{x}$$

I've shown that $f(x)=\frac{(r+x-1)q}{x} f(x-1)$. So: $$f(x)>f(x-1) \iff \frac{(r-1)q}{p}>x$$ $$f(x)<f(x-1) \iff \frac{(r-1)q}{p}<x$$ And after a long calculation, I've found that the mode is the integer part of $\frac{(r-1)q}{p}$. But now when I look at Wikipedia, it says the mode is the integer part of $\frac{(r-1)p}{q}$. Why is that? Where I did wrong?


Solution 1:

There are two different definitions of Negative Binomial distributions in common use. It depends on what you are counting (and what is the terminator).

  • When $X$ is the count of failures before success number $r$, with success rate $p$ and $q=1-p$:$$p_X(k) = \dbinom{k+r-1}{k}q^kp^r\\\text{The mode of $X$ is: }\left\lfloor\dfrac{q(r-1)}{p}\right\rfloor~\mathbf 1_{r>1}$$
  • When $Y$ is the count of successes before failure number $r$, with success rate $p$ and $q=1-p$:$$p_Y(k) = \dbinom{k+r-1}{k}q^rp^k\\\text{The mode of $Y$ is: }\left\lfloor\dfrac{p(r-1)}{q}\right\rfloor~\mathbf 1_{r>1}$$