0
$\begingroup$

$n\in \Bbb N$. Let $X_1 \sim \text{Uni}_{(0,1)}$ and $X_2 \sim \text{Bin}_{n, X_1}$ conditional on $X_1$. I want to find the distribution function of the law of $X_1$ given $X_2 = k$, i.e. $\Bbb P (X_1 \leq t \ \vert \ X_2 = k )$, where $k\in \{1, \ldots , n\}$.

$\endgroup$
2
  • $\begingroup$ Use the definition of conditional probability. $\endgroup$
    – Michael
    May 17, 2019 at 14:18
  • $\begingroup$ Just use the Law of Total Probability, and Bayes' Theorem. $\endgroup$ May 17, 2019 at 14:18

1 Answer 1

2
$\begingroup$

We compute \begin{align*} &\mathbb{P}(X_1\in(p,p+\mathrm{d}p), X_2=k)\\ &=\mathbb{P}[X_1\in(p,p+\mathrm{d}p)]\mathbb{P}[X_2=k\mid X_1\in(p,p+\mathrm{d}p)]\\ &=\binom{n}{k}p^k(1-p)^{n-k}\mathrm{d}p \end{align*} so $X_1\mid X_2$ is a $\operatorname{Beta}(X_2+1,n-X_2+1)$-distributed random variable.

Since Uniform(0,1) is another name for $\operatorname{Beta}(1,1)$, this example is a special case of a conjugate prior.

$\endgroup$
3
  • $\begingroup$ I am not really d'accord with your notation $\in (p, p + \text d p)$ but all in all this helped me to complete my task. $\endgroup$
    – Falrach
    May 17, 2019 at 14:42
  • 1
    $\begingroup$ Yeah, it is not the best notation, but at least this avoids conditioning on null event $X_1=p$. $\endgroup$ May 17, 2019 at 14:45
  • $\begingroup$ Ah, it is another notation for the densities. $\endgroup$
    – Falrach
    May 17, 2019 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .