Tutorials › Stochastic Processes › The Tower Property for Nested Conditioning

Random Variables, Expectation and Conditional Expectation · Tutorial 21 of 994

The Tower Property for Nested Conditioning

Learn why nested conditioning can be performed in stages, and how to calculate each stage correctly for finite, discrete and density-based models.

Intermediate 10 min read

What You'll Learn

  • State the tower property for a fine partition nested inside a coarser partition.
  • Prove the finite-partition identity, including how to handle zero-probability cells.
  • Calculate nested conditional expectations for discrete random variables using conditional probabilities as weights.
  • Derive the density-based tower formula from a joint density and integrability.
  • Check staged calculations against direct expectations and recognize when a joint-density assumption fails.

Why Conditioning in Stages Works

Sometimes information arrives in layers. We may first learn a broad category and then a more specific outcome within that category. The tower property says that if we calculate an expectation using the more detailed information, then average that result using only the broad information, we recover the conditional expectation based on the broad information alone. The averaging must respect the probabilities of the more detailed outcomes.

We work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), and assume the random variable \(X\) is integrable, meaning \(\mathbb{E}|X|<\infty\). Conditional expectations are defined up to equality almost surely. When conditioning on an event \(A\) in a finite or countable partition, the quotient \(\mathbb{E}[X\mathbf{1}_A]/\mathbb{P}(A)\) is used only when \(\mathbb{P}(A)>0\).

Definition: A partition \(\mathcal{B}\) refines a partition \(\mathcal{A}\) if every cell of \(\mathcal{B}\) is contained in a cell of \(\mathcal{A}\). Thus, knowing which cell of \(\mathcal{B}\) occurred gives at least as much information as knowing which cell of \(\mathcal{A}\) occurred.

For a finite partition \(\mathcal{A}=\{A_1,\ldots,A_r\}\), the conditional expectation given that partition is constant on each cell with positive probability: \(\mathbb{E}[X\mid\mathcal{A}]=\mathbb{E}[X\mathbf{1}_{A_i}]/\mathbb{P}(A_i)\) on \(A_i\). Its value on a zero-probability cell can be chosen arbitrarily without changing the random variable almost surely.

Theorem (Tower property for nested finite partitions): Suppose \(\mathcal{A}\) and \(\mathcal{B}\) are finite partitions, \(\mathcal{B}\) refines \(\mathcal{A}\), and \(\mathbb{E}|X|<\infty\). Then \(\mathbb{E}[\mathbb{E}[X\mid\mathcal{B}]\mid\mathcal{A}]=\mathbb{E}[X\mid\mathcal{A}]\) almost surely.

Proof. Fix a cell \(A\in\mathcal{A}\) with \(\mathbb{P}(A)>0\). The cells \(B\in\mathcal{B}\) contained in \(A\) partition \(A\). On each such \(B\) with positive probability, \(\mathbb{E}[X\mid\mathcal{B}]\) has value \(\mathbb{E}[X\mathbf{1}_B]/\mathbb{P}(B)\). Therefore its average over \(A\) is \(\sum_{B\subseteq A,\ \mathbb{P}(B)>0}\mathbb{P}(B)\mathbb{E}[X\mathbf{1}_B]/(\mathbb{P}(B)\mathbb{P}(A))\). The terms with \(\mathbb{P}(B)=0\) contribute zero to \(\mathbb{E}[X\mathbf{1}_A]\), and additivity over the cells gives \(\sum_{B\subseteq A}\mathbb{E}[X\mathbf{1}_B]=\mathbb{E}[X\mathbf{1}_A]\). Thus the average is \(\mathbb{E}[X\mathbf{1}_A]/\mathbb{P}(A)\), exactly the value of \(\mathbb{E}[X\mid\mathcal{A}]\) on \(A\). This holds on every positive-probability cell \(A\); all other cells together have probability zero. Hence the two conditional expectations are equal almost surely. \(\square\)

A Finite-Partition Calculation

Worked Example: Refining a Two-Cell Partition

Let \(\Omega=\{a,b,c,d,e\}\), with probabilities \(\mathbb{P}(a)=\tfrac{1}{10}\), \(\mathbb{P}(b)=\tfrac{2}{10}\), \(\mathbb{P}(c)=\tfrac{3}{10}\), \(\mathbb{P}(d)=\tfrac{1}{5}\), and \(\mathbb{P}(e)=\tfrac{1}{5}\). Let \(X(a)=0\), \(X(b)=3\), \(X(c)=6\), \(X(d)=2\), and \(X(e)=8\). Take the coarse partition \(\mathcal{A}=\{\{a,b,c\},\{d,e\}\}\), and refine it to \(\mathcal{B}=\{\{a,b\},\{c\},\{d\},\{e\}\}\).

