Random Variables, Expectation and Variance
A random variable as a numeric function of an uncertain outcome, its expectation as the probability-weighted balance point of the distribution, and its variance as the weighted average squared deviation from that point, together with the linearity and scaling rules that govern how both behave under a linear transformation.
Definition
Outcomes and events. An experiment has a sample space
Random variables. A random variable
Expectation. For discrete
the average of the values weighted by their probabilities. It is a property of the distribution, not of any sample, and need not be an attainable value: a fair die has
Variance. The spread about the mean,
with standard deviation
Linear transformations. For constants
| Rule | Holds |
|---|---|
| always | |
| always, even if dependent | |
| always |
Expectation passes through a linear transformation unchanged. Variance ignores the shift
For a non-linear
Whether
Assumptions and scope
need not be a value can attain, and is a property of the distribution rather than of any observed sample. holds for linearonly. For any non-linear the two differ in general, and in the quadratic case the difference is exactly . describes the spread of a single observation of . The spread of an estimator computed from a sample is a different quantity, answering a different question, and is derived in the units on sampling distributions. Whether the variance of a sum is the sum of the variances is not settled by this unit: it depends on how the two variables move together.
Worked material
Example
A die, and a linear transformation
One distribution, worked completely, then put through the rules.
---
1. A fair die.
Expectation.
Variance, both ways. First by the definition, averaging squared deviations from 3.5:
Then by the shortcut, with
Both give
Note the deviations themselves sum to zero:
---
2. A linear transformation. Let
By the rules:
Verified directly by computing over
The
---
3. Where this is heading. The same two rules applied to an average,
Common errors
Common misconception
The expected value is the value to expect, a typical or most likely outcome, so