1. ## marginal distribution

Let $X \;and \; Y$be random variables. Suppose that the conditional distribution of $X \; given \; Y=y$ is binomial distribution with parameters $n \;and \; y.$ Assume that Y is a $continuous \; uniform\; (0,1)$distribution. Find the marginal distribution of X.

I think that:

since, $P(X|Y) = \dfrac{f(x,y)}{f_{Y}(y)}$

but $f_{Y}(y) = 1$

so, $f(x,y) = \text{Binomial}(n,y)$

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

2. 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 $f(x,y)={n\choose x}y^x(1-y)^{n-x} I(0\le y\le 1)$

Next integrate out the y to get the marginal of X and use the fact that

$\int_0^1 y^a(1-y)^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.

3. thiat was exactly how I did it! Thanks!!