Tutorials › Probability Theory (Graduate) › Linearity and Constants

Conditional Expectation · Tutorial 235 of 946

Linearity and Constants

Learn how linearity and constants simplify conditional expectations, and why conditioning preserves the overall expectation.

Intermediate 10 min read

What You'll Learn

  • State the defining integral criterion for conditional expectation.
  • Prove linearity for finite combinations of integrable random variables.
  • Show that a constant remains unchanged under conditioning.
  • Derive the expectation-preserving identity from the defining criterion.
  • Combine these facts in finite-partition and continuous examples.
  • Distinguish scalar coefficients from random coefficients.

Why Linearity Matters

Conditional expectation replaces a random variable by a version that reflects the information in a sigma-algebra. In calculations, we often need to condition sums or affine combinations rather than a single variable. Linearity lets us do this component by component, while preservation of constants ensures that a fixed offset is not altered by conditioning.

A second useful fact is that conditioning does not change the overall mean. The conditional expectation may vary with the information being observed, but its own expectation is the expectation of the original variable. These properties follow directly from the defining integral criterion; they do not require independence or any special structure of the sigma-algebra.

Definition and Equality of Versions

Definition: Let \((\Omega,\mathcal F,\mathbb P)\) be a probability space, let \(\mathcal G\subseteq\mathcal F\) be a sigma-algebra, and let \(X\) be an integrable real random variable. A conditional expectation of \(X\) given \(\mathcal G\), denoted by \(\mathbb E[X\mid\mathcal G]\), is an integrable, \(\mathcal G\)-measurable random variable \(Y\) such that, for every \(A\in\mathcal G\), $$ \int_A Y\,d\mathbb P=\int_A X\,d\mathbb P. $$

Conditional expectations are unique up to almost-sure equality. Thus, an identity between conditional expectations means equality almost surely, even if particular chosen versions differ on a null set. We will use the defining criterion and this uniqueness in the proofs below.

Linearity, Constants, and the Mean

Theorem: Let \(X_1,\ldots,X_n\) be integrable real random variables, let \(a_1,\ldots,a_n,c\in\mathbb R\), and let \(\mathcal G\subseteq\mathcal F\) be a sigma-algebra. Then $$ \mathbb E\!\left[\sum_{i=1}^n a_iX_i+c\ \middle|\ \mathcal G\right] = \sum_{i=1}^n a_i\mathbb E[X_i\mid\mathcal G]+c \quad\text{almost surely}. $$ In particular, \(\mathbb E[c\mid\mathcal G]=c\) almost surely. Also, for every integrable \(X\), $$ \mathbb E\!\left[\mathbb E[X\mid\mathcal G]\right]=\mathbb E[X]. $$

Proof of linearity and preservation of constants. Define \(Z=\sum_{i=1}^n a_iX_i+c\) and \(W=\sum_{i=1}^n a_i\mathbb E[X_i\mid\mathcal G]+c\). The random variable \(Z\) is integrable because it is a finite linear combination of integrable random variables and a constant. The random variable \(W\) is integrable for the same reason, and it is \(\mathcal G\)-measurable because each conditional expectation in its definition is \(\mathcal G\)-measurable and the coefficients are deterministic scalars.

For any \(A\in\mathcal G\), linearity of the integral and the defining criterion give $$ \int_A W\,d\mathbb P = \sum_{i=1}^n a_i\int_A\mathbb E[X_i\mid\mathcal G]\,d\mathbb P +c\,\mathbb P(A) = \sum_{i=1}^n a_i\int_A X_i\,d\mathbb P +c\,\mathbb P(A) = \int_A Z\,d\mathbb P. $$ Thus \(W\) satisfies the defining criterion for the conditional expectation of \(Z\). Uniqueness up to almost-sure equality proves the asserted linearity identity. Taking \(n=0\), or applying the criterion directly to a constant, shows that the constant random variable \(c\) is its own conditional expectation: it is \(\mathcal G\)-measurable and its integral over every \(A\in\mathcal G\) is \(c\mathbb P(A)\). Uniqueness completes the claim.

Proof of the expectation-preserving identity. Set \(Y=\mathbb E[X\mid\mathcal G]\). Since \(\Omega\in\mathcal G\), the defining criterion applied to \(A=\Omega\) yields $$ \mathbb E[Y]=\int_\Omega Y\,d\mathbb P = \int_\Omega X\,d\mathbb P = \mathbb E[X]. $$ This proves the identity. \(\square\)

Worked Examples

Worked Example: A Die Conditioned on Its Parity

Let \(D\) be the outcome of a fair six-sided die, and let \(\mathcal G\) record whether the outcome is odd or even. Define \(X=D\) and \(Y=\mathbf 1_{\{D=6\}}\). Each parity class has probability \(1/2\). Given that \(D\) is odd, its possible values are \(1,3,5\), so $$ \mathbb E[X\mid\mathcal G]=\frac{1+3+5}{3}=3. $$ Given that \(D\) is even, its possible values are \(2,4,6\), so the corresponding conditional mean is \((2+4+6)/3=4\). The variable \(Y\) is zero on the odd class and equals one only at outcome \(6\), so its conditional mean is zero given odd and \(1/3\) given even.

