UP | HOME

Law of the unconscious statistician

1 Statement

In the discrete case, for random variables \(Y\) and \(X\) and function \(g\), let \(Y=g(X)\). Then, \(\mathbb{E}[Y] = \sum_x g(x)f_X(x)\), where \(f_X(x)\) is the probability mass function of \(X\).

2 Proof for discrete case

\[\begin{align*} \mathbb{E}[Y] &= \sum_y y f_Y(y)\\ &= \sum_y y \sum_{x: g(x) = y} f_X(x)\\ &= \sum_y \sum_{x: g(x) = y} g(x) f_X(x)\\ &= \sum_x g(x) f_X(x) \end{align*}\]