1

I wanted to obtain the variance of a random variable $X$ following a negative binomial distribution, directly, without using the moment generating function. I'm working with the distribution that counts the number of failures before $r$ successes, which has the following density function:

$$f_X(x) =\displaystyle{\binom{r+x-1}{x} }p^r(1-p)^x $$ for $x=0,1,2,\ldots$ Thanks to this question , which has very minor differences, I was able to obtain that $$\mathbb{E}(X) = \frac{r(1-p)}{p}$$ with this parameterization. Now, when trying to calculate the variance $$\operatorname{Var}(X) =\mathbb{E}(X^2) - [\mathbb{E}(X)]^2$$ we have to solve the infinite series $$\mathbb{E}(X^2)= \sum_{k=0}^\infty k^2 \displaystyle{\binom{r+k-1}{k} }p^r(1-p)^k$$ but I'm not able to somehow eliminate the $k^2$ term. Is there some nice trick/substitution to solve this series? Maybe a combinatorial identity? Any help is appreciated.

Bergson
  • 1,737

2 Answers2

1

Hint:

1) write the binomial in terms of factorials

2) Write $\frac {k^{2}} {k!}$ as $\frac k {(k-1)!}$

3) Change $k$ to $k+1$

4) You will have $k+1$ in the numerator. Split this into two terms. In the first term write $\frac k {k!}$ as $\frac 1 {(k-1)!}$ and change $k$ to $k+1$

Now you can write down the value.

0

For future viewers, here is how I solved it, using Kavi Rama Murthy's hint: \begin{align*} \mathbb{E}(X^2) &= \displaystyle{\sum_{k=0}^\infty} k^2 \ \displaystyle{\binom{r+k-1}{k} }p^r(1-p)^k\\[0.3em] &= \displaystyle{\sum_{k=1}^\infty} k^2 \ \frac{(r+k-1)!}{(r-1)! k!}p^r(1-p)^k\\[0.3em] &= \displaystyle{\sum_{k=1}^\infty} k \ \frac{(r+k-1)!}{(r-1)! (k-1)!}p^r(1-p)^k\\[0.3em] &= \displaystyle{\sum_{k=0}^\infty} (k+1) \ \frac{(r+k)!}{(r-1)! k!}p^r(1-p)^{k+1}\\[0.3em] &= \displaystyle{\sum_{k=0}^\infty} k \ \frac{(r+k)!}{(r-1)! k!}p^r(1-p)^{k+1} + \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+k)!}{(r-1)! k!}p^r(1-p)^{k+1}\\[0.3em] &= \displaystyle{\sum_{k=1}^\infty} \ \frac{(r+k)!}{(r-1)! (k-1)!}p^r(1-p)^{k+1} + \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+k)!}{(r-1)! k!}p^r(1-p)^{k+1}\\[0.3em] &= \underbrace{\displaystyle{\sum_{k=0}^\infty} \ \frac{(r+k+1)!}{(r-1)! k!}p^r(1-p)^{k+2}}_{=: \ a} + \underbrace{\displaystyle{\sum_{k=0}^\infty} \ \frac{(r+k)!}{(r-1)! k!}p^r(1-p)^{k+1}}_{=: \ b}\\[0.3em] \end{align*} Now we solve $a$ and $b$ individually:

(a)

\begin{align*} \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+k+1)!}{(r-1)! k!}p^r(1-p)^{k+2} &= \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+2+k-1)!}{(r-1)! k!}p^r(1-p)^{k+2} \\[0.3em] &= \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+2+k-1)!}{(r-1)! k!} \frac{(r+2-1)!}{(r+2-1)!}p^r(1-p)^{k+2}\\[0.3em] &= \frac{(r+1)!(1-p)^2}{(r-1)!p^2} \underbrace{\displaystyle{\sum_{k=0}^\infty} \binom{r+2+k-1}{k} p^{r+2} (1-p)^k}_{=1}\\[0.3em] &= r(r+1)\left(\frac{1-p}{p}\right)^2 \end{align*}

(b) \begin{align*} \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+k)!}{(r-1)! k!}p^r(1-p)^{k+1} &= \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+1+k-1)!}{(r-1)! k!}p^r(1-p)^{k+1} \\[0.3em] &= \displaystyle{\sum_{k=0}^\infty} \ \frac{(r+1+k-1)!}{(r-1)! k!} \frac{(r+1-1)!}{(r+1-1)!}p^r(1-p)^{k+2}\\[0.3em] &= \frac{r(1-p)}{p} \underbrace{\displaystyle{\sum_{k=0}^\infty} \binom{r+1+k-1}{k} p^{r+1} (1-p)^k}_{=1}\\[0.3em] &= \frac{r(1-p)}{p} \end{align*}

then, also using the fact that $\mathbb{E}(X)= \frac{r(1-p)}{p}$, we can finally compute the variance: \begin{align*} \operatorname{Var}(X) &= \mathbb{E}(X^2)-[\mathbb{E}(X)]^2\\ &= \left[ r(r+1)\left(\frac{1-p}{p}\right)^2 + \frac{r(1-p)}{p} \right] - \left( \frac{r(1-p)}{p}\right)^2\\ &= \frac{r(1-p)}{p^2}. \end{align*}

Bergson
  • 1,737