Tutorials › Statistical Theory I - Probability and Distribution Theory › Conditional Expectation Over Finite Partitions

Conditional Expectation · Tutorial 329 of 994

Conditional Expectation Over Finite Partitions

Compute conditional expectations from finite partitions by finding the average on each positive-probability cell and assembling those values into a piecewise-constant random variable.

Intermediate 9 min read

What You'll Learn

  • Define conditional expectation when the available information is a finite event partition.
  • Calculate cellwise conditional means using probabilities and integrals.
  • Assemble the cellwise means into a piecewise-constant random variable.
  • Handle partition cells with probability zero correctly.
  • Verify the finite-partition formula from the defining integral conditions.
  • Recognize common errors involving unconditional averages and null cells.

Information as a Finite Partition

Conditioning means calculating an average using information that is available. Sometimes that information is not a numerical measurement but a finite classification: a patient is in one of several treatment groups, a day belongs to one of several weather categories, or an experiment falls into one of a finite number of outcome classes. Once the observed cell is known, the conditional mean is the average within that cell.

The result is itself a random variable. Before the cell is observed, its value depends on which cell occurs; after the cell is known, the corresponding average is fixed. This makes conditional expectation over a finite partition a particularly concrete case of conditioning.

Definition: A finite partition of the sample space \(\Omega\) is a collection \(\mathcal P=\{A_1,\ldots,A_k\}\) of pairwise disjoint events whose union is \(\Omega\). The information supplied by the partition is the sigma-field \(\sigma(\mathcal P)\), consisting of all unions of its cells. If \(X\) is integrable, its conditional expectation given this information is denoted \(E[X\mid \sigma(\mathcal P)]\). It is an integrable, \(\sigma(\mathcal P)\)-measurable random variable \(Z\) such that
$$ \int_B Z\,dP=\int_B X\,dP \qquad\text{for every }B\in\sigma(\mathcal P). $$

Here, integrability means \(E[|X|]<\infty\), so the expectations and cell integrals used below exist as finite quantities. Because every event in \(\sigma(\mathcal P)\) is a union of cells, the defining condition can be checked cell by cell. In particular, the information in this partition distinguishes which cell occurred, but it does not distinguish outcomes within a cell.

The Cellwise Average Formula

For a cell \(A_i\) with positive probability, the average of \(X\) on that cell is \(E[X\mathbf 1_{A_i}]/P(A_i)\), where \(\mathbf 1_{A_i}\) is one on \(A_i\) and zero elsewhere. The finite-partition formula assigns this average as the conditional expectation throughout the cell.

Theorem: Let \(X\) be integrable and let \(\mathcal P=\{A_1,\ldots,A_k\}\) be a finite partition. Define
$$ m_i= \begin{cases} \dfrac{E[X\mathbf 1_{A_i}]}{P(A_i)},&P(A_i)>0,\\[6pt] 0,&P(A_i)=0. \end{cases} $$
Then
$$ E[X\mid \sigma(\mathcal P)] =\sum_{i=1}^{k}m_i\mathbf 1_{A_i} \quad\text{almost surely}. $$
Thus, on every positive-probability cell \(A_i\), the conditional expectation is constant and equals the cellwise average of \(X\).

The value chosen on a zero-probability cell does not affect the conditional expectation as a random variable up to almost-sure equality. Choosing zero is a convenient convention; it does not mean that an average conditional on that cell can be calculated.

Why the Formula Works

The formula follows directly from the defining conditions for a finite partition. The proposed random variable assigns one constant to each cell, and its integral over a cell agrees with the integral of \(X\) over that cell. Those agreements add up for any union of cells.

