Expectation and Variance for Continuous RVs
Why Expectation and Variance?
A distribution contains complete information about a random variable, but it is often too much information. We need summary statistics: a single number for the "center" of the distribution (expectation) and a single number for the "spread" (variance). These two numbers, together with the distribution family, often suffice for engineering design.
Definition: Expectation of a Continuous Random Variable
Expectation of a Continuous Random Variable
Let be a continuous RV with PDF . The expectation (or mean) of is
provided the integral converges absolutely: .
The Cauchy distribution is the canonical example of a distribution whose expectation does not exist: .
Theorem: Law of the Unconscious Statistician (LOTUS)
Let be a continuous RV with PDF and let be a Borel-measurable function. Then
provided the integral converges absolutely.
We do not need to find the distribution of to compute . We can integrate directly against the density of . This "unconscious" application of the original density is enormously useful in practice.
Key idea
Consider the induced probability measure . Then by the definition of integration with respect to a measure.
Definition: Variance of a Continuous Random Variable
Variance of a Continuous Random Variable
The variance of a continuous RV with finite second moment is
The standard deviation is .
The identity is the computational workhorse β it is almost always easier to compute and separately than to compute directly.
Theorem: Tail Integration Formula for Expectation
Let be a non-negative continuous RV. Then
More generally, if takes values in :
Instead of integrating , we integrate the survival function . This is often much easier when the CDF has a simple closed form but the PDF does not (or when we only know tail bounds).
Exchange order of integration (Tonelli)
For :
By Tonelli's theorem (both integrands are non-negative), we swap the integrals:
Example: Expectation of the Exponential Distribution via Tail Integration
Let . Use the tail integration formula to compute .
Survival function
for .
Apply the formula
Compare with direct computation
Direct integration gives (integration by parts). The tail formula avoids the integration by parts entirely.
Example: Variance of the Uniform Distribution
Compute for .
Compute $\mathbb{E}[X]$
Compute $\mathbb{E}[X^2]$
Variance
Theorem: Linearity and Scaling of Variance
For any random variable with finite variance and constants :
In particular, adding a constant does not change the variance, and scaling by multiplies the variance by .
Direct computation
Let . Then , so
Common Mistake: Variance Is Not Linear
Mistake:
Writing .
Correction:
, so . Variance scales with the square of the constant. Standard deviation scales linearly.
Quick Check
For , what is ?
By the tail integration formula, .
LOTUS (Law of the Unconscious Statistician)
The identity , which allows computing the expectation of a function of without first deriving the distribution of .
Related: Probability Density Function (PDF)
Variance
: the expected squared deviation from the mean. Measures the spread of a distribution.
Key Takeaway
The tail integration formula for non-negative RVs is one of the most useful tricks in probability. It converts an expectation computation into an integral of the survival function, which is often simpler β especially when only tail bounds are available.