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-03
The conditional variance is
Its expectation is the mean squared error of the conditional-expectation predictor.
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.
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.