I’ve used the following parameterization of the nb distribution to derive its mean and variance:
$P(Y=y) = \left(y + r - q \choose y \right) (1-p)^r p^y$
Which gave me:
Mean = $\mu = \frac{r(1-p)}{p}$ and,
Variance = $Var(Y) = \frac{r(1-p)}{p^2}$.
Now, I’m trying to show that the variance can be expressed as a function of the mean as in:
$V(\mu) = \mu + \frac{\mu^2}{r}$
Which everything I’ve seen mentions is the result after a little tedious algebra, but in my case it seems like a lot. How exactly can I show this? Are my expressions for the mean and variance considering my parameterization correct?
Given a sequence of independent Bernoulli trials with success probability $p$, the number of failures before the $r$'th success has a negative binomial distribution with parameters $r$ and $p$. Thus it is the sum of $r$ independent geometric random variables of parameter $p$ (in the version of the geometric distribution that has possible values starting at $0$). Since this geometric distribution has mean $(1-p)/p$ and variance $(1-p)/p^2$, the negative binomial has $\mu = r(1-p)/p$ and $V = r(1-p)/p^2$. Thus $$V - \mu = r (1-p)\left(\frac{1}{p^2} - \frac{1}{p}\right) = \frac{r (1-p)^2}{p^2} = \frac{\mu^2}{r} $$