Conditional Expectation & Conditioning

conditional expectation as an L^2 projection

There is a beautiful geometric way to see conditional expectation, valid whenever X has finite variance. Think of square-integrable random variables as 'vectors' in an infinite-dimensional space, with inner product given by E[X times Y]. Distance squared between two variables is E[(X - Y)^2], the mean-square error. In this space, all the G-measurable variables form a flat subspace — a 'plane through the origin'. Conditioning on G is just dropping a perpendicular from X onto that plane.

Precisely: E[X given G] is the orthogonal projection of X onto L^2(G), the subspace of G-measurable square-integrable variables. That means it is the closest point in the plane to X — the unique G-measurable Z minimizing E[(X - Z)^2]. The minimizing property and the perpendicularity property are two sides of one coin: the residual X - E[X given G] is orthogonal to the whole subspace, which is exactly the partial-averaging/orthogonality condition E[(X - E[X given G]) Z] = 0 for every G-measurable Z. The Pythagorean theorem then reads E[X^2] = E[ (E[X given G])^2 ] + E[ (X - E[X given G])^2 ]: the squared length of X splits into the squared length of its shadow plus the squared length of the part left over. This identity is the variance decomposition in disguise.

This picture makes the abstract definition intuitive and gives instant proofs: linearity is linearity of projection, the tower property is 'project, then project again onto a smaller subspace = project once onto the smaller one', and idempotence (E[E[X given G] given G] = E[X given G]) is 'projecting twice does nothing new'. The honest limit: the projection construction needs E[X^2] finite. For merely integrable X (finite mean, possibly infinite variance) you cannot use L^2 geometry and must fall back on the Radon-Nikodym route — though the final object is the same on the overlap.

Among ALL functions of Y, which g(Y) is closest to X in mean square? The answer is g(Y) = E[X given Y]. Any other predictor h(Y) has E[(X - h(Y))^2] = E[(X - E[X given Y])^2] + E[(E[X given Y] - h(Y))^2], strictly larger unless h = g. That extra Pythagorean term is precisely the penalty for not projecting exactly.

Conditioning = dropping a perpendicular onto the subspace of G-measurable variables.

The L^2 projection picture requires finite second moment, E[X^2] < infinity. For X that is only integrable, conditional expectation still exists (via Radon-Nikodym) but the geometric proof does not apply.

Also called
orthogonal projection viewgeometric view of conditioning正交投影觀點幾何觀點