Quant GT
Browse all lessons
Section 9 · Lesson 9.1

Law of the Unconscious Statistician

Computing expectations of functions of random variables.

The Law of the Unconscious Statistician (LOTUS) says you don't need to find the distribution of g(X)g(X) to compute its expectation. You can integrate gg against the density of XX directly:

E[g(X)]=g(x)fX(x)dx(continuous)E[g(X)] = \int g(x)\, f_X(x)\, dx \quad \text{(continuous)} E[g(X)]=xg(x)P(X=x)(discrete)E[g(X)] = \sum_x g(x)\, P(X = x) \quad \text{(discrete)}

The "unconscious" name comes from the fact that many students apply this without realizing it requires proof — the formula uses XX's density, not g(X)g(X)'s. The proof goes through a change of variables and verifies the formula gives the right answer.

LOTUS saves an enormous amount of effort. To compute E[X2]E[X^2], you don't need to first find the distribution of X2X^2; just integrate x2fX(x)x^2 f_X(x). To compute E[sinX]E[\sin X] for a Normal XX, you don't need to find the distribution of sinX\sin X; just integrate sin(x)\sin(x) against the Normal density.