I have an exercise where X has an exponential distribution with rate 1, and Y|X=x is a poisson distribution with parameter x.
I can find the expectation and variance of Y using the law of total expectation and law of total variance - and I have gotten 1 and 2 respectively - I'm fairly sure this is correct.
Now I am trying to find the probability generating function of Y, but I'm struggling. I think I need to use the law of total expectation to help me here, but I'm not too sure how.
Any help is appreciated.
If $G(z)$ is the desired PGF we have,
$$G(z) = E[z^Y] = E[E[z^Y|X]]$$
We also have that $$E[z^Y|X=x] = \exp({-x(1-z)})$$
since this is just the PGF of a Poisson random variable with parameter $x$. Then we have that
$$G(z) = E[\exp(-X(1-z))] = \int_0^\infty e^{-x(1-z)}e^{-x}dx = \frac{1}{2-z}.$$
EDIT: Proof that PGF of Poisson random variable with parameter $\lambda$ is $\exp(-\lambda(1-z)$.
Let $X$ be Poisson with parameter $\lambda$. By the definition of Poisson random variables, we have
$$P(X=x) = \frac{\lambda^n}{n!} e^{-\lambda}$$ so $$\begin{align}E[z^X] &= \sum_{n=0}^\infty z^n\frac{\lambda^n}{n!}e^{-\lambda}\\ &= e^{-\lambda}\sum_{n=0}^\infty\frac{(z\lambda)^n}{n!}\\ &= e^{-\lambda}e^{\lambda z} \end{align}$$