Conditional expectation Created 2026-09-24 Updated 2026-10-14
The conditional expectation is the average of a random variable that can be predicted using specified information. It is itself a random variable: the average appropriate to one observed group may differ from that appropriate to another group. The sigma-algebra records which events can be distinguished with the available information.
For a real integrable random variable on a probability space and a sub-sigma-algebra , the conditional expectation is the almost surely unique integrable random variable that is measurable with respect to and satisfies
Its average therefore agrees with that of on every distinguishable event. The integral characterization handles discrete observations, continuous observations, and information that is not given by a single numerical value.[ref]
If the information tells us which member of a finite measurable partition contains the outcome, then on every member of positive probability,
Here is an indicator function. Zero-probability members do not determine a unique value, which is why uniqueness is only almost surely. For square-integrable , this same conditional mean is the best predictor among -measurable random variables under mean squared error; the conditional variance describes its remaining error. A conditional mean is generally not the same as the actual observed value of .[ref]
Conditional variance Created 2026-09-28 Updated 2026-10-14
The conditional variance measures the remaining squared uncertainty after specified information has been used to form a conditional mean. For a real square-integrable random variable and a sub-sigma-algebra , let . Then
It is a -measurable random variable, nonnegative almost surely, rather than necessarily a single number. With the information , its value is the variance in the group identified by . Its expected value is the mean squared error of predicting by its conditional mean.[ref]
In the exact mixture distribution in law of total expectation, group contains around mean two, and group contains around mean eight. Both groups have conditional variance four because their deviations from their own means are with equal probabilities. Therefore . Meanwhile, the two group means have variance . The law of total variance gives
Direct calculation gives and , checking the decomposition.
Figure 1.
Total variance separates remaining within-group error from variation of group means
. Left: in the stipulated finite mixture distribution, each group's values deviate by from its conditional mean. Right: the total variance separates into expected conditional variance four and variance of the conditional mean . Knowing the group removes the latter part from the average squared prediction error. Values and weights are exact model choices, not measured data. Details.
For any square-integrable -measurable predictor , the error identity is
The cross term vanishes because . Thus using the conditional mean minimizes mean squared error, while conditional variance quantifies what this information still cannot predict. This is the orthogonal projection interpretation in L2 space.[ref]
Law of total expectation Created 2026-09-24 Updated 2026-10-14
The law of total expectation makes averaging in stages reliable, provided the outer stage uses the actual probabilities of the groups. For an integrable random variable and a sub-sigma-algebra ,
Replacing each outcome by its group's conditional mean preserves the overall expected value. In the definition of conditional expectation, take the event to obtain this identity.[ref]
For a complete finite example, choose a group with probability and with probability . Within group , is or with equal conditional probabilities; within group , it is or with equal conditional probabilities. Thus the joint probability distribution puts probabilities on . The conditional means are two and eight. Consequently,
Direct averaging of the four values gives the same . Taking the unweighted average of the two group means instead gives five, which describes a different choice of group probabilities. This is why the outer weighting matters.
Figure 1.
Group averages preserve the overall mean when weighted by group probabilities
. The stipulated joint probability distribution assigns probabilities to values in groups . The conditional means are two and eight, occurring with probabilities and . Both representations have expected value . The unweighted average of the group means, five, is shown separately as the result of different weighting. These are exact illustrative probabilities, not observations. Details.
The formula is useful when conditioning on a first choice makes the remaining experiment simple. It can replace a large outcome enumeration by smaller calculations within groups. In a mixture distribution, it combines component means using mixture weights; in a random sum of independent claims, it separates the number of summands from their individual expected values under the stated independence assumptions. The same averaging step appears in the law of total variance.
Nested conditioning keeps the coarser information Created 2026-10-14 Updated 2026-10-31
For integrable random variable and nested sub-sigma-algebras , the tower property says
The finer-information conditional mean can be averaged within each coarser group, recovering the coarser-information conditional mean. Conversely, conditioning an already -measurable conditional mean on leaves it unchanged. Both orders therefore recover when the information is nested.[ref]
For the finite example in law of total expectation, exact knowledge of gives the finer mean itself. Averaging within the groups recovers two and eight. Forgetting the group then gives . The nesting condition is essential; iterated conditional expectation over nonnested sigma-algebras describes why arbitrary successive conditioning cannot simply be replaced by conditioning on an intersection.
Select units with first reading , keep that membership fixed, and measure the same units again. The first reading now has a truncated normal distribution. For a general finite threshold , write for the standard normal density and for the standard normal distribution function. Since ,
The tower property of conditional expectation lets us average the line over the selected group.[ref] At this gives
The average second reading is below the selection threshold even though every selected first reading exceeded it. This is a group expectation; any finite generated group's sample mean fluctuates around it. Selecting again on would define a different group and answer a different question.
The latent variable decomposition makes the apparent drop especially clear. Gaussian conditioning gives and . Thus
The first measurement error has zero unconditional mean, but positive selected mean. The second measurement error stays centered because it is independent of selection on . The persistent signal never changed.
Figure 1.
Selection captures an extreme first error while the persistent signal stays fixed
. Original synthetic repeated measurements, not actual measurements. Left: 40 generated units selected by ; orange trajectories move farther from zero. Right: analytic selected-group expectations decompose the first and second readings into persistent latent variable and measurement error. Black dots give generated group sample means after selecting from 60,000 synthetic units; their small departures from the bar totals reflect sampling variation. All selections use the first reading only. Details.