# Finding $\mathbb{E}[Y^2]$ (Negative Binomial Distribution)

Suppose $Y \sim \text{NegBin}(n, p)$. Then $$\mathbb{E}[Y^2] = \sum_{y=0}^{\infty}y^2\binom{r+y-1}{y}p^rq^y$$ where $q = 1 - p$. Now since the $y = 0$ term adds nothing, \begin{align} \mathbb{E}[Y^2] &= \sum_{y=1}^{\infty}y^2\binom{r+y-1}{y}p^rq^y \\ &= \sum_{y=1}^{\infty}yr\binom{r+y-1}{y-1}p^rq^y \tag{1}\\ &= r\sum_{y=1}^{\infty}y\binom{r+y-1}{y-1}p^rq^y \text{.} \end{align} $(1)$ is true because $$y\binom{r+y-1}{y} = \dfrac{(r+y-1)!}{(y-1)!(r-1)!} = \dfrac{r}{r}\left(\dfrac{(r+y-1)!}{(y-1)!(r-1)!}\right) = r\binom{r+y-1}{y-1}\text{.}$$ Set $z = y - 1$. Then \begin{align} \mathbb{E}[Y^2] &= r\sum_{z=0}^{\infty}(z+1)\binom{r+z}{z}p^rq^{z+1} = r\sum_{z=0}^{\infty}z\binom{r+z}{z}p^rq^{z+1} + r\sum_{z=0}^{\infty}\binom{r+z}{z}p^rq^{z+1}\text{.} \end{align} I showed already that $$\mathbb{E}[Y] = r\sum_{z=0}^{\infty}z\binom{r+z}{z}p^rq^{z+1} = \dfrac{rq}{p}\text{.}$$ I'm not sure how to find $$r\sum_{z=0}^{\infty}\binom{r+z}{z}p^rq^{z+1}$$ after many tries. I believe it should be equal to $$\dfrac{qr(qr+q)}{p^2}$$ but I'm really not seeing it.

• Where did I mess up in my algebra? Obviously this doesn't match what I thought it should be. $\mathbb{E}[Y^2]$ should end up being $\dfrac{rq(1+rq)}{p^2}$. – Clarinetist Jan 19 '16 at 20:59