$X$ is uniformly distributed on $[0,1]$ and $(Y|X =x) \sim \mathcal B(n,x)$. Find the p.d.f of $Y$

46 Views Asked by At

Good afternoon, I'm trying to find the p.d.f of $Y$ in the following exercise:

enter image description here

My attempt:

It follows from $(Y|X =x) \sim \mathcal B(n,x)$ that $f_{Y|X =x} (k) = {n \choose k} x^k (1-x)^{n-k}$. Then $$f_Y (k) = \sum_{x \in [0,1]} f_{Y|X =x} (k) \cdot f_X(x) = \int_0^1 {n \choose k}x^k (1-x)^{n-k} \, \mathrm{d}x$$

I'm stuck at computing this integral.

Could you please shed me some light on computing it? Thank you for your help!