Independence of two random variables, \(X\) and \(Y\), arises when all events about \(X\) are independent of all events about \(Y\). For discrete random variables, this is equivalent to the following:

Independence

Two discrete random variables, X, and Y, are independent if and only if

\[ p(x, y) \;\;=\;\; p_X(x) \times p_Y(y) \qquad \text{ for all } x \text{ and } y \]

If \(X\) and \(Y\) are independent, then

\[ p_{X\mid Y=y}(x) \;\;=\;\; \frac {p(x,y)}{p_Y(y)} \;\;=\;\; \frac {p_X(x)p_Y(y)}{p_Y(y)} \;\;=\;\; p_X(x) \]

so the conditional distribution of \(X\) does not depend on the value of \(y\).

In a similar way, if \(X\) and \(Y\) are independent, then

\[ p_{Y\mid X=x}(y) \;\;=\;\; p_Y(y) \]