# Marginal distribution of $X$ when $X|m \sim Pois(m)$ and $M \sim \Gamma (2,1)$

I am trying to find the marginal distribution of the joint $$X$$ and $$M$$ in order to find the probability

$$Pr[X = 0,1,2,3]$$

I am given that $$X|m \sim Pois(m)$$ and $$M \sim \Gamma (2,1)$$ so I am thinking that

$$p_{X|m}(x|m)*f_M(m)$$ is the joint pdf but I realized that one is discrete and the other is continuous.

Is there something I am doing wrong?

How do I proceed from here?

Intuitively I want to find the sum of the Gamma distribution with the Poisson in it, but do not think that works.

Looks almost fine to me. Note that it is indeed continuous as function of $$m$$ but it is not continuous as function of $$x$$. However, do note that what you calculated here is the joint pdf of $$X$$ and $$M$$. What you should want is the density of only $$x$$. As you usually would approach, this is done by integrating out $$m$$, i.e., $$P(X=x) = \int_{0}^{\infty} P(X=x|M=m)\cdot f_M(m)\,\mathrm{d} m.$$ I think this will answer your question. I leave the calculations up to you. However, if you get stuck again, let me know in the comments where.