Tutorials › Probability Theory (Graduate) › Common Errors About Conditional Expectation

Conditional Expectation · Tutorial 250 of 946

Common Errors About Conditional Expectation

Recognize common conditional-expectation errors by checking measurability, null sets, and exactly what information is being conditioned on.

Intermediate 9 min read

What You'll Learn

  • Explain why conditional expectations are unique only up to almost-sure equality.
  • Identify when changing a version on a null set preserves measurability.
  • Distinguish a conditional mean given an event from conditioning on the sigma-algebra it generates.
  • Calculate conditional expectations on finite probability spaces.
  • Recognize when a conditional expectation is a random variable rather than a deterministic number.

Why Common Errors Persist

Conditional expectation combines two ideas: averaging a random variable and retaining specified information. Errors often arise when one of these ideas is treated as though it were the other. A conditional expectation is not generally a pointwise-defined formula with a unique value at every outcome, nor is it generally a single number.

We will use the standard definition. Let \(X\) be an integrable random variable on a probability space \((\Omega,\mathcal{F},P)\), and let \(\mathcal{G}\subseteq\mathcal{F}\) be a sigma-algebra. A conditional expectation of \(X\) given \(\mathcal{G}\) is an integrable, \(\mathcal{G}\)-measurable random variable \(Z\) such that its integrals agree with those of \(X\) over every event in \(\mathcal{G}\).

$$ \int_B Z\,dP=\int_B X\,dP \qquad\text{for every }B\in\mathcal{G}. $$

It is denoted by \(\mathbb{E}[X\mid\mathcal{G}]\). The definition and the examples below help separate the conditional expectation itself from several claims that sound similar but are not equivalent.

Error 1: Treating Almost-Sure Equality as Pointwise Equality

Conditional expectation is determined only up to almost-sure equality. Two random variables are equal almost surely if the event on which they differ has probability zero. Their values may differ at outcomes in that null set.

Theorem: If \(U\) and \(V\) are both conditional expectations of the same integrable \(X\) given the same sigma-algebra \(\mathcal{G}\), then \(U=V\) almost surely. This does not assert that \(U(\omega)=V(\omega)\) for every \(\omega\in\Omega\).
Proof. Both variables are \(\mathcal{G}\)-measurable and satisfy the defining integral identity. Thus, for every \(B\in\mathcal{G}\), \(\int_B(U-V)\,dP=0\). In particular, take \(B=\{U>V\}\), which belongs to \(\mathcal{G}\). On this event, \(U-V\) is nonnegative, and its integral is zero. A nonnegative measurable function with integral zero vanishes almost surely: indeed, each set \(\{U-V\geq 1/n\}\) must have probability zero, since otherwise its contribution to the integral would be positive. Their union is \(\{U>V\}\), so \(P(U>V)=0\). Applying the same argument to \(\{V>U\}\) gives \(P(V>U)=0\). Therefore \(P(U\ne V)=0\).
$$ \square $$

The qualification “almost surely” matters. A version of a conditional expectation is a particular representative of an almost-sure equivalence class; changing its value on a null set can give another version, provided the changed variable remains measurable with respect to \(\mathcal{G}\). An arbitrary change on a null set need not preserve that measurability.

Worked Example: Two Versions Differing at a Null Outcome

Let \(\Omega=\{a,b,c\}\), with \(\mathcal{F}\) the power set and probabilities \(P(\{a\})=P(\{b\})=1/2\), \(P(\{c\})=0\). Let \(\mathcal{G}=\mathcal{F}\), and set \(X(a)=0\), \(X(b)=2\), and \(X(c)=7\). Since \(X\) is \(\mathcal{G}\)-measurable, \(X\) itself is a conditional expectation of \(X\) given \(\mathcal{G}\).

Now define \(Z(a)=0\), \(Z(b)=2\), and \(Z(c)=99\). It is also \(\mathcal{G}\)-measurable. For every \(B\subseteq\Omega\), the integral of \(Z\) over \(B\) equals the integral of \(X\) over \(B\): the only outcome at which their values differ is \(c\), which has probability zero. Thus \(Z\) is another conditional expectation. The two versions differ pointwise at \(c\), but \(P(X\ne Z)=0\).

A common mistake is therefore to say that any two conditional expectations must agree “everywhere.” The guaranteed conclusion is equality almost surely. Conversely, a pointwise identity that fails only on a null set may still be a valid identity between versions in the usual almost-sure sense.

Error 2: Confusing an Event with a Sigma-Algebra

Conditioning on an event \(A\) with positive probability commonly means calculating a single number, the mean of \(X\) restricted to that event and normalized by its probability. Conditioning on the sigma-algebra generated by \(A\), written \(\sigma(A)\), means finding a random variable that records a conditional mean on each of the two pieces \(A\) and \(A^c\).

Definition: If \(X\) is integrable and \(P(A)>0\), the conditional mean of \(X\) given the event \(A\) is
$$ \mathbb{E}[X\mid A] = \frac{\mathbb{E}[X\mathbf{1}_A]}{P(A)}. $$
This is a deterministic number. If \(P(A)=0\), this ratio is undefined.

By contrast, \(\mathbb{E}[X\mid\sigma(A)]\) is a random variable. When both \(A\) and \(A^c\) have positive probability, it has the following form: the conditional mean on \(A\) on one piece, and the conditional mean on \(A^c\) on the other.

