Why Conditioning Has a Geometric Meaning
A conditional expectation retains the part of a random variable that can be expressed using the information in a sigma-algebra. When the random variable is square-integrable, this idea has a precise geometric form: conditional expectation is an orthogonal projection in the Hilbert space \(L^2\).
The key fact is an identity. If \(X\in L^2\), \(\mathcal G\) is a sigma-algebra, and \(P=\mathbb E[X\mid\mathcal G]\), then the residual \(X-P\) is orthogonal to every square-integrable, \(\mathcal G\)-measurable random variable. This tutorial derives that identity and explains why it makes \(P\) the orthogonal projection onto the \(\mathcal G\)-measurable part of \(L^2\).
The \(L^2\) Space and Its Conditioning-Measurable Subspace
Work on a probability space \((\Omega,\mathcal F,\mathbb P)\), with a sub-sigma-algebra \(\mathcal G\subseteq\mathcal F\). We use real-valued random variables and identify variables that are equal almost surely. The space \(L^2=L^2(\Omega,\mathcal F,\mathbb P)\) consists of these equivalence classes with finite second moment. Its inner product and norm are
Define \(L^2(\mathcal G)\) to be the set of \(L^2\) equivalence classes that have a \(\mathcal G\)-measurable representative. This qualification matters: random variables are identified up to almost-sure equality, whereas measurability is a property of a representative.
To call conditional expectation an orthogonal projection onto \(L^2(\mathcal G)\), we need this subspace to be closed. We also need the conditional expectation itself to belong to it. The latter follows from its \(\mathcal G\)-measurability and, for \(X\in L^2\), the \(L^2\) contraction property established in the earlier material on conditional expectation as an \(L^p\) contraction.
From the Defining Identity to Orthogonality
For \(X\in L^2\), set \(P=\mathbb E[X\mid\mathcal G]\). The defining property of conditional expectation says, in particular, that
By linearity, the same identity holds with \(\mathbf 1_A\) replaced by any \(\mathcal G\)-measurable simple function. Approximation then gives the identity for bounded \(\mathcal G\)-measurable tests. To test against an arbitrary \(Y\in L^2(\mathcal G)\), we extend from bounded variables by truncation.
The theorem is the defining orthogonality identity. It says more than that the residual has mean zero: it has zero inner product with every square-integrable variable that is measurable with respect to the conditioning information.
Conditional Expectation as an Orthogonal Projection
In a Hilbert space, an orthogonal projection onto a closed subspace is characterized by two properties: the projected element lies in the subspace, and the difference from the original element is orthogonal to the whole subspace. The result just proved supplies the second property for conditional expectation.
Worked Examples
Worked Example: Projection onto a Finite-Partition Subspace
Let \(\Omega=\{1,2,3,4\}\) with equal probabilities, and let \(\mathcal G\) be generated by the partition \(\{\{1,2\},\{3,4\}\}\). Suppose \(X\) takes the values \(1,3,2,6\) at \(1,2,3,4\), respectively. Conditional expectation averages \(X\) within each partition cell, so
Every \(Y\in L^2(\mathcal G)\) has values \((a,a,b,b)\) for some real \(a,b\). The residual is \(X-P=(-1,1,-2,2)\), and direct calculation gives
Thus the residual is orthogonal to every element of the conditioning-measurable subspace. The calculation verifies the projection identity, not just the conditional averages.
Worked Example: Conditioning a Standard Normal Variable on Its Sign
Let \(Z\) have the standard normal distribution and let \(\mathcal G=\sigma(\{Z\geq 0\})\). A \(\mathcal G\)-measurable variable is constant on each of the events \(\{Z\geq0\}\) and \(\{Z<0\}\), up to null sets. Symmetry gives each event probability \(1/2\), and integration of the normal density gives
The conditional means on the two events are therefore \(\sqrt{2/\pi}\) and \(-\sqrt{2/\pi}\), respectively. Writing \(c=\sqrt{2/\pi}\), we have
For any \(Y\in L^2(\mathcal G)\), write \(Y=a\) on \(\{Z\geq0\}\) and \(Y=b\) on \(\{Z<0\}\). Then
because \(c/2=1/\sqrt{2\pi}\). This confirms orthogonality for every test in the conditioning-measurable subspace.
Worked Example: An Independent Centered Summand
Let \(U,V\in L^2\) be independent, with \(\mathbb E[V]=0\), and set \(X=U+V\) and \(\mathcal G=\sigma(U)\). For every \(A\in\mathcal G\), independence implies
Since \(U\) is \(\mathcal G\)-measurable, these identities show that \(\mathbb E[X\mid\mathcal G]=U\). The residual is \(V\). For any \(Y\in L^2(\mathcal G)\), \(Y\) is independent of \(V\), and \(VY\) is integrable by Cauchy–Schwarz. Independence therefore gives
Here the information in \(U\) retains the \(U\) component, while the independent centered component is orthogonal to all square-integrable tests based on \(U\).
What the Projection Statement Does—and Does Not—Say
The orthogonality identity is useful because it converts conditional expectation into a statement about inner products. It also provides a uniqueness test: if a proposed \(\mathcal G\)-measurable \(P\in L^2\) has residual orthogonal to all of \(L^2(\mathcal G)\), then it must agree almost surely with \(\mathbb E[X\mid\mathcal G]\).
A common pitfall is to test orthogonality only against indicators of events in \(\mathcal G\) and stop there. Those tests express the defining conditional-expectation identity, but the Hilbert-space projection statement concerns every \(Y\in L^2(\mathcal G)\). The truncation argument is what justifies that extension without assuming the test variable is bounded.
The projection interpretation depends on square integrability: it uses the \(L^2\) inner product and Cauchy–Schwarz. Conditional expectation is defined in broader settings, but the specific orthogonal-projection statement belongs to \(L^2\). The next question—how this projection relates to a least-squares criterion—is a separate characterization.
Check Your Understanding
Use the definitions and identities in this tutorial to answer the following questions.
- What are the two properties that characterize the orthogonal projection of \(X\) onto \(L^2(\mathcal G)\)?
- Why is it necessary to extend the conditional-expectation identity beyond bounded \(\mathcal G\)-measurable tests?
- How does truncation show that the orthogonality identity holds for every \(Y\in L^2(\mathcal G)\)?
- In the finite-partition example, why does it suffice to check the residual against a variable with values \((a,a,b,b)\)?
- Why does orthogonality of \(P-Q\) to \(L^2(\mathcal G)\), together with \(P-Q\in L^2(\mathcal G)\), imply uniqueness?