2 Random variables that are connected to one another

43 Views Asked by At

Let $A$ be a random variable distributed uniformly on $(0,1)$. Given $A=a$ , the random variable $B$ is binomial with: $B \sim \text{Bin}(n=5, p=a)$

(1) Find the PDF of $A$ given $B=b$.

$f_{A | B=b}(k) = \binom{5}{k} x^k \cdot (1-x)^{5-k}$ ?

Now, I completely do not understand how to do it as the $\text{PDF}$ of a continuous uniform variable is $0$ no? So it does not make a click in my brain... Thank you for helping!

1

There are 1 best solutions below

1
On

When $\ A=a\ $, $\ B\ $ is binomially distributed with parameters $\ n=5\ $ and $\ p=a\ $. Therefore \begin{align} P(B=b\,|A=a)&={5\choose b}a^b(1-a)^{5-b}\ ,\\ P(B=b, A\le y)&=\int_{\{a\le y\}}P(B=b\,|A=a)\rho_A(a)da\\ &=\cases{\displaystyle 0&if $\ y<0$\\ \displaystyle\int_0^y {5\choose b}a^b(1-a)^{5-b}da&if $\ 0\le y\le1$\\ P(B=b)&if $\ 1<y\ $,} \end{align} Where $\ \phi_A\ $ is the density function of $\ A\ $, and \begin{align} P(B=b)&=\int_0^1 {5\choose b}a^b(1-a)^{5-b}da\\ &= {5\choose b} {\cal B}(b+1,6-b)\ , \end{align} where $\ \cal B\ $ is the Euler beta function. Therefore \begin{align} P(A\le y\,| B=b)&=\frac{P(B=b, A<y)}{P(B=b)}\\ &=\cases{0& if $\ y<0$\\ \displaystyle\frac{\displaystyle\int_0^ya^b(1-a)^{5-b}da}{\cal B(b+1,6-b)}& if $\ 0\le y\le1\ $\\ 1& if $\ 1<y$\ , } \end{align} which is the conditional cumulative distribution function of $\ A\ $ given $\ B=b\ $. To get the conditional density function, $\ f_{A|B=b}\ $, of $\ A\ $ given $\ B=b\ $ you merely have to differentiate this with respect to $\ y\ $: \begin{align} f_{A|B=b}(y)=\cases{0& if $\ y<0\ $ or $\ 1<y$\\ \displaystyle\frac{y^b(1-y)^{5-b}}{\cal B(b+1,6-b)}&if $\ 0\le y\le1$ .} \end{align} Answer to query from OP:

I have now inserted a step which I had originally omitted from the derivation. This should make it clearer, if you keep in mind that:

  • $\ \rho_A(a)= 1\ $ when $\ 0\le a\le 1\ $ and $\ \rho_A(a)= 0\ $ otherwise,
  • $\ P(A\le y)=0\ $ whenever $\ y<0\ $, and
  • $\ P(A\le y)=1\ $ whenever $\ y>1\ $ .

Thus, when $\ 0\le y\le 1\ $ then $\ \ \displaystyle\int_{\{a\le y\}}P(B=b\,|A=a)\rho_A(a)da= \int_0^yP(B=b\,|A=a)da\ $ because $\ \rho_A(a)=0\ $ for $\ a<0\ $, and $\ \rho_A(a)=1\ $ for $\ 0\le a\le y\ $.

If $\ y<0\ $, then the event $\ \{B=b\}\wedge\{A\le y\}\ $ has probability $\ 0\ $ because $\ \{A\le y\}\ $ has probability $\ 0\ $, while if $\ 1<y\ $ , then the event $\ \{B=b\}\wedge\{A\le y\}\ $ has the same probability as the event $\ \{B=b\}\ $ because the event $\ \{A\le y\}\ $ has probability $\ 1\ $.