I'm given $X|λ$, which is an exponential random variable with parameter $λ$, and that $λ|p$ is geometric with parameter $p$, where $p$ is uniform between $0$ and $1$.
I know that the density function of $X$ with param $λ$ is $λe^{-λx}$,
and the density function of $λ$ with param $p$ is $(1-p)^{λ-1}p$
I'm trying to find the pdf for $X$ using the Law of Total Probability, but I'm just having troubles putting the given information together. I have this setup but I think it's wrong
$f(X) = f(X|λ)f(λ) + f(X|\bar{λ})f(\bar{λ})$
Can I have some guidance on this please?
You know that $$\begin{align}f_{X\mid \lambda}(x\mid y) &= y\mathrm e^{-xy}~\mathbf 1_{x\in\Bbb R^+}&&{\text{a probability density function}\\\text{ (exponential distribution)}}\\[1ex]f_{\lambda\mid p}(y\mid z)&=z(1-z)^{y-1}~ \mathbf 1_{y\in\Bbb Z^+}&&{\text{a probability mass function}\\\text{ (geometric distribution)}}\\[1ex]f_p(z)&= \mathbf 1_{p\in[0;1]}&&{\text{a probability density function}\\\text{ (continuous uniform distribution)}}\end{align}$$
The application of the Laws for Total Probability Measures is:
$$\begin{align}f_X(x)&=\sum_{y}\int_\Bbb R f_{X\mid \lambda}(x\mid y)~f_{\lambda\mid p}(y\mid z)~f_p(z)~\mathsf d z\\[2ex]&=\sum_{y=1}^\infty\int_0^1\mathbf 1_{0\leqslant x}~ yz(1-z)^{y-1}~\mathrm e^{-xy}~\mathsf d x\end{align}$$