Let $X, Y$ be independent random variables with the geometric distribution with parameter $p > 0$.
(a) Compute the mean of $Z = XY$.
I got that $E(Z) = 1/p^2$
(b) Compute the probability generating function of $W = X + 2Y$
This is my work so far: work
I'm not sure if this right and if it is the final answer or not. Please help.
Since $X$ and $Y$ are independent, we have $$ \mathbb E[XY] = \mathbb E[X]\mathbb E[Y] = \frac1p\cdot\frac1p=\frac1{p^2}. $$ Recall that the probability generating function of $X$ is $$ G_X(s) := \mathbb E[s^X] = \sum _{k=1}^{\infty } (1-p)^{k-1}p s^k= \frac{ps}{1-(1-p)s}, $$ so the probability generating function of $2Y$ is $$ G_{2Y}(s) := \mathbb E[s^{2Y}] = \sum _{k=1}^{\infty } (1-p)^{k-1}p s^{2k}= \frac{p s^2}{1-(1-p) s^2}. $$ By independence, the probability generating function of $W$ is the product of the probability generating functions of $X$ and $2Y$: \begin{align} G_W(s) &= G_X(s)G_{2Y}(s)\\ &= \frac{ps}{1-(1-p)s}\cdot\frac{p s^2}{1-(1-p) s^2}\\ &= \frac{p^2s^3}{(1-(1-p)s)(1-(1-p)s^2)}. \end{align}