
marginal distribution
Let $\displaystyle X \;and \; Y $be random variables. Suppose that the conditional distribution of $\displaystyle X \; given \; Y=y$ is binomial distribution with parameters $\displaystyle n \;and \; y.$ Assume that Y is a $\displaystyle continuous \; uniform\; (0,1) $distribution. Find the marginal distribution of X.
I think that:
since, $\displaystyle P(XY) = \dfrac{f(x,y)}{f_{Y}(y)}$
but $\displaystyle f_{Y}(y) = 1$
so, $\displaystyle f(x,y) = \text{Binomial}(n,y)$
is this correct? I am confused on finding the marginal pdf. Can anyone help?

Use the beta density.
The answer is a discrete uniform distribution over the set 0,1,2..., n, which makes sense.
The joint distribution is $\displaystyle f(x,y)={n\choose x}y^x(1y)^{nx} I(0\le y\le 1)$
Next integrate out the y to get the marginal of X and use the fact that
$\displaystyle \int_0^1 y^a(1y)^bdy={\Gamma (a+1)\Gamma(b+1)\over \Gamma(a+b+2)}$
since x and n are integers this reduces to 1/(n+1) which is correct on the set for x=0,1...,n.
Initially I tried the MGF where I conditioned on the Y, but the MGF of the uniform is worthless, so I went the direct route.

thiat was exactly how I did it! Thanks!!