The Tower Property and Conditional Variance
Suppose an insurance company insures drivers of wildly different risk profiles. It only observes the accident count of each driver, not their hidden risk class. How can the company predict overall claims variability? It must work from what it knows about each class separately. The tower property and the law of total variance answer this exact kind of question. They let us build the mean and variance of a complicated random variable out of simpler pieces. This is done by conditioning on some auxiliary information. This matters because almost no real random variable lives in isolation. Most quantities we care about — insurance claims, stock returns, exam scores, particle counts — are naturally mixtures over some underlying category, group, or state. The tower property (law of total expectation) says that averaging a conditional average recovers the overall average. The law of total variance goes further. It splits total variability into a within-group piece and a between-group piece. This is exactly the logic behind analysis of variance, random-effects models, and the Rao–Blackwell idea in statistics. The big picture is that Conditional Expectation is not just a number attached to an event. It is itself a random variable — a function of the conditioning variable. This random object obeys its own calculus. Iterating expectations and variances through this random object matters greatly. It is what makes multi-stage random experiments tractable. These include random sums, hierarchical models, and branching processes. This works without ever writing down the full joint density. This article states and proves both laws with complete rigor. It works two asymmetric numerical examples: a random sum and a two-stage sampling model. It shows exactly what breaks when the underlying conditional expectation fails to exist. It also points toward the Bivariate Normal Distribution. There, these tools reappear to compute conditional means and variances in closed form.
- : averaging a conditional average gives the unconditional average.
- : total variance splits into within-group and between-group parts.
- Both laws hold whenever (variance version) or just (mean version).
- The proof uses the defining property of conditional expectation as a projection, applied twice — hence "tower."
- Random sums, hierarchical/random-effects models, and Rao–Blackwellization are direct applications.
- Key idea: conditioning creates a random variable , and iterating expectation/variance through it recovers exact global moments from local, conditional ones.
Where this lives today
The tower property is the engine behind martingale theory: a process is a martingale exactly when , and the nested tower property is what lets us conclude for all by repeated conditioning. In Bayesian statistics, the posterior mean and variance of a parameter are computed by exactly this machinery: the prior predictive variance of data decomposes into "variance given the parameter" (sampling noise) plus "variance of the conditional mean" (parameter uncertainty), which is the statistical content of Example 2 above. The Rao–Blackwell theorem in mathematical statistics uses the total variance law directly: if is a sufficient statistic and an unbiased estimator, then has variance , because the total variance law forces with the second term nonnegative. In actuarial science and queueing theory, compound (random-sum) distributions — as in Example 1 — are the standard model for aggregate claims or workload, and the tower/total-variance formulas give the mean and variance of the aggregate without ever computing its full distribution. In machine learning, the bias-variance-type decompositions used to analyze prediction error (e.g., in random-effects or Bayesian model averaging) are direct descendants of the total variance law. In statistical genetics, the partition of phenotypic variance into genetic and environmental components (Fisher's variance components) is again a total-variance-law computation, conditioning on genotype. Finally, this machinery is the direct stepping stone to computing conditional means and variances in the Bivariate Normal Distribution, where turns out to be an exact linear function of and is a constant (not random) — a strikingly special structural fact that simplifies the total variance law even further, foreshadowing the role of correlation in that setting. The underlying formalism also connects to Markov Chains, where the tower property with respect to the natural filtration encodes the Markov property itself.
:::quiz[If and are independent random variables with , what is ?]
- ✓
- Undefined without more information
:::quiz[In the law of total variance , which minimal hypothesis is required?]
- and must be independent
- ✓
- must be discrete
- and must be jointly normal
:::quiz[In the random-sum example ( Geometric(), Exponential()), what is ?]
- ✓
:::faq[Is a number or a random variable?] It is a random variable — specifically, a function of , often written where . Its randomness comes entirely through : once 's value is revealed, becomes the fixed number . This is a common early confusion: (a number, for each fixed ) and (a random variable, a function of the random ) are related but distinct objects. The tower property and total variance law are statements about the random variable , since we take its expectation or variance over the randomness of .
:::faq[Why does the proof of total variance need the "orthogonality" of the residual ?] Variance does not decompose additively for an arbitrary sum unless and are uncorrelated: in general . The whole proof hinges on showing the cross term , which follows from the defining property of conditional expectation (specifically, , proved via "taking out what is known"). Without this orthogonality — which is a genuinely special feature of the conditional-expectation residual, not true for arbitrary decompositions — the total variance law would need an extra covariance correction term.
Ask the tutor: How does the law of total variance simplify when and are jointly normal, and why does become a constant?
Let be a probability space and let be random variables on it with .
Conditional expectation. The conditional expectation of given , written , is (a.s. unique) a random variable of the form for some measurable , satisfying
Equivalently, is the a.s.-unique -measurable random variable satisfying
When has a joint density , this reduces to where .
Tower property (law of total expectation). For ,
More generally, for a sub--algebra ,
Conditional variance. Assuming , define
This is a random variable, a function of , and is nonnegative a.s.
Law of total variance. For ,
Intuition
Think of as labeling a group or a "state of the world," and as the average of within that group. The tower property says: if you average those within-group averages, weighting by how likely each group is, you get back the overall average — no information is lost or double-counted, because the within-group averages are computed with respect to the same underlying probability measure restricted to each group. The law of total variance is the variance analogue, but it is subtler because variance does not simply average like expectation does. Total spread in has two independent sources: (1) how spread out is inside each group — this is , and we average this over groups since we don't know which group we're in — and (2) how much the group means themselves differ from each other — this is . Even if every group has zero internal spread (each group is a point mass), the group means can differ, contributing all the variance; conversely if all group means coincide, the total variance is entirely within-group. The formula shows these two sources add, with no cross term, because of an orthogonality property of conditional expectation (proved below).
Let be a random variable on and let be another random variable (or random vector) on the same space.
(A) Tower property. If , then exists (a.s. unique up to null sets), is integrable, and
More generally, if are sub--algebras of , then
(B) Law of total variance. If , then and are well defined (with a.s.), , and
We give a complete proof using only the defining property of conditional expectation and standard orthogonality; this is the standard "projection" technique, and it is not circular since it uses no consequence of the theorem being proved.
Part (A), tower property with . By definition, is the a.s.-unique -measurable random variable such that
Take . Since , (1) gives
This proves the basic tower identity. Integrability of (needed for the expectation on the left to make sense) is part of the standard existence theorem for conditional expectation (via the Radon–Nikodym theorem applied to the signed measure on , which is absolutely continuous with respect to since ); we take this existence as given, per the prerequisite Conditional Expectation.
Part (A), general nested -algebras. Let . We must show
Write ; this is the unique (a.s.) -measurable random variable such that
We show the left side of (2), call it , satisfies the same defining property, hence equals a.s. by uniqueness. First, is -measurable by construction (it is a conditional expectation given ). Second, for any , since we have as well, so by the defining property of applied to the random variable ,
where the last equality uses the defining property of with the set . This matches (3) exactly, so by a.s.-uniqueness of conditional expectation, a.s., proving (2). Setting (the trivial -algebra) and recovers the basic tower identity, since is a constant.
Part (B), law of total variance. Assume . First we check is well defined and square-integrable, so that makes sense. Conditional expectation is, in , the orthogonal projection onto the closed subspace of -measurable square-integrable random variables. A defining property of orthogonal projection in a Hilbert space is that it does not increase norm:
so . (This inequality also follows directly from Jensen's inequality for conditional expectation: a.s., then take expectations and apply the tower property to the right side.) Now define the residual . We claim and are uncorrelated, and moreover
Indeed, by linearity of conditional expectation,
using that is -measurable, so conditioning it again on leaves it unchanged (this is the "idempotent projection" fact, itself an instance of the nested tower property (2) with , or directly from the defining identity: if is -measurable then a.s., since itself satisfies the defining property (1) trivially). By (4) and the tower property applied to the product : since is -measurable, we may pull it out of the conditional expectation ("taking out what is known"),
Taking expectations of both sides and applying the tower property (Part A),
Also, from (4) and the tower property,
Now decompose and compute the variance using . First,
By (5) the cross term vanishes, so
Also by (6) and the tower property, so
Subtracting (8) from (7),
It remains to identify with . By definition,
Taking expectations and using the tower property once more,
Combining (9) and (10) gives exactly
as claimed. Nonnegativity of a.s. follows since it is (a.s.) the conditional expectation of the nonnegative random variable , and conditional expectation preserves a.s. nonnegativity (immediate from the defining identity (1): if a.s. and on a set of positive probability, then , contradicting ).
∎Worked examples
Example 1: A random sum with a geometric number of exponential claims (asymmetric parameters). An insurer receives a random number of claims in a period, where on with success probability , so , giving and . Given , the total claim amount is where are i.i.d. exponential with rate (mean , variance ), independent of . We compute and using the tower property and total variance law, conditioning on . Conditional mean and variance given . Since the are i.i.d. with mean and variance , and is a sum of a fixed number of i.i.d. terms once we condition on ,
So as random variables in :
Applying the tower property.
Applying the law of total variance. We need both pieces:
Therefore
So and (a standard deviation of ). Notice the two contributions are comparable in size (40 vs 60): the "between-group" variability — driven by not knowing how many claims there will be — actually dominates slightly here, illustrating that randomness in the count can be as important a source of overall variance as randomness in the individual claim sizes. This is the compound-distribution / random-sum formula
recovered here as a direct instance of the general theorem, with and , matching exactly.
Example 2: Two-stage sampling — a mixture with different within-group shapes (Beta-Binomial style setup). A factory has machines whose defect probability varies from batch to batch: with (so most batches have relatively low defect rates, but with a right skew allowing worse batches). Recall for ,
Given , we inspect items from that batch, and (the number defective) is conditionally. This is the Beta-Binomial model. We find and . Conditional moments. For ,
Tower property.
Total variance — between-group term.
Total variance — within-group term. We need . Since , we get . Hence
and so
Combine.
So , . As a check against the closed-form Beta-Binomial variance formula
which matches exactly. Notice here the between-batch variance () exceeds the within-batch binomial variance (): heterogeneity across batches is again the dominant source of overall variability, a common pattern in hierarchical/random-effects data (this is sometimes called "overdispersion" relative to a plain Binomial, whose variance would only be ).
The law of total variance requires . If we only assume but (or undefined), the decomposition can fail to even make sense, and worse, the individual terms can behave pathologically even when they look finite. Let take values in with for the normalizing constant (so but let us push further). Given , let be a random variable taking value with probability and with probability . Then for every ,
So identically, forcing trivially — this piece is perfectly well defined and finite. But the other piece is
Here as well (consistent, since and the tower property for nonnegative random variables holds by monotone convergence even when the common value is ). So itself is not finite: it is not merely "large," the decomposition
degenerates to "," which is technically consistent as an extended-real-number statement but useless as a finite decomposition: we cannot say anything quantitative about how much of the (undefined/infinite) variance is "within" versus "between." In a genuine application (say, comparing within-batch vs. between-batch variability numerically, as in Example 2), losing finiteness destroys the entire purpose of the formula. This shows the hypothesis is not a technical nicety — it is exactly what guarantees both terms on the right side are finite nonnegative numbers that meaningfully add up to a finite total.
Scope, edge cases & common traps
| Situation | What holds | What can fail |
|---|---|---|
| only | Tower property holds | may not be defined; total variance law not applicable |
| Full law of total variance holds, both terms finite and | — | |
| independent | a.s. (constant), so and : consistent but degenerate — no information gained by conditioning | Common trap: assuming the "between" term is always the interesting one; here it vanishes |
| a deterministic function of , e.g. | a.s., so a.s. and | All variance is "explained"; within term is zero, not the other way around |
| Conditioning on the wrong -algebra order | Nested tower property requires | Reversing the order, , generally gives itself (a different, usually incorrect, simplification) whenever — a very common bookkeeping error |
| Treating as a number | It is a random variable, a function of | Writing "" (a number, for fixed ) versus "" (random) are different objects; the total variance law needs the latter, then take over |
The mathematician behind it
Origins · 1 minAndrey Nikolaevich Kolmogorov and how this was discovered
Kolmogorov built the measure-theoretic foundations of probability in his 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung, defining conditional expectation via the Radon–Nikodym theorem and thereby making rigorous exactly the kind of iterated-conditioning arguments — the tower property and its variance analogue — that this article formalizes. Before Kolmogorov's axiomatization, "conditioning on a random variable" was handled informally through conditional densities; his framework extended it cleanly to conditioning on arbitrary sub--algebras, which is precisely the generality needed for the nested tower property proved above.
Why is it called the "tower" property?
The name evokes stacking layers of conditioning: conditioning on more information () and then conditioning that result on less information () collapses to conditioning on the smaller -algebra directly, as if descending a tower of nested filtrations one level at a time. Visually, you can imagine a tower of -algebras , and the property says you can always "telescope" down to the coarsest one in the chain by successive conditioning, in either one big step or many small steps, with the same result. This telescoping is exactly what makes multi-stage models (e.g., martingale filtrations, Markov chains, hierarchical Bayes) tractable, since it lets you compute expectations stage by stage.
Can the "between-group" variance term ever exceed the total variance?
No. Since always (as conditional variance is a.s. nonnegative), the law of total variance immediately gives , with equality exactly when a.s. — that is, when is (a.s.) a deterministic function of . This inequality, , is precisely the mathematical content of the Rao–Blackwell theorem: replacing an estimator by its conditional expectation given a sufficient statistic never increases variance, since it removes only "noise" that is orthogonal to information already captured by that statistic.
Does the law of total variance require and to have a joint density, or joint discreteness?
No. The proof given uses only the abstract projection characterization of conditional expectation in , valid for arbitrary random variables (or random vectors) on any probability space, discrete, continuous, or neither. Joint densities or joint probability mass functions are a computational convenience — they let you write explicitly — but the theorem itself holds in full generality as long as .
How does this relate to ANOVA (analysis of variance) in statistics?
One-way ANOVA partitions the total sum of squares in a dataset into "between-group" and "within-group" sums of squares, exactly mirroring the two terms in the law of total variance, with the group label playing the role of . If denotes a randomly drawn group label and a randomly drawn observation from that group, then the population version of the ANOVA decomposition is precisely ; ANOVA's F-statistic is built from sample estimates of these two population quantities, testing whether the between-group term is large relative to the within-group term.
What happens if is a random vector instead of a single random variable?
Everything goes through unchanged: the theorem and proof never use that is real-valued, only that is a well-defined sub--algebra of . So can be any random vector (or even, most generally, any sub--algebra directly, with replaced by throughout). This flexibility is exactly what is used when conditioning on an entire history in martingale and Markov chain theory.