Conditional expectation as projection
Define conditioning by its integral identities, then recover a genuine orthogonal projection when second moments exist.
On this page
The question for today
What you’ll understand
- Characterize conditional expectation and its almost-sure uniqueness.
- Separate the L1 definition from the L2 projection theorem.
- Compute weighted conditional averages and the associated squared-error decomposition.
Conditional expectation describes what can be predicted about an integrable random quantity using a specified collection of observable events. It is itself a random variable, constant on indistinguishable outcomes when the information comes from a finite partition. Its defining property is an equality of integrals, not a formula requiring conditional densities. When the original variable has a finite second moment, the same object becomes an orthogonal projection and minimizes mean squared error. That geometric conclusion needs an extra hypothesis beyond mere integrability.
Information determines which predictions are allowed
Work on a probability space and let the smaller sigma-algebra represent the available information. For an integrable real random variable X, a conditional expectation is an integrable variable measurable for that smaller sigma-algebra whose integral agrees with X on every event in it. Existence follows from the Radon–Nikodym theorem. Uniqueness is only almost sure: changing the answer on a measurable null set leaves every defining integral unchanged. Conditional expectations are therefore equivalence classes unless a particular version is chosen.
For a finite partition, the answer on a positive-probability cell is the probability-weighted average of X within that cell. It is an ordinary arithmetic average only when the conditional atom weights are equal. A cell of probability zero has no prescribed average, because the integral identity cannot distinguish any values there. Conditioning on information is consequently more general than conditioning on one event, and notation involving an event of probability zero cannot be interpreted through division by its probability.
Projection requires a Hilbert space
Assume now that X is square integrable. The square-integrable variables measurable for the smaller information form a closed subspace of the Hilbert space of square-integrable variables. Conditional expectation belongs to this subspace and its residual is orthogonal to every variable in it. The defining event identity first proves this for indicator functions, then for simple functions, and finally for all square-integrable tests by approximation and Cauchy–Schwarz. The zero correlation is with every permitted test, not merely with a constant.
Expanding the squared error of any other square-integrable measurable predictor yields a Pythagorean identity: the optimal residual error plus the squared distance from that predictor to the conditional expectation. The cross term vanishes by orthogonality. Thus the optimal predictor is unique up to null sets. An integrable variable without a second moment still has a conditional expectation, but squared-error geometry may be unavailable because the proposed risks can be infinite. The L1 contraction property remains meaningful even in that case.
Tower and contraction organize repeated conditioning
Conditioning an integrable variable already measurable for the available information leaves it unchanged. Averaging the conditional expectation over the whole space recovers the original expectation. If one information set is contained in another, conditioning first on the larger and then the smaller equals conditioning directly on the smaller; the same integral identities prove this tower property. Without a nesting relation, two successive conditioning operations need not simplify or commute. The sigma-algebras specify the problem as much as the variable does.
Conditional Jensen gives contraction in every finite Lp space with exponent at least one whenever the original variable lies there. For squared-integrable variables this agrees with the fact that orthogonal projection cannot increase length. As more information arrives, the best predictor changes while the tower property keeps earlier forecasts consistent with later ones in conditional mean. That observation produces the fundamental martingale example: forecasts of one fixed integrable terminal quantity as an increasing information sequence is revealed.
Work it through
Project on an unequal four-atom partition
Four atoms have probabilities and X values . Information reveals only whether the outcome lies in the first two or last two atoms. Compute the optimal predictor and its squared error.
The first cell has mass and weighted X integral , giving conditional value zero. The second has mass and integral , giving conditional value .
The mean is , agreeing with the direct weighted mean. The second moment of X is , whereas the predictor's second moment is .
Orthogonality therefore gives residual squared error . Directly summing the four weighted squared residuals gives the same answer, checking both the weights and the projection calculation.
The predictor is zero on the first cell and forty sevenths on the second. Probability weights, rather than the number of atoms, determine both conditional averages.
The living notebook
Explore the model
Interactive lab · probability
Cell probabilities are weights, not outcome counts
Pause and Reset, then set both success probability and trials . Predict bars of masses and . Reset and set both , predicting the reversed masses. These Bernoulli laws illustrate the two partition-cell weights; attach the conditional values from the worked example on paper. The lab does not represent its four internal atoms or compute a conditional projection. Control changes retain elapsed time; Reset clears both parameters and time.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA conditional cell average must use its internal probability weights, while the cell mass determines its contribution to the overall expectation.
Pause & reason
Check your understanding
Your turn
Try it yourself
Two independent fair coins have payoffs in the order HH, HT, TH, TT. Condition on the first coin. Find the predictor, its residual mean square, and the variance decomposition.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Average within the two equally weighted cells first, then center both the original variable and its predictor by their common mean.
Compare with the solution
The conditional values are four after H and two after T, with common overall mean three. The residual values are , so their mean square is four. The predictor has variance one, while the original second moment is fourteen and variance is . Hence , exactly the orthogonal variance decomposition. Equal conditional weights are valid here because the coins were explicitly independent and fair.
Keep the idea
Take it with you
- Conditional expectation is characterized by measurability and event-integral identities.
- Uniqueness is almost sure, including arbitrary choices on null cells.
- L2 conditioning minimizes squared error through orthogonality.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.