Conditional expectation E[X|G] with respect to a sigma-algebra G is the unique G-measurable random variable satisfying E[E[X|G]·1_A] = E[X·1_A] for all A ∈ G. It generalizes discrete conditional expectation and has properties: E[E[X|G]] = E[X], E[aX + bY|G] = aE[X|G] + bE[Y|G], and the tower property E[E[X|G₁]|G₂] = E[X|G₂] when G₂ ⊆ G₁.
The existence of E[X|G] relies on the Radon-Nikodym theorem applied to the measure ν(A) = E[X · 1_A] and the probability measure P restricted to G. The G-measurability requirement is what makes conditional expectation a projection in the Hilbert space L²(Ω, G, P), and the projection interpretation gives a geometric intuition: E[X|G] is the closest G-measurable approximation to X in the L² sense.
If you have studied expectation in the measure-theoretic sense, you already know E[X] as an integral over the full probability space. Conditional expectation E[X|G] asks a more refined question: given the partial information encoded by a sub-sigma-algebra G, what is our best prediction of X? The sigma-algebra G represents "what we can observe" — if G is generated by a random variable Y, then E[X|G] is essentially E[X|Y], but stated in the language that works for continuous and abstract settings alike.
The definition is elegant but indirect. Rather than computing E[X|G] by a formula, we characterize it: E[X|G] is the unique G-measurable random variable Z such that for every event A ∈ G, the integral of Z over A equals the integral of X over A — that is, E[Z · 1_A] = E[X · 1_A]. This says Z correctly replicates the behavior of X when "averaged" over any G-observable event. The Radon-Nikodym theorem guarantees such a Z exists and is unique almost surely, which is why the definition works.
The most important property for applications is the tower property: if G₂ ⊆ G₁, then E[E[X|G₁]|G₂] = E[X|G₂]. Intuitively, if you first condition on fine-grained information (G₁) and then further average out to a coarser level (G₂), you end up exactly where you would have if you had conditioned on G₂ from the start. Think of it this way: averaging over neighborhoods within a city, and then averaging those neighborhood averages over the whole city, gives the same result as averaging directly over the whole city. The coarser conditioning always dominates.
The other key properties follow from the defining integral condition. Linearity — E[aX + bY|G] = aE[X|G] + bE[Y|G] — holds because integration is linear. The smoothing property E[E[X|G]] = E[X] is a special case of the tower property with G₂ = {∅, Ω} (the trivial sigma-algebra). And if X is already G-measurable — meaning X is fully determined by the information in G — then E[X|G] = X almost surely, since X itself satisfies both defining conditions.
Conditional expectation is the foundation of martingale theory and Bayesian inference. A martingale is a process where E[X_{n+1}|G_n] = X_n — the best prediction of the next value, given current information, is the current value. In Bayesian statistics, updating a prior after observing data is precisely the operation of conditioning: the posterior is the conditional distribution, and its mean is a conditional expectation. Mastery of E[X|G] opens both of these rich areas.