= Solution
The finite-partition form of the <law of total expectation> states
$$
\boxed{\mathbb E[X]=\sum_{j:\,\mathbb P(B_j)>0}\mathbb P(B_j)\,\mathbb E[X\mid B_j].}
$$
Because the <events> form a <partition of a sample space> of the <sample space>, $\sum_j\mathbf1_{B_j}=1$ pointwise. Multiply by $X$ and use <linearity of expectation> to obtain
$$
\mathbb E[X]=\sum_j\mathbb E[X\mathbf1_{B_j}]=\sum_{j:\,\mathbb P(B_j)>0}\mathbb P(B_j)\mathbb E[X\mid B_j].
$$
An <event> of zero <probability> contributes zero to the middle expression and is omitted from the final expression, so no undefined <conditional expectation> is multiplied by zero.
Back to article page