LOTUS: Law of the Unconscious Statistician
When computing E[g(X)], you might think we need the distribution of Y=g(X) first. LOTUS says no: we can compute directly using the distribution of X.
Statement: For a discrete random variable X:
E[g(X)]=∑xg(x)⋅p(x)
For a continuous random variable X:
E[g(X)]=∫−∞∞g(x)f(x)dx
Why “unconscious”? Many people apply this “unconsciously” without realising it’s a theorem requiring proof.
Proof (Discrete Case)
Let Y=g(X). By definition:
E[Y]=∑yy⋅P(Y=y)=∑yy⋅P(g(X)=y)
But P(g(X)=y)=∑x:g(x)=yp(x). So:
E[Y]=∑yy∑x:g(x)=yp(x)=∑y∑x:g(x)=yy⋅p(x)=∑y∑x:g(x)=yg(x)⋅p(x)
Each x appears exactly once (grouped by the value g(x)), giving:
E[Y]=∑xg(x)⋅p(x)
Why LOTUS Matters
Instead of finding the PMF/PDF of Y=g(X), we compute directly. This is often much easier.
Example: Squared Die
X = fair die roll. Find E[X2].
Without LOTUS: Find distribution of X2 (values {1,4,9,16,25,36}), then compute expectation.
With LOTUS:
E[X2]=∑i=16i2⋅61=61+4+9+16+25+36=691
Moments
nth Moment
The nth moment of X is:
E[Xn]=∑xxn⋅p(x)
The first moment is the expectation: E[X].
Central Moments
The nth central moment is:
E[(X−E[X])n]
The second central moment is the variance.
Common Functions
Linear Function
E[aX+b]=aE[X]+b
This follows from linearity, not specifically LOTUS.
Positive Powers
E[Xn]=∑xxnp(x)
Used for computing variance and higher moments.
Absolute Value
E[∣X∣]=∑x∣x∣p(x)
The expectation of ∣X∣ is called the mean absolute deviation from zero.
Example: E[2X]
If X ~ Binomial(n, p), find E[2X].
By LOTUS:
E[2X]=∑k=0n2k(kn)pk(1−p)n−k=∑k=0n(kn)(2p)k(1−p)n−k
This is the binomial expansion of (2p+(1−p))n=(1+p)n.
E[2X]=(1+p)n
Probability Generating Functions
For a non-negative integer-valued random variable X, the probability generating function is:
GX(t)=E[tX]=∑k=0∞tkP(X=k)
This is LOTUS with g(x)=tx.
Key property: P(X=k)=k!GX(k)(0) (the kth derivative at 0).
Variance via LOTUS
Var(X)=E[X2]−E[X]2
LOTUS computes E[X2] directly.
For a fair die:
Var(X)=E[X2]−E[X]2=691−(27)2=691−449=12182−147=1235
Summary
| Concept | Formula |
|---|
| LOTUS (discrete) | E[g(X)]=∑xg(x)p(x) |
| LOTUS (continuous) | E[g(X)]=∫g(x)f(x)dx |
| nth moment | E[Xn] |
| nth central moment | E[(X−E[X])n] |
| PGF | G(t)=E[tX] |