For an integrable random variable , the law of total expectation for the partition of a sample space is
Parts of zero probability contribute zero and need no definition of . To see the identity, write and use linearity of expectation; integrability justifies the countable sum since .
The events form a partition of a sample space when they are pairwise disjoint sets and cover the whole sample space:
Thus exactly one of these events occurs on every outcome. Under the usual set partition convention the parts are nonempty; empty parts can simply be discarded.
A partition of a sample space is a finite or countable family of pairwise disjoint events whose union is the whole sample space. If is integrable, the law of total expectation states
This follows by summing over the partition of a sample space; absolute integrability justifies the countable sum. For nonnegative , the identity also holds with infinite expectations. Zero-probability parts contribute zero without requiring a conditional value on them.
Apply the law of total expectation to the partition of a sample space given by the possible values of . Since the conditional mean is affine,
Here . This uses linearity of expectation and does not assert independence of successive urn counts.
The finite-partition form of the law of total expectation states
Because the events form a partition of a sample space of the sample space, pointwise. Multiply by and use linearity of expectation to obtain
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.
A partition of a sample space is a finite or countable family of pairwise disjoint events whose union is the whole sample space. For an integrable random variable, the partition form of the law of total expectation is
Zero-probability cells contribute zero and are omitted because elementary event-conditioning on them is undefined. The formula also holds with extended nonnegative values when . Integrability makes the signed series legitimate in the finite-expectation case.