Law of the unconscious statistician 2026-10-14
The law of the unconscious statistician computes the expected value of a measurable function of a random variable directly from the original probability distribution. If is an integrable random variable, thenUse for a probability mass function, or for a probability density function. There is no need to derive the probability distribution of first. The identity is the integration rule for a pushforward measure, and also holds with an infinite value when is nonnegative. [ref]
https://ocw.mit.edu/courses/res-6-012-introduction-to-probability-spring-2018/pages/part-i-the-fundamentals/. Tsitsiklis, Introduction to Probability, Lecture 5: the expected value rule
.For taking with probabilities , choosing gives . Its variance is therefore . Squaring the expected value would instead give , because squaring does not commute with averaging.
Linearity of expectation Created 2026-09-24 Updated 2026-10-14
For integrable random variables on the same probability space and fixed real numbers , linearity of expectation statesThe random variables can be dependent random variables. The formula follows by the linearity of integration; a finite linear combination of integrable random variables remains integrable. For example, if takes with probabilities , then and are dependent random variables, yet .
An especially useful application counts how many events occur. Put , an indicator random variable, and . Since , we get . There is no need to compute the whole probability distribution of , or to assume independence. For a uniform random permutation of objects, each object stays fixed with probability , so the fixed point count of a uniform random permutation has expected value one for every . [ref]
https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-spring-2015/mit6_042js15_textbook.pdf. Lehman, Leighton and Meyer, Mathematics for Computer Science, §18.5: linearity and sums of indicators
.Linearity of expectation concerns addition and multiplication by fixed scalars. Products instead satisfy under the hypotheses of expectation of a product of independent random variables. For the example above, , whereas . Applying a nonlinear function before averaging can therefore change the answer substantially; use the law of the unconscious statistician to compute that average.