The probabilities sum to \(\tfrac{1}{10}+\tfrac{2}{10}+\tfrac{3}{10}+\tfrac{1}{5}+\tfrac{1}{5}=1\). On the fine cell \(\{a,b\}\), the conditional mean is \((0\cdot\tfrac{1}{10}+3\cdot\tfrac{2}{10})/(\tfrac{3}{10})=2\). On \(\{c\},\{d\},\{e\}\), the conditional means are respectively \(6,2,8\), since \(X\) is constant on each singleton.

The first coarse cell has probability \(\tfrac{1}{10}+\tfrac{2}{10}+\tfrac{3}{10}=\tfrac{3}{5}\), and its conditional mean is \((0\cdot\tfrac{1}{10}+3\cdot\tfrac{2}{10}+6\cdot\tfrac{3}{10})/(\tfrac{3}{5})=\tfrac{24}{10}/\tfrac{6}{10}=4\). Its fine cells have conditional probabilities \((\tfrac{3}{10})/(\tfrac{3}{5})=\tfrac12\) and \((\tfrac{3}{10})/(\tfrac{3}{5})=\tfrac12\). Averaging the fine conditional means gives \(\tfrac12(2)+\tfrac12(6)=4\).

The second coarse cell has probability \(\tfrac{1}{5}+\tfrac{1}{5}=\tfrac{2}{5}\). Its conditional mean is \((2\cdot\tfrac{1}{5}+8\cdot\tfrac{1}{5})/(\tfrac{2}{5})=\tfrac{2}{5}/\tfrac{2}{5}+\tfrac{8}{5}/\tfrac{2}{5}=5\). The two fine cells each have conditional probability \((\tfrac15)/(\tfrac25)=\tfrac12\), so their weighted mean is \(\tfrac12(2)+\tfrac12(8)=5\).

Check: The direct expectation is \(0\cdot\tfrac{1}{10}+3\cdot\tfrac{2}{10}+6\cdot\tfrac{3}{10}+2\cdot\tfrac15+8\cdot\tfrac15=\tfrac{44}{10}=\tfrac{22}{5}\). Averaging the coarse conditional means gives \(\tfrac35(4)+\tfrac25(5)=\tfrac{22}{5}\) as well.

Nested Conditioning on Discrete Random Variables

For a discrete random variable \(V\), conditioning on \(V\) means conditioning on its value: \(\mathbb{E}[X\mid V]\) takes the value \(\mathbb{E}[X\mid V=v]\) when \(V=v\), for values \(v\) with \(\mathbb{P}(V=v)>0\). Suppose \(U=g(V)\), so \(U\) is determined by \(V\). The events \(\{V=v\}\) refine the events \(\{U=u\}\). Consequently, for every \(u\) with positive probability, the conditional mean given \(U=u\) is the probability-weighted average of the conditional means given the possible \(V\)-values that map to \(u\).

Discrete tower formula: If \(V\) has a finite or countable range, \(U=g(V)\), and \(\mathbb{E}|X|<\infty\), then, for every \(u\) with \(\mathbb{P}(U=u)>0\), \(\mathbb{E}[X\mid U=u]=\sum_{v:g(v)=u}\mathbb{P}(V=v\mid U=u)\mathbb{E}[X\mid V=v]\). Equivalently, \(\mathbb{E}[\mathbb{E}[X\mid V]\mid U]=\mathbb{E}[X\mid U]\) almost surely.

Proof. For each \(v\) with \(\mathbb{P}(V=v)>0\), the definition gives \(\mathbb{E}[X\mathbf{1}_{\{V=v\}}]=\mathbb{P}(V=v)\mathbb{E}[X\mid V=v]\). The event \(\{U=u\}\) is the disjoint union of the events \(\{V=v\}\) for which \(g(v)=u\). Summing the preceding identity over those \(v\) gives \(\mathbb{E}[X\mathbf{1}_{\{U=u\}}]=\sum_{v:g(v)=u}\mathbb{P}(V=v)\mathbb{E}[X\mid V=v]\). Divide by \(\mathbb{P}(U=u)>0\), and use \(\mathbb{P}(V=v\mid U=u)=\mathbb{P}(V=v)/\mathbb{P}(U=u)\) for \(g(v)=u\). This proves the formula. For countably many values, the sums are legitimate because \(\mathbb{E}|X|<\infty\), so the corresponding expectations of absolute values are summable. Values \(u\) with zero probability do not affect an almost-sure identity. \(\square\)