Consider the affine combination \(Z=2X-3Y+5\). By linearity and preservation of constants, $$ \mathbb E[Z\mid\mathcal G] = 2\mathbb E[X\mid\mathcal G]-3\mathbb E[Y\mid\mathcal G]+5 = \begin{cases} 11,&D\text{ is odd},\\ 12,&D\text{ is even}. \end{cases} $$ Directly, the values of \(Z\) on outcomes \(1,3,5\) are \(7,11,15\), with mean \(11\). Its values on outcomes \(2,4,6\) are \(9,13,14\), with mean \(12\). The conditional calculations therefore agree with the averages on each information class. Finally, the two classes are equally likely, so \(\mathbb E[\mathbb E[Z\mid\mathcal G]]=(11+12)/2=11.5\). Direct calculation gives \(\mathbb E[Z]=2(3.5)-3(1/6)+5=11.5\), as required.

Worked Example: Combining Variables on a Finite Partition

Let \(\Omega=\{1,2,3,4\}\), with each outcome having probability \(1/4\), and let \(\mathcal G\) distinguish the two sets \(A=\{1,2\}\) and \(B=\{3,4\}\). Define \(X\) by its values \(0,2,4,6\) on outcomes \(1,2,3,4\), respectively, and define \(Y\) by the values \(1,3,-1,5\). Within \(A\), the conditional means are $$ \mathbb E[X\mid A]=\frac{0+2}{2}=1, \qquad \mathbb E[Y\mid A]=\frac{1+3}{2}=2. $$ Within \(B\), they are $$ \mathbb E[X\mid B]=\frac{4+6}{2}=5, \qquad \mathbb E[Y\mid B]=\frac{-1+5}{2}=2. $$ For \(Z=2X-Y+4\), the conditional expectation is therefore \(4\) on \(A\) and \(12\) on \(B\). To check the first value directly, \(Z\) equals \(3\) and \(5\) on \(A\), whose average is \(4\). On \(B\), its values are \(13\) and \(11\), whose average is \(12\). Since \(A\) and \(B\) each have probability \(1/2\), the expectation of the conditional expectation is \((4+12)/2=8\). Also \(\mathbb E[X]=3\) and \(\mathbb E[Y]=2\), so \(\mathbb E[Z]=2(3)-2+4=8\).

Worked Example: Conditioning on No Nontrivial Information

Let \(U\) be uniform on \([0,1]\), and take \(\mathcal G=\{\varnothing,\Omega\}\), the trivial sigma-algebra. A \(\mathcal G\)-measurable random variable is constant almost surely, so the conditional expectation of an integrable variable given \(\mathcal G\) is its ordinary expectation, viewed as a constant. Set \(X=U\), \(Y=\mathbf 1_{\{U\leq 1/4\}}\), and \(Z=3X+2Y-7\). Since \(\mathbb E[X]=1/2\) and \(\mathbb E[Y]=1/4\), $$ \mathbb E[Z\mid\mathcal G] = 3\left(\frac12\right)+2\left(\frac14\right)-7 = -5 \quad\text{almost surely}. $$ The constant on the right is also the ordinary expectation: \(\mathbb E[Z]=3\mathbb E[X]+2\mathbb E[Y]-7=-5\). This example exhibits both the constant output under trivial conditioning and preservation of the overall mean.

What the Coefficients Do—and Do Not—Allow

The coefficients \(a_i\) in the linearity theorem are fixed real numbers. In general, one cannot simply replace such a coefficient by a random variable and pull it outside the conditional expectation. For example, conditioning on the trivial sigma-algebra gives ordinary expectation. If \(U\) is uniform on \([0,1]\), then \(\mathbb E[U\cdot U]=1/3\), whereas \(\mathbb E[U]\mathbb E[U]=1/4\). Thus a random factor cannot be treated as a scalar constant in this identity.

There are further conditions under which a random factor can be taken outside a conditional expectation, but that is a distinct property with additional hypotheses. For the linearity established here, keep coefficients deterministic. The same caution applies to equality: conditional expectations are defined only up to almost-sure equality, so the formulas do not assert pointwise equality for every outcome across arbitrary versions.

Why These Identities Are Useful

Linearity reduces the conditional expectation of a finite sum to the conditional expectations of its parts. This is especially useful when variables have different interpretations—for example, a measurement, an indicator, and a fixed offset—because each part can be handled using the information relevant to it. Constants require no adjustment, and the expectation-preserving identity provides a consistency check on the result.

These facts are consequences of the defining integral criterion, not assumptions about how informative \(\mathcal G\) is. They hold whether \(\mathcal G\) is generated by a finite partition, represents a single observation, or is the trivial sigma-algebra. The key limitations are that the variables being combined must be integrable, the sum must be finite, and the coefficients in the stated linearity formula are deterministic scalars.

Check Your Understanding

Use the defining criterion and the examples above to answer these questions.

  1. Why does the defining criterion applied to \(\Omega\) yield the expectation-preserving identity?
  2. In the linearity proof, where is uniqueness of conditional expectation used?
  3. For a constant \(c\), why is the constant random variable \(c\) a valid version of \(\mathbb E[c\mid\mathcal G]\)?
  4. In the die example, what are the conditional means of \(X\) and \(Y\) on the even outcomes, and how do they give the conditional mean of \(2X-3Y+5\)?
  5. Why does the linearity theorem not, by itself, justify taking a random coefficient outside a conditional expectation?
Clinical Biostats