Let
\begin{align} Y&\sim \text{gamma}(\alpha, \lambda)\\ X|Y=y&\sim \text{Poisson}(y). \end{align}
Find the conditional distribution $Y|X=x$.
How to do that? I'm confused because the gamma distribution is a continous distribution and Poisson distribution is a discrete distribution. Can it be solved?
I just can find distribution of $(X,Y)$. Then I don't know how to find the distribution of $X$ (marginal pdf for $X$).
Thanks for any help.
So by Bayes' rule, you have,
$$P(Y|X) = \frac{P(X|Y)P(Y)}{P(X)}=\frac{P(X|Y)P(Y)}{\int_YP(X|Y)P(Y)}.$$
Since you're given both $P(X|Y)$ and $P(Y)$ in the problem, then all you need to do is compute the integral in the denominator of the above expression,
$$P(X=x)=\int_0^\infty\frac{x^ye^{-x}}{-x!}\cdot\frac{1}{\Gamma(\alpha)\lambda^\alpha}y^{\alpha-1}e^{-\frac{y}{\lambda}}dy.$$
(I'm assuming that your gamma distribution is shape-scale parametrized).
This integral may be intractable to compute directly, and if so then to determine the posterior you can simply use the fact that the gamma distribution is the conjugate prior for the Poisson distribution.