4.3 Computing Probabilities by Condition

Let \(E\) denote an arbitrary event and define an indicator random variable \(X\) by \[X= \begin {cases} 1, &\text {if event}\hspace {0.3cm} E\hspace {0.3cm} \text {occurs}\\\\ 0, &\text {if event}\hspace {0.3cm} E\hspace {0.3cm} \text {does not occur}\\ \end {cases} \] \[\text {Then}\hspace {0.3cm} E(X)= 1.P(E)+0.P(E^c)=P(E)\] Let \(Y\) be any random variable then \[E(X \mid Y=y)=P(E \mid Y=y)\] \[E(X)=E(E(X \mid Y=y))= \begin {cases} \sum \limits _{y}P(E \mid Y=y)P(Y=y), &\text {if Y is discrete}\\\\ \int \limits _{y}P(E \mid Y=y)f_Y(y), &\text {if Y is continuous}.\\ \end {cases} \]

Remark. If \(Y\) is discrete taking values \(y_1, y_2,........ ,y_k\) then if we define events \(A_1, A_2,........, A_k\) by \(A_i=\{Y=y_i\},\hspace {0.4cm} i=1,2,......., k\). \begin {align*} E(X)=P(E) &=\sum ^k_{i=1}P(E \mid Y=y_i)P(Y=y_i)\\ &=\sum ^k_{i=1}P(E \mid A_i)P(A_i)\\\\ P(E) &=\sum ^k_{i=1}P(E \mid A_i)P(A_i).\hspace {0.5cm} \text {Total probability}.\\ \end {align*}

Example 4.3.1. Let \(X\) be a uniform random variable on \((0,1)\) and suppose the conditional distribution of \(Y\) given \(X=P\) is binomial with parameters \(n\) and \(P\). Find the probability distribution of \(Y\).
\[f(x)=1,\hspace {0.5cm}x\in (0,1)\] \[f_{Y/X}(y/P)= \begin {pmatrix} n\\y\\ \end {pmatrix} P^y(1-P)^{n-y};\hspace {0.5cm} y=0,1, ......., n \]

\begin {align*} f_{X/Y}(x,y) &=f_{Y/X}(y/P)f_X(x)\\ &= \begin {pmatrix} n\\y\\ \end {pmatrix} P^y(1-P)^{n-y}.1,\hspace {0.5cm} y=0,1,2,........, n,\hspace {0.5cm} x\in (0,1).\\ \end {align*}

\begin {align*} \therefore \hspace {0.5cm} f_Y(y) &=\int ^1_0 \begin {pmatrix} n\\y\\ \end {pmatrix} P^y(1-P)^{n-y}dx,\hspace {0.5cm} \text {but}\hspace {0.3cm} X=P\\ &=\int ^1_0 \begin {pmatrix} n\\y\\ \end {pmatrix} P^y(1-P)^{n-y}dP\\ &= \begin {pmatrix} n\\y\\ \end {pmatrix} \int ^1_0P^y(1-P)^{n-y}dP\\ &= \begin {pmatrix} n\\y\\ \end {pmatrix} \beta (y+1,n-y+1)\\ &=\frac {n!}{(n-y)!y!}\hspace {0.2cm}\frac {\Gamma (y+1)\Gamma (n-y+1)}{\Gamma (n+2)}\\ &=\frac {n!}{(n-y)!y!}\hspace {0.2cm} \frac {y!(n-y)!}{(n+1)!}\\ &=\frac {1}{n+1} \end {align*}

\[\therefore \hspace {0.5cm} f_Y(y)=\frac {1}{n+1},\hspace {0.5cm} Y=0,1,2, ........, n\] \[\text {Discrete Uniform}\]

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.