Worked Example: A Coarse Discrete Variable

Let \(V\) take values \(a,b,c,d\) with probabilities \(\tfrac18,\tfrac38,\tfrac14,\tfrac14\), and let \(U=0\) for \(V=a,b\) and \(U=1\) for \(V=c,d\). Specify the conditional distribution of \(X\) as follows: given \(V=a\), \(X\) is \(0\) or \(2\), each with probability \(\tfrac12\); given \(V=b\), it is \(2\) or \(4\), each with probability \(\tfrac12\); given \(V=c\), it is \(0\) or \(4\), each with probability \(\tfrac12\); and given \(V=d\), it is \(4\) or \(8\), each with probability \(\tfrac12\).

The conditional means are \(\mathbb{E}[X\mid V=a]=(0+2)/2=1\), \(\mathbb{E}[X\mid V=b]=(2+4)/2=3\), \(\mathbb{E}[X\mid V=c]=(0+4)/2=2\), and \(\mathbb{E}[X\mid V=d]=(4+8)/2=6\). Also, \(\mathbb{P}(U=0)=\tfrac18+\tfrac38=\tfrac12\) and \(\mathbb{P}(U=1)=\tfrac14+\tfrac14=\tfrac12\). Given \(U=0\), the conditional probabilities of \(a,b\) are \((\tfrac18)/(\tfrac12)=\tfrac14\) and \((\tfrac38)/(\tfrac12)=\tfrac34\). Thus \(\mathbb{E}[X\mid U=0]=\tfrac14(1)+\tfrac34(3)=\tfrac52\). Given \(U=1\), \(c,d\) each have conditional probability \((\tfrac14)/(\tfrac12)=\tfrac12\), so \(\mathbb{E}[X\mid U=1]=\tfrac12(2)+\tfrac12(6)=4\).

Check: Averaging the two coarse conditional means gives \(\tfrac12(\tfrac52)+\tfrac12(4)=\tfrac{13}{4}\). Directly averaging the fine means with the probabilities of \(V\) gives \(\tfrac18(1)+\tfrac38(3)+\tfrac14(2)+\tfrac14(6)=\tfrac{13}{4}\).

Nested Conditioning with Densities

A parallel formula applies when the variables being conditioned on have densities. It is important to state the density assumptions precisely. In the result below, \((X,Z,W)\) has a joint density with respect to three-dimensional Lebesgue measure and \(X\) is integrable. The resulting conditional expectations are specified for almost every conditioning value; where a denominator density is zero, the corresponding conditional density need not be defined.

Theorem (Density-based tower formula): Suppose \((X,Z,W)\) has joint density \(f_{X,Z,W}\) and \(\mathbb{E}|X|<\infty\). Write \(f_{Z,W}\) and \(f_Z\) for the appropriate marginal densities. Wherever \(f_{Z,W}(z,w)>0\), define \(f_{X\mid Z,W}(x\mid z,w)=f_{X,Z,W}(x,z,w)/f_{Z,W}(z,w)\), and let \(m(z,w)=\int x f_{X\mid Z,W}(x\mid z,w)\,dx\). Wherever \(f_Z(z)>0\), define \(f_{W\mid Z}(w\mid z)=f_{Z,W}(z,w)/f_Z(z)\). Then, for almost every \(z\) with \(f_Z(z)>0\), \(\mathbb{E}[X\mid Z=z]=\int m(z,w)f_{W\mid Z}(w\mid z)\,dw\).

Proof. The integrability assumption gives \(\int |x|f_{X,Z,W}(x,z,w)\,dx\,dz\,dw<\infty\). Thus the integrals defining conditional means and their averages exist for almost every relevant conditioning value, and Fubini's theorem permits integrating in stages. For almost every \(z\) with \(f_Z(z)>0\), the right-hand side equals \(\int\int x f_{X\mid Z,W}(x\mid z,w) f_{W\mid Z}(w\mid z)\,dx\,dw\). Substituting the density ratios gives \(\int\int x [f_{X,Z,W}(x,z,w)/f_{Z,W}(z,w)][f_{Z,W}(z,w)/f_Z(z)]\,dx\,dw =\int\int x f_{X,Z,W}(x,z,w)/f_Z(z)\,dx\,dw\), where terms with zero marginal density are immaterial to the integral. The last expression is the conditional mean obtained from the marginal density \(f_{X,Z}(x,z)=\int f_{X,Z,W}(x,z,w)\,dw\), namely \(\int x f_{X,Z}(x,z)/f_Z(z)\,dx=\mathbb{E}[X\mid Z=z]\). This proves the identity for almost every \(z\). \(\square\)

