1. ## Confusion about combination of different distributions

Say that X has an exponential distribution with unknown lambda. Then I'm told that lambda has a gamma distribution. Now I'm asked to find the density of X. How do I approach this problem?

2. It's called a mixture of distributions, and you solve it using integrals

so we know $f(X| \lambda) = \lambda e^{-\lambda x}$ and $f(\lambda) = \frac{1}{\Gamma(\alpha) B^{\alpha}}x^{\alpha - 1} e^{-x/B}$ (assuming the parameters are alpha and beta).

$f(x) = \int^{\infty}_0 f(X| \lambda) f(\lambda) d \lambda$

3. How would I find E(X) and Var(X) without using the pmf just calculated?

4. I don't think you can.

Since E(x) = $\int^{\infty}_0 xf(x)dx$ and same idea for Var(X).

Also, since f(x) is continous, it's a PDF, not a PMF.