Expectation of Functions of Random Variables
You'll learn: How to calculate the expected value of a transformed random variable without first finding its distribution.
The Core Idea
Suppose you have a random variable X with a known PMF (discrete) or PDF (continuous), and you want to find the expected value of some function g(X) — maybe X², eˣ, or √X.
The naive approach would be to:
- Find the distribution of the new random variable Y = g(X)
- Calculate E[Y] from this new distribution
But there's a shortcut! The Law of the Unconscious Statistician (LOTUS) lets you calculate E[g(X)] directly using X's distribution, without ever finding g(X)'s distribution.
How It Works
For discrete X:
For continuous X:
You simply weight each transformed value g(x) by the original probability/density at x.
Why "Unconscious"?
The name is tongue-in-cheek: you're computing an expectation "as if" you forgot that g(X) is itself a random variable, treating it instead as just a function applied to X's values.
Example
If X is the roll of a fair die and g(X) = X², then:
No need to find the PMF of X² first!
Key Takeaway: LOTUS lets you calculate E[g(X)] by applying g directly within the expectation formula using X's original distribution—a powerful computational shortcut.