Worked Example: Conditioning Through Two Continuous Variables

Let \(Z,W,E\) be independent Uniform\((0,1)\) random variables on a probability space, and set \(X=Z+W+E\). The joint density of \((Z,W,X)\) is \(1\) when \(0<z<1\), \(0<w<1\), and \(z+w<x<z+w+1\), and is \(0\) elsewhere: this follows from the change of variables \(x=z+w+e\), whose Jacobian in the \(e\)-coordinate is \(1\). In particular, \((Z,W,X)\) does have a three-dimensional joint density.

Given \(Z=z,W=w\), \(X=z+w+E\), so its conditional density is \(1\) on \(z+w<x<z+w+1\). Therefore \(\mathbb{E}[X\mid Z=z,W=w]=\int_{z+w}^{z+w+1}x\,dx=\big((z+w+1)^2-(z+w)^2\big)/2=z+w+\tfrac12\). Since \(W\) remains Uniform\((0,1)\) given \(Z=z\), averaging over \(W\) gives \(\mathbb{E}[X\mid Z=z]=\int_0^1(z+w+\tfrac12)\,dw=z+1\).

Check: Averaging the result over \(Z\) gives \(\int_0^1(z+1)\,dz=\tfrac32\). Directly, \(\mathbb{E}[X]=\mathbb{E}[Z]+\mathbb{E}[W]+\mathbb{E}[E]=\tfrac12+\tfrac12+\tfrac12=\tfrac32\), as required.

Weights, Assumptions, and a Common Pitfall

At each stage, the more detailed conditional means must be averaged using the probabilities of their detailed outcomes conditional on the coarser information. Equal weighting is correct only when those conditional probabilities are equal. In the discrete example, an unweighted average of the means for \(a\) and \(b\) would give \((1+3)/2=2\) for \(U=0\). This is wrong: given \(U=0\), the probabilities are \(\tfrac14\) and \(\tfrac34\), so the correct calculation is \(\tfrac14(1)+\tfrac34(3)=\tfrac52\).

The density formula also has a real hypothesis: a joint density for the variables displayed in the formula. For example, if one instead defines \(X=Z+W^2\) deterministically, then \((Z,W,X)\) is supported on the surface \(x=z+w^2\) and has no joint density with respect to three-dimensional Lebesgue measure. The tower identity still holds, but that particular joint-density formula cannot be applied as stated. Conditional distributions that allow point masses can handle such cases; the density theorem above is deliberately restricted to the setting where its density ratios are valid.

In applications, nested conditioning reduces a difficult expectation to simpler calculations at successive levels of information. It is useful in prediction, latent-variable models and sequential analysis: first compute a conditional mean under detailed information, then average that mean over the uncertainty that remains at the coarser level. The essential checks are that the conditioning is genuinely nested, that the relevant conditional probabilities or densities are defined almost everywhere, and that the weights used in the averaging step are correct.

Check Your Understanding

For each question, identify the conditioning information and keep the averaging weights explicit.

  1. If a coarse cell is split into three fine cells with conditional probabilities \(\tfrac12,\tfrac13,\tfrac16\) and fine conditional means \(2,5,8\), compute the coarse conditional mean.
  2. In the discrete formula, why is the condition \(\mathbb{P}(U=u)>0\) needed when calculating \(\mathbb{E}[X\mid U=u]\)?
  3. Suppose \(U=g(V)\) and \(\mathbb{E}[X\mid V=v]\) is known for each positive-probability value \(v\). State the weights needed to calculate \(\mathbb{E}[X\mid U=u]\).
  4. What joint-density assumption is used in the density-based theorem, and why does a deterministic relation \(X=Z+W^2\) fail to satisfy it?
  5. For \(X=Z+W+E\) in the continuous example, compute \(\mathbb{E}[X\mid Z=z,W=w]\) directly from the conditional distribution of \(E\), and compare it with the density calculation.