We saw in Exercise 5.159 that the negative binomial random variable $Y$ can be written as $Y=\sum_{i=1}^{r} W_{i},$ where $W_{1}, W_{2}, \ldots, W_{r}$ are independent geometric random variables with parameter $p$.
a. Use this fact to derive the moment-generating function for $Y$.
b. Use the moment-generating function to show that $E(Y)=r / p$ and $V(Y)=r(1-p) / p^{2}$.
c. Find the conditional probability function for $W_{1}$, given that $Y=W_{1}+W_{2}+\cdots+W_{r}=m$.