# Finding the distribution of a poisson distribution with random variable lambda

So suppose $X$ is a rv with a Poisson distribution with $\lambda$ being a random variable as well. $\lambda$ has an exponential distribution with mean $1/c$ and $f_\lambda(t) = c\times\exp(-ct)1_{[0, \infty)}(t)$ where $1_{[0, \infty)}$ is the indicator function of $t$. The question is, what is the distribution of $X$? I really want to simply plug it in, but I feel like that is incorrect. Also, what is the distribution of $\lambda$ has a gamma distribution with scale parameter $\alpha$ s.t. $f_\lambda(t)=c(ct)^{\alpha-1}exp(-ct)/\Gamma(\alpha)$ for $t>0$?

I apologize for the poor formatting, but I couldn't figure out how to format it correctly, and it kept screwing up.

## 1 Answer

You can think of it like this. What you have initially is a conditional distribution, that is

$$X|\lambda\sim Po(\lambda)$$

What you want is the marginal distribution of $X$. To this end, remember the following relationship:

$$p(x)=\int_0^\infty p(x,\lambda)d\lambda=\int_0^\infty p(x|\lambda)p(\lambda)d\lambda$$ where you are given $p(x|\lambda)$ and $p(\lambda)$ in the exercise. So multiply them together and integrate out $\lambda$ and there you go.