1
$\begingroup$

$$Y|X\sim Bin(X,n)$$ $$X\sim U([0,1])$$

How can I find the PDF of Y?

I know that:

$$\Bbb P(Y=k)=E_X[\Bbb P(Y=k)|X]$$

$\endgroup$
  • 2
    $\begingroup$ Is this a question from a course or textbook? If so, please add the [self-study] tag & read its wiki. $\endgroup$ – Stephan Kolassa Jun 17 at 12:37
  • 1
    $\begingroup$ Hint: this is a compound distribution, which is sometimes also called a mixture distribution. $\endgroup$ – Stephan Kolassa Jun 17 at 12:38
  • $\begingroup$ @Xi'an, Did you just give a curt "Wrong" to someone for omitting a notational convention? Great way to welcome a new user. While we're at it--you're wrong. The correct answer is actually $$ P(Y = k) = \mathbb{E}_X [P(Y=k|X)] $$ $\endgroup$ – Do not reinstate Monica Jun 17 at 12:39
  • 1
    $\begingroup$ hint: beta-binomial distribution $\endgroup$ – Christoph Hanck Jun 17 at 13:51
1
$\begingroup$

$$p(y=k) = \int_0^1 p(y=k|x)p(x)dx = \binom ny \int_0^1 x^y (1-x)^{n-y} dx.$$

Since $y$ and $n$ are integers, we know via standard properties of the Beta function that $B(\alpha, \gamma) = \int_0^1 t^{\alpha-1} (1-t)^{\gamma-1} dt = \frac{\alpha!\gamma!}{(\alpha+\gamma-1)!}$. Then by letting $\alpha = y + 1$ and $\gamma = n-y+1$ we deduce that

$$ \binom ny \int_0^1 x^y (1-x)^{n-y} dx = \binom ny B(\alpha, \gamma) = \binom nyB(y + 1, n-y+1) = \frac{n!}{y!(n-y)!}\frac{y!(n-y)!}{(n+1)!} = \frac{1}{n+1},$$

so in total the marginal distribution is

$$p(y=k) = \frac{1}{n+1},$$ a uniform distribution over the (n+1) outcomes, interestingly enough.

| cite | improve this answer | |
$\endgroup$
  • 3
    $\begingroup$ +1 (though we prefer to give hints and not full solutions to self-study questions). See also here. $\endgroup$ – Stephan Kolassa Jun 17 at 13:06
  • $\begingroup$ why is it $$\binom ny$$ and not $$\binom Xk$$ $\endgroup$ – MC1325 Jun 17 at 13:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.