Let be random variables. Suppose that the conditional distribution of is binomial distribution with parameters Assume that Y is a distribution. Find the marginal distribution of X.

I think that:

since,

but

so,

is this correct? I am confused on finding the marginal pdf. Can anyone help?