Expectation, Variance & Moments

conditional expectation and the tower property (introductory)

Knowing extra information should refine your forecast. If you must guess a stranger's height you give the overall average; but told they play professional basketball, you revise sharply upward. Conditional expectation makes this precise: it is the expected value of X once you know the value of some related variable Y.

Read it in two stages. First, E[X given Y = y] is an ordinary number: the mean of X computed inside the slice of the world where Y took the specific value y — you restrict attention to those outcomes and average X over just them. Second, since this answer changes with y, the whole object E[X given Y] is a function of Y: a rule that, for each value Y happens to take, returns the corresponding refined average. Crucially, because Y is random, E[X given Y] is itself a random variable — your forecast is random because it depends on which Y you observe.

The headline result tying it back to the ordinary mean is the tower property, also called the law of total expectation: E[ E[X given Y] ] = E[X]. In words, if you average your refined forecasts over all the possible values of Y, you recover the plain overall mean. It formalizes 'condition on a helpful variable, solve the easy pieces, then average back' — split a hard expectation into cases, find E[X] within each case, and weight those by how likely each case is. This case-splitting is one of the most powerful problem-solving moves in all of probability.

Roll a die (Y); then flip that many fair coins and let X be the number of heads. Inside each case E[X given Y = y] = y/2. So E[X given Y] = Y/2, and by the tower property E[X] = E[Y/2] = (1/2)(3.5) = 1.75 expected heads — computed by conditioning, without tracking the joint distribution.

Average your case-by-case forecasts back over Y to recover the overall mean: E[E[X|Y]] = E[X].

E[X given Y = y] is a number, but E[X given Y] is a random variable (a function of Y). The tower property says averaging it over Y gives back E[X]; do not confuse it with conditioning on a single fixed value.

Also called
E[X given Y]conditional meanlaw of total expectation條件期望值