I'm supposed to do the following, any help/pointer is appreciated:
Suppose $X$ is Poisson distributed with mean $\lambda$. Suppose $\lambda$ is exponentially distributed with mean $1$. Show that $$P(X=n)=\left(\frac{1}{2}\right)^{n+1}.$$
I'm guessing I'm supposed to condition on lambda being something, but can't for the life of me figure out exactly what.
Thanks in advance
ZMI
For $y>0$: $$P\left\{ X=n\mid\lambda=y\right\} =e^{-y}\frac{y^{n}}{n!}$$ and PDF of $\lambda$ is $f_{\lambda}\left(y\right)=e^{-y}$.
This leads to:
$$P\left\{ X=n\right\} =\int P\left\{ X=n\mid\lambda=y\right\} f_{\lambda}\left(y\right)dy=\frac{1}{n!}\int_{0}^{\infty}e^{-2y}y^{n}dy=\frac{1}{n!}2^{-n-1}\int_{0}^{\infty}e^{-z}z^{n}dz=\frac{1}{n!}2^{-n-1}\Gamma\left(n+1\right)=2^{-n-1}$$
This by substitution $z=2y$ and making use of $\Gamma\left(n+1\right)=n!$