Conditional Expectation as a Cellwise Average
Conditioning on a partition means retaining the information of which cell contains the outcome, while setting aside distinctions between outcomes in the same cell. The conditional expectation of a random variable is therefore constant within each cell. Its value on a cell is the average of the variable over that cell, with outcomes weighted by their probabilities. This makes conditional expectation a random variable: its value depends on which cell occurs.
Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \(\mathcal{P}=\{A_1,\ldots,A_m\}\) be a finite measurable partition of \(\Omega\): its cells are pairwise disjoint and their union is \(\Omega\). Cells are allowed to have probability zero. The sigma-field generated by the partition, denoted \(\sigma(\mathcal{P})\), consists of all unions of cells. Let \(X\) be an integrable random variable, meaning \(\mathbb{E}[|X|]<\infty\).
The ratio defining \(c_r\) is the conditional average on the event \(A_r\); it is defined only when \(\mathbb{P}(A_r)>0\). Equivalently, for such a cell, \(c_r=\mathbb{E}[X\mid A_r]\). The zero-probability convention does not assert that a particular average exists there: changing the assigned value on such a cell changes the random variable only on an event of probability zero.
The definition can also be characterized by two requirements. The conditional expectation must be measurable with respect to \(\sigma(\mathcal{P})\), so it uses only the information of which cell occurred. And for every event \(B\in\sigma(\mathcal{P})\), its integral over \(B\) must agree with that of \(X\). In symbols, \(\mathbb{E}[X\mathbf{1}_B]=\mathbb{E}[\mathbb{E}[X\mid\sigma(\mathcal{P})]\mathbf{1}_B]\). These requirements explain why averaging separately on each cell gives the right answer.
Proof. Let \(c_r\) be the cell averages in the definition, and set \(Y=\sum_r c_r\mathbf{1}_{A_r}\). This is measurable with respect to \(\sigma(\mathcal{P})\), since it is constant on each cell. For a positive-probability cell, \(|c_r|\mathbb{P}(A_r)\leq\mathbb{E}[|X|\mathbf{1}_{A_r}]\), so \(\mathbb{E}[|Y|]\leq\sum_r\mathbb{E}[|X|\mathbf{1}_{A_r}]=\mathbb{E}[|X|]<\infty\). A probability-zero cell contributes zero to both sides of this bound. Every \(B\in\sigma(\mathcal{P})\) is a union of some of the cells. On a cell \(A_r\) of positive probability, \(\mathbb{E}[Y\mathbf{1}_{A_r}]=c_r\mathbb{P}(A_r)=\mathbb{E}[X\mathbf{1}_{A_r}]\). On a probability-zero cell both integrals are zero, since \(X\) and \(Y\) are integrable. Adding the equalities over the cells in \(B\) proves the required integral identity. For uniqueness, any \(\sigma(\mathcal{P})\)-measurable random variable is constant almost surely on each cell: its measurable level sets are unions of cells, so no cell can be split into parts on which the variable takes different values, except on a null set. If another such variable has value \(d_r\) almost surely on \(A_r\), the integral identity applied to \(B=A_r\) gives \(d_r\mathbb{P}(A_r)=\mathbb{E}[X\mathbf{1}_{A_r}]\). When \(\mathbb{P}(A_r)>0\), this forces \(d_r=c_r\). The values on probability-zero cells do not affect almost-sure equality. Thus the variable is unique up to equality almost surely. \(\square\)
For a finite partition, the integral identity only needs to be checked cell by cell: any event in \(\sigma(\mathcal{P})\) is a union of cells, and its integral is the sum of the cell integrals. The formula also makes clear that conditioning does not mean taking an unweighted average of the possible values of \(X\). Probabilities determine how much each value contributes.
Worked Example: A Discrete Variable on Two Cells
Let \(\Omega=\{\omega_1,\omega_2,\omega_3,\omega_4\}\), with probabilities \(\tfrac18,\tfrac38,\tfrac14,\tfrac14\), respectively. Let \(X\) take values \(0,4,2,6\) at those outcomes. Use the partition \(A_1=\{\omega_1,\omega_2\}\), \(A_2=\{\omega_3,\omega_4\}\), and find \(\mathbb{E}[X\mid\sigma(\mathcal{P})]\).
First, the cell probabilities are \(\mathbb{P}(A_1)=\tfrac18+\tfrac38=\tfrac12\) and \(\mathbb{P}(A_2)=\tfrac14+\tfrac14=\tfrac12\). The contributions of the outcomes in \(A_1\) to \(\mathbb{E}[X\mathbf{1}_{A_1}]\) are \(0\cdot\tfrac18=0\) and \(4\cdot\tfrac38=\tfrac32\). Thus its cell average is \(\tfrac32/(\tfrac12)=3\). In \(A_2\), the contributions are \(2\cdot\tfrac14=\tfrac12\) and \(6\cdot\tfrac14=\tfrac32\), giving average \((\tfrac12+\tfrac32)/(\tfrac14+\tfrac14)=2/(\tfrac12)=4\). Therefore the conditional expectation is \(3\) on \(A_1\) and \(4\) on \(A_2\).
Check: On \(A_1\), the integral of the answer is \(3(\tfrac12)=\tfrac32\), matching the computed contribution from \(X\). On \(A_2\), it is \(4(\tfrac12)=2\), also matching. Over the whole space, \(\mathbb{E}[X]=0+\tfrac32+\tfrac12+\tfrac32=\tfrac72\), while the expectation of the answer is \(3(\tfrac12)+4(\tfrac12)=\tfrac72\).
Partitions of a Continuous Sample Space
The same cell-average formula applies when the underlying random variable has a density. In that case, the expectation over a cell is an integral over the part of the density belonging to that cell, and the average is obtained by dividing by the cell probability. Endpoints can be assigned to either adjacent cell if they have probability zero under the distribution; in each example below the cells are specified explicitly to make their membership unambiguous.
Worked Example: Squaring a Uniform Variable
Let \(\Omega=[0,1]\) with the uniform probability distribution, and let \(U(\omega)=\omega\). Take \(X=U^2\) and partition \(\Omega\) into \(A_1=[0,\tfrac12)\) and \(A_2=[\tfrac12,1]\). Compute the conditional expectation of \(X\) given this partition.
Both cells have probability \(\tfrac12\). On the first cell, the integral of \(X\) is \(\int_0^{1/2}x^2\,dx=[x^3/3]_0^{1/2}=\tfrac1{24}\). Dividing by its probability gives the cell average \((\tfrac1{24})/(\tfrac12)=\tfrac1{12}\). On the second cell, the integral is \(\int_{1/2}^1x^2\,dx=[x^3/3]_{1/2}^1=\tfrac13-\tfrac1{24}=\tfrac7{24}\). Its average is \((\tfrac7{24})/(\tfrac12)=\tfrac7{12}\).
Check: The expectation of this conditional expectation is \((\tfrac1{12})(\tfrac12)+(\tfrac7{12})(\tfrac12)=\tfrac1{24}+\tfrac7{24}=\tfrac13\). Direct integration gives \(\mathbb{E}[U^2]=\int_0^1x^2\,dx=[x^3/3]_0^1=\tfrac13\), as required.
Worked Example: A Nonuniform Density
Let \(U\) have density \(f_U(x)=2x\) for \(0\leq x\leq1\), and zero elsewhere. This is a probability density because \(\int_0^1 2x\,dx=[x^2]_0^1=1\). Set \(X=U\), and use \(A_1=\{0\leq U<\tfrac12\}\) and \(A_2=\{\tfrac12\leq U\leq1\}\). Find \(\mathbb{E}[U\mid\sigma(\mathcal{P})]\).
The probability of \(A_1\) is \(\int_0^{1/2}2x\,dx=[x^2]_0^{1/2}=\tfrac14\); the probability of \(A_2\) is \(\int_{1/2}^1 2x\,dx=1-\tfrac14=\tfrac34\). For the first cell, the integral of \(U\) over that cell is \(\int_0^{1/2}x(2x)\,dx=\int_0^{1/2}2x^2\,dx=[\tfrac23x^3]_0^{1/2}=\tfrac1{12}\). Dividing by \(\tfrac14\) gives the average \(\tfrac13\). For the second cell, its integral is \(\int_{1/2}^1 2x^2\,dx=[\tfrac23x^3]_{1/2}^1=\tfrac23-\tfrac1{12}=\tfrac7{12}\). Dividing by \(\tfrac34\) gives \(\tfrac79\).
Check: Weighting the two cell averages by their probabilities gives \((\tfrac13)(\tfrac14)+(\tfrac79)(\tfrac34)=\tfrac1{12}+\tfrac7{12}=\tfrac23\). Directly, \(\mathbb{E}[U]=\int_0^1x(2x)\,dx=[\tfrac23x^3]_0^1=\tfrac23\). The different cell probabilities matter: the two intervals have equal length, but they do not have equal probability under this density.
Consequences and a Common Pitfall
Proof. The whole space \(\Omega\) belongs to \(\sigma(\mathcal{P})\), so the integral identity in the cellwise characterization, applied to \(B=\Omega\), gives \(\mathbb{E}[Y]=\mathbb{E}[X]\). Now suppose \(a\leq X\leq b\) almost surely. For every cell \(A_r\) of positive probability, integrating these inequalities over \(A_r\) gives \(a\mathbb{P}(A_r)\leq\mathbb{E}[X\mathbf{1}_{A_r}]\leq b\mathbb{P}(A_r)\). Division by the positive number \(\mathbb{P}(A_r)\) gives \(a\leq c_r\leq b\). Values on probability-zero cells do not affect the almost-sure assertion. \(\square\)
A common mistake is to take an ordinary average of the listed outcomes in a cell, giving every outcome equal weight. In the discrete example, that mistake would assign \((0+4)/2=2\) to \(A_1\), instead of the correct value \(3\). The outcomes in \(A_1\) have probabilities \(\tfrac18\) and \(\tfrac38\), so their conditional probabilities within the cell are \((\tfrac18)/(\tfrac12)=\tfrac14\) and \((\tfrac38)/(\tfrac12)=\tfrac34\). Their weighted average is \(0(\tfrac14)+4(\tfrac34)=3\). Equal weighting is justified only when the outcomes being averaged have equal conditional probabilities within the cell.
Another issue arises if a cell has probability zero: dividing by its probability is not valid. The cell-average formula is used only on positive-probability cells, and the value assigned on a null cell is immaterial to equality almost surely. More generally, \(\mathbb{E}[X\mid\sigma(\mathcal{P})]\) is a random variable that summarizes \(X\) using the information in the partition; it need not equal \(X\) outcome by outcome.
Check Your Understanding
For each question, use the cell-average definition and check any proposed answer on the relevant cells.
- A cell contains two outcomes of probabilities \(\tfrac16\) and \(\tfrac13\), on which \(X\) equals \(2\) and \(5\). What is the cell probability and its conditional average?
- For a uniform \(U\) on \([0,1]\), partition at \(\tfrac14\) into \([0,\tfrac14)\) and \([\tfrac14,1]\). Find the conditional expectation of \(U\) on each cell.
- Why can the assigned value of a conditional expectation on a probability-zero cell be changed without changing the random variable up to almost-sure equality?
- Suppose \(1\leq X\leq4\) almost surely. What bounds must hold for its conditional expectation given any finite partition, almost surely?