Conditional Probability
Discrete Form
A discrete random variable $X$ is conditioned on an event $A$ ( $P(A) > 0$ ), then we may define the conditional PMF of $X$ as follows:
Apparently, $p_{X | A} \ge 0$ . And,
Since $\{X = x_i\} (i = 1, 2, 3, \cdots, N)$ is a partition of $\Omega$ , so,
Thus,
and $p_{X|A}(x)$ is a legitimate PMF.
PMF conditioned on another discrete r.v.
Now we consider the special case $A = \{Y = y\}$ , here $Y$ is another discrete random variable. We get
It is easy to get
When $X$ and $Y$ are independent, we have $P(X = x, Y = y) = P(X = x) P(Y = y),$ and vice versa. Thus we conclude that $X$ and $Y$ are independent if and only if $p_{X, Y}(x, y) = p_X(x) p_Y(y).$
Now let us delve into $p_{X|A}(x)$ by using total probability theorem. Given $B_i (i = 1, 2, \cdots, N)$ as a partition of $A$ , then,
using Morgan’s theorem, we get
<!-- $ $P(A) = \displaystyle\sum_{i = 1}^{N} P(A \cap B_i).$ $ -->
Finally, we get
As a special case, we let $A = \Omega$ , in which $B$ will be a partition of $\Omega$ , then
Continuous Form
A continuous random variable $X$ is conditioned on an event $A$ ( $P(A) > 0$ ), then the possibility that $X \in B$ is
We define conditional PDF of $X$ as $f_{X|A}(x)$ .
Then we get
So, $\forall B \sub \Omega$ , the following equation holds:
Let $B = (x, x + \delta)(\delta > 0)$ ,
Then we get
Since $P(A) \gt 0, \delta \gt 0$ and ${P(\{x \le X \le x + \delta\} \cap A)}$ is a valid probability, we know that $f_{X|A}(x) \ge 0.$
Let $B = (-\infin, +\infin)$ , we see that
\begin{split} &;P({x \le X \le x + \delta}|{y \le Y \le y + \epsilon})\ &= \frac{P({x \le X \le x + \delta} \cap {y \le Y \le y + \epsilon})}{P(y\le Y \le y + \epsilon)}.\ \end
\begin{split} P({x \le X \le x + \delta} | {Y = y}) &= \lim_{\epsilon \rightarrow 0^+} \frac{\int_x^{x + \delta} f_{X, Y}(x, y) \epsilon}{f_{Y}(y) \epsilon}\ &= \frac{\int_x^{x + \delta} f_{X, Y}(x, y)}{f_Y(y)}. \end
We write $X$ ’s PDF conditioned on $Y$ as
When $X$ and $Y$ are independent, we get
Then we devide both side by $\delta$ , and let $\delta \rightarrow 0^+.$
That is, when $X$ and $Y$ are independent,
It is easy to verify that when we have $f_{X, Y}(x, y) = f_X(x) f_Y(y)$ , $X$ and $Y$ are independent.
i.e., for any $\delta, \epsilon \ge 0$
Therefore, we can conclude that $X$ and $Y$ are independent if and only if $f_{X, Y}(x, y) = f_X(x) f_Y(y).$