Total variance
Overall variance includes spread inside each case and differences between case means.
On this page 7 sections
01Variability within and between cases#
Overall variance includes spread inside each case and differences between case means. The law of total variance accounts for both:
The first term is the probability-weighted average of conditional variances. The second treats the conditional means as values of a new random variable and computes their variance.
02Compute both parts#
Suppose cases are equally likely, have means , and variances . The within-case term is . The overall mean is .
The case means deviate from by and , so the between-case variance is . Adding gives total variance . Averaging the conditional variances alone would miss half the variability.
Two equally likely cases have means 0,4 and variances 1,3. Find total variance.
Show answer and explanation
Within variance is 2; means have overall center 2 and variance 4.
03Split a deviation at its group mean#
Write as the sum of and . The first piece fluctuates within a case; the second shifts the case mean relative to the overall mean.
After squaring, the cross term has expectation zero: within each case, the first piece averages to zero. The two remaining squared terms produce the stated decomposition. Finite variances are assumed.
A draft averages conditional variances and calls the result total variance, despite different case means. What is missing?
Show answer and explanation
The omitted term measures between-case variability.
If case means coincide, the between-case term is zero. If each case is internally constant, the within-case term is zero, yet the overall variance can remain positive. This distinction is useful when interpreting heterogeneous datasets.
Decompose variance into within-case and between-case components.
- Decompose variance into within-case and between-case components.
Sources & further reading
- [1]Dive into Deep Learning, §2.6 Probability and Statistics ↗d2l.ai · Article
- [2]Harvard Stat 110, Strategic Practice 10 (2011) ↗stat110.hsites.harvard.edu · Article
- [3]Harvard Stat 110, Strategic Practice and Homework 9 (2011) ↗stat110.hsites.harvard.edu · Article