Proposition: If \(P(A)>0\) and \(P(A^c)>0\), then
$$ \mathbb{E}[X\mid\sigma(A)] = \frac{\mathbb{E}[X\mathbf{1}_A]}{P(A)}\mathbf{1}_A + \frac{\mathbb{E}[X\mathbf{1}_{A^c}]}{P(A^c)}\mathbf{1}_{A^c}. $$
Proof. Call the random variable on the right \(Z\). It is \(\sigma(A)\)-measurable because it is constant on \(A\) and on \(A^c\). The events in \(\sigma(A)\) are \(\varnothing,A,A^c,\Omega\). On \(A\), its integral is \[ \int_A Z\,dP = \frac{\mathbb{E}[X\mathbf{1}_A]}{P(A)}P(A) = \mathbb{E}[X\mathbf{1}_A] = \int_A X\,dP. \] The same calculation on \(A^c\) gives \(\int_{A^c}Z\,dP=\int_{A^c}X\,dP\). The identity holds for \(\varnothing\) trivially and for \(\Omega\) by adding the identities on the disjoint sets \(A\) and \(A^c\). Thus \(Z\) satisfies the defining property of \(\mathbb{E}[X\mid\sigma(A)]\).
$$ \square $$

If \(P(A)=0\), the event-based ratio is undefined, but conditioning on \(\sigma(A)\) is still meaningful. In that case \(\sigma(A)\) distinguishes only a null event from its complement, so its conditional expectation is equal almost surely to the constant \(\mathbb{E}[X]\). If \(P(A)=1\), the same conclusion holds; any value assigned on the null complement does not affect the almost-sure result.

Worked Example: A Conditional Mean Versus Conditioning on \(\sigma(A)\)

Take four equally likely outcomes, and let \(X\) have values \(0,2,4,6\) on them, respectively. Let \(A\) consist of the first two outcomes. Then \(P(A)=1/2\), and the average of \(X\) on \(A\) is \((0+2)/2=1\). Thus \(\mathbb{E}[X\mid A]=1\).

On \(A^c\), the average is \((4+6)/2=5\). Therefore \(\mathbb{E}[X\mid\sigma(A)]\) equals \(1\) on \(A\) and \(5\) on \(A^c\). Its overall expectation is \((1+1+5+5)/4=3\), which also equals \(\mathbb{E}[X]=(0+2+4+6)/4\). The event-conditioned mean \(1\) is just the value on \(A\); it is not the whole conditional-expectation random variable.

Error 3: Treating a Conditional Expectation as a Fixed Number

For a general sigma-algebra \(\mathcal{G}\), the conditional expectation is a \(\mathcal{G}\)-measurable random variable. It can vary with the outcome because different outcomes may carry different information in \(\mathcal{G}\). Its expectation is a number, but that number is not in general the conditional expectation itself.

Worked Example: Conditioning on the Information in a Random Variable

Let \(\Omega=\{1,2,3,4\}\) have the uniform probability distribution. Set \(X(1)=0\), \(X(2)=2\), \(X(3)=4\), \(X(4)=6\), and define \(Y(1)=Y(2)=0\), \(Y(3)=Y(4)=1\). The sigma-algebra \(\sigma(Y)\) distinguishes the two groups \(\{1,2\}\) and \(\{3,4\}\).

The mean of \(X\) on the group where \(Y=0\) is \((0+2)/2=1\). On the group where \(Y=1\), it is \((4+6)/2=5\). Hence \(\mathbb{E}[X\mid\sigma(Y)]\) takes the value \(1\) on the first group and \(5\) on the second. Equivalently, it is \(1+4Y\), a random variable. Its expectation is \((1+1+5+5)/4=3\), equal to \(\mathbb{E}[X]\), not to either of its two conditional values.

Writing \(\mathbb{E}[X\mid Y]\) is common shorthand for \(\mathbb{E}[X\mid\sigma(Y)]\). The notation does not mean that the conditional expectation is a number obtained by plugging in one fixed value of \(Y\). In the example, \(Y\) varies across outcomes, and so does the conditional expectation.

A Practical Diagnostic

When a conditional-expectation statement seems surprising, identify exactly what it claims. Ask whether it is asserting equality at every outcome or only almost surely; whether the conditioning object is an event or a sigma-algebra; and whether the expected result should be a number or a random variable. These checks often expose the error before any calculation is needed.

1
Check the conditioning information.
An event with positive probability gives a scalar conditional mean under the event convention. A sigma-algebra gives a measurable random variable.
2
Check the equality claim.
Conditional expectations are unique up to almost-sure equality, not necessarily pointwise equality.
3
Check exceptional cases.
The event formula requires positive event probability. For conditioning on a sigma-algebra, null pieces do not determine values on those pieces pointwise.

The central lesson is not that pointwise formulas or scalar conditional means are never useful. Each is useful when its meaning is clear. The mistake is to silently substitute one notion for another. Keeping track of the sigma-algebra, the almost-sure qualification, and the type of the answer makes conditional-expectation arguments precise.

Check Your Understanding

For each question, distinguish carefully between a pointwise claim, an almost-sure claim, and a claim about the conditioning information.

  1. What does uniqueness of \(\mathbb{E}[X\mid\mathcal{G}]\) guarantee, and what does it not guarantee?
  2. Why can two versions of the same conditional expectation differ at an outcome without contradicting uniqueness?
  3. When \(P(A)>0\), how does the scalar \(\mathbb{E}[X\mid A]\) differ from the random variable \(\mathbb{E}[X\mid\sigma(A)]\)?
  4. What is the standard meaning of \(\mathbb{E}[X\mid Y]\), and why can it vary across outcomes?
  5. Why is the event-based ratio for \(\mathbb{E}[X\mid A]\) undefined when \(P(A)=0\), even though conditioning on \(\sigma(A)\) remains meaningful?
Clinical Biostats