Let $Y$ be uniform on $(0,1)$ and $X|Y=y$ be binomial with paremeters $(n,y)$. Im looking to find $P(X=0)$
What i tried: well, we given that
$$ p(X|Y=y) = { n \choose x } y^x (1-y)^{n-y} $$
Now we know $E(X) = E (E(X|Y))=E(ny) = \frac{n}{2} $
Since $Y$ uniform so mean is $\frac{1}{2}$. Now we also know that
$$ \sum x P(X=x) =\frac{n}{2} $$
But here I get stuck since the requird probability we want gets multiplied by zero on left hand side. Now, am I approaching this problem correctly?
$\begin{split}\mathsf P(X=x)&=\int_0^1 \mathsf P(X=x\mid Y=y)f_Y(y)\mathsf d y\\ &= \binom nx \int_0^1 y^x(1-y)^{n-x}\mathsf d y\\\mathsf P(X=0)&= \binom n0\int_0^1(1-y)^n\mathsf d y\\ &= \ldots\end{split}$