27 Conditional Probability Distributions
Recall that for any two events \(E\) and \(F\), the conditional probability of \(E\) given \(F\) is defined, as long as \(P(F) > 0\), by \[P(E|F) = \frac{P(E \cap F)}{P(F)}\] ## Discrete Case If \(X\) and \(Y\) are discrete random variables, then it is natural to define the conditional probability mass function of \(X\) given that \(Y = y\), by \[\begin{align}p_{X|Y}(x|y) &= P\{X=x | Y=y\} \\ &= \frac{P\{X=x , Y=y\}}{P\{Y=y\}} \\ &= \frac{p(x,y)}{p_Y(y)}\end{align}\] for all values of \(y\) such that \(P\{Y = y\} > 0\). Similarly, the conditional probability cumulative distribution function of \(X\) given that \(Y = y\) is defined, for all y such that \(P\{Y = y\} > 0\), by \[\begin{align}F_{X|Y}(x|y) &= P\{X\le x | Y=y\} \\ &= \sum_{a\le x}p_{X|Y}(a|y)\end{align}\] The conditional expectation of X given that Y = y is defined by \[\text E[X|Y=y] = \sum_{x}x\times p_{X|Y}(x|y)\] Example: Suppose that \(p(x, y)\), the joint probability mass function of \(X\) and \(Y\), is given by \[p(1,1) = 0.5,\quad p(1,2) = 0.1,\quad p(2,1) = 0.1,\quad p(2,2) = 0.3\] Calculate the conditional probability mass function of \(X\) given that \(Y = 1\).
Solution: Note that \[p_Y(1) = p(1,1) + p(2,1) = 0.6\] Hence \[\begin{align}p_{X|Y}(1|1) &= \frac{p(1,1)}{p_Y(1)} = \frac{5}{6} \\ p_{X|Y}(2|1) &= \frac{p(2,1)}{p_Y(1)} = \frac{1}{6}\end{align}\] ## Continuous Case If \(X\) and \(Y\) have a joint probability density function \(f(x, y)\), then the conditional probability density function of \(X\), given that \(Y = y\), is defined for all values of \(y\) such that \(f_Y(y)>0\),by \[f_{X|Y}(x|y) = \frac{f(x,y)}{f_Y(y)}\] The conditional expectation of \(X\), given that \(Y = y\), is defined for all values of \(y\) where \(f_Y(y) > 0\) by \[\text E[X|Y=y] = \int_{-\infty}^\infty x\times f_{X|Y}(x|y)dx\] Example: The joint density of \(X\) and \(Y\) is given by \[f(x,y) = \frac{1}{2}ye^{-xy}, \qquad 0 < x < \infty, 0 < y < 2\] and \(f(x,y) = 0\) otherwise. Compute \(E[e^{X/2}|Y = 1]\).
Solution: The conditional density of \(X\), given that \(Y = 1\), is given by \[\begin{align}f_{X|Y}(x|1) &= \frac{f(x,1)}{f_Y(y)} \\ &= \frac{\frac{1}{2}e^{-x}}{\int_{0}^\infty \frac{1}{2}e^{-x}dx} = e^{-x}\end{align}\] Hence \[\text E[e^{X/2}|Y=1] = \int_{0}^\infty e^{x/2}f_{X|Y}(x|1) dx = \int_0^\infty e^{x/2}e^{-x}dx = 2\]
Proposition: If \(X\) is independent of \(Y\), then the conditional mass/density function, cumulative distribution, and expectation are the same as the unconditional ones.