1
Construct a cellwise-constant variable.
Set \(Z=\sum_{i=1}^k m_i\mathbf 1_{A_i}\). Since each \(A_i\) belongs to \(\sigma(\mathcal P)\), \(Z\) is measurable with respect to that sigma-field. It is integrable because it takes only finitely many finite values.
2
Check a positive-probability cell.
If \(P(A_i)>0\), then \(Z=m_i\) on \(A_i\), so \(\int_{A_i}Z\,dP=m_iP(A_i)=E[X\mathbf 1_{A_i}]=\int_{A_i}X\,dP\).
3
Check a null cell.
If \(P(A_i)=0\), both \(\int_{A_i}Z\,dP\) and \(\int_{A_i}X\,dP\) are zero. For the latter, integrability ensures that the integral over a null event is zero.
4
Extend the check to every available event.
Each \(B\in\sigma(\mathcal P)\) is a union of some cells. Add the cellwise integral equalities over those cells to obtain \(\int_B Z\,dP=\int_B X\,dP\). Thus \(Z\) satisfies the defining conditions.

The cell values are also forced on every positive-probability cell. If another \(\sigma(\mathcal P)\)-measurable variable satisfies the defining conditions, it is constant on each cell; calling its value on \(A_i\) \(c_i\), the condition for \(B=A_i\) gives \(c_iP(A_i)=E[X\mathbf 1_{A_i}]\). For \(P(A_i)>0\), division gives \(c_i=m_i\). Any difference can occur only on null cells, so the two variables are equal almost surely.

Worked Examples

Worked Example: A Finite Outcome Space

An experiment has five outcomes with probabilities and associated values of \(X\) as follows. The available information reveals whether the outcome is in \(A=\{\omega_1,\omega_2,\omega_3\}\) or \(B=\{\omega_4,\omega_5\}\). Find \(E[X\mid \sigma(\{A,B\})]\).

OutcomeProbabilityValue of \(X\)Partition cell
\(\omega_1\)0.100\(A\)
\(\omega_2\)0.202\(A\)
\(\omega_3\)0.304\(A\)
\(\omega_4\)0.151\(B\)
\(\omega_5\)0.255\(B\)

The probabilities sum to \(0.10+0.20+0.30+0.15+0.25=1\), and \(P(A)=0.60\), \(P(B)=0.40\). On \(A\), the probability-weighted total of \(X\) is

$$ E[X\mathbf 1_A]=(0.10)(0)+(0.20)(2)+(0.30)(4)=1.60. $$

Therefore the average on \(A\) is \(1.60/0.60=8/3\). On \(B\), the weighted total is \((0.15)(1)+(0.25)(5)=1.40\), so its average is \(1.40/0.40=3.5\). Hence

$$ E[X\mid \sigma(\{A,B\})] =\frac{8}{3}\mathbf 1_A+3.5\mathbf 1_B. $$

This variable takes the value \(8/3\) for each outcome in \(A\) and \(3.5\) for each outcome in \(B\). As a check, its expectation is \((0.60)(8/3)+(0.40)(3.5)=1.6+1.4=3.0\), which equals \(E[X]\) computed from all five outcomes.

Worked Example: A Continuous Variable Divided Into Ranges

Let \(X\sim\operatorname{Unif}(0,4)\), and suppose the available information identifies which of the three ranges \([0,1)\), \([1,3)\), and \([3,4]\) contains \(X\). Find the conditional expectation on each cell.

The density is \(f_X(x)=1/4\) for \(0\le x\le4\). The probabilities of the three cells are their lengths divided by 4: \(1/4\), \(2/4=1/2\), and \(1/4\). For a cell \([a,b)\) of positive probability, its conditional mean is

$$ \frac{E[X\mathbf 1_{\{a\le X<b\}}]}{P(a\le X<b)} = \frac{\int_a^b x(1/4)\,dx}{(b-a)/4} = \frac{(b^2-a^2)/8}{(b-a)/4} = \frac{a+b}{2}. $$

Thus the respective cell means are \((0+1)/2=0.5\), \((1+3)/2=2\), and \((3+4)/2=3.5\). The conditional expectation is

$$ E[X\mid \sigma(\mathcal P)] = 0.5\mathbf 1_{\{0\le X<1\}} +2\mathbf 1_{\{1\le X<3\}} +3.5\mathbf 1_{\{3\le X\le4\}}. $$

The endpoints have probability zero under this continuous distribution, so the choices of which adjacent cell contains an endpoint do not change the result almost surely. Each displayed value is an average over its range, not the value of \(X\) at every point in that range.

Worked Example: Conditioning on a Group Label

A study assigns each participant to group \(G=A\) with probability \(0.30\) or group \(G=B\) with probability \(0.70\). The joint probabilities for group and response \(X\) are given below. Find the conditional mean response given the observed group.

Group\(P(G,\ X=0)\)\(P(G,\ X=1)\)\(P(G,\ X=3)\)Group probability
\(A\)0.120.1800.30
\(B\)0.140.210.350.70

The row probabilities check: \(0.12+0.18+0=0.30\) and \(0.14+0.21+0.35=0.70\). For group \(A\), the probability-weighted response total is \((0)(0.12)+(1)(0.18)+(3)(0)=0.18\), giving mean \(0.18/0.30=0.6\). For group \(B\), it is \((0)(0.14)+(1)(0.21)+(3)(0.35)=1.26\), giving mean \(1.26/0.70=1.8\). Therefore

$$ E[X\mid \sigma(\{G=A,G=B\})] =0.6\mathbf 1_{\{G=A\}}+1.8\mathbf 1_{\{G=B\}}. $$

A useful check is the overall mean: \((0.30)(0.6)+(0.70)(1.8)=0.18+1.26=1.44\). Directly from the table, \(P(X=1)=0.18+0.21=0.39\) and \(P(X=3)=0+0.35=0.35\), so \(E[X]=(1)(0.39)+(3)(0.35)=1.44\) as well.

Common Mistakes and Practical Interpretation

A conditional expectation over a finite partition compresses the values of \(X\) within each cell into one representative average. It preserves the average on each cell, not the individual values or the full distribution within the cell. The more coarsely information divides the outcomes, the more within-cell variation the conditional mean leaves unrepresented.

  • Using the overall mean in every cell. The overall mean averages across all cells. A conditional mean for \(A_i\) uses only the probability-weighted values within \(A_i\), divided by \(P(A_i)\).
  • Dividing by the wrong probability. The numerator \(E[X\mathbf 1_{A_i}]\) is a contribution to the overall expectation. To obtain the average within the cell, divide by \(P(A_i)\), not by one or by the probability of a different cell.
  • Treating the conditional mean as the observed value. On a cell, the conditional expectation is a constant average. It need not equal any value \(X\) can take in that cell.
  • Calculating a mean on a null cell. If \(P(A_i)=0\), the ratio defining a cellwise average has denominator zero. There is no conditional average determined by that cell; its assigned value is irrelevant up to almost-sure equality.

The calculation is useful whenever information is categorical or grouped. It converts a potentially complicated random variable into a simpler function of the observed cell, while keeping the correct average within each cell. That piecewise-constant form is the key feature of conditional expectation with finite information.

Check Your Understanding

For each question, identify the relevant cell probabilities before calculating any conditional means.

  1. A partition has two cells with probabilities \(0.25\) and \(0.75\). The conditional means of \(X\) on them are 4 and 2. Write \(E[X\mid\sigma(\mathcal P)]\) using indicator functions.
  2. For a cell \(A\), suppose \(P(A)=0.4\) and \(E[X\mathbf 1_A]=1.2\). What is the cellwise conditional mean?
  3. Why does assigning zero on a zero-probability cell not change a conditional expectation up to almost-sure equality?
  4. A finite partition has three cells. Explain why checking the defining integral equality on each cell suffices to check it for every event in \(\sigma(\mathcal P)\).
  5. Can the conditional expectation on a cell differ from every value that \(X\) takes on that cell? Explain briefly.