I'm stuck with a question regarding conditional expectation.
If $X$ denotes the number of successes in n independent Bernoulli trials. Where the success probability is unknown and modelled by the random variable $Y$, $X | Y = y ~bin(n,y)$ and $Y$ is assumed uniformly distributed on $(0,1)$.
1) How do I use the conditional distribution $X|Y=y$ to find the expectation and the variance of $X$?
I know I somehow have yo use $E(X)= E(E(X|Y))$ and $Var(X)=E(Var(X|Y))+Var(E(X|Y))$, but I'm not sure where to start. Could someone give me a helping hand?