Expectation and Variance - Key Proof
We present a complete proof of the Law of Total Expectation, a fundamental result that connects conditional and unconditional expectations.
Law of Total Expectation
Let and be random variables. Then:
More generally, if is a partition of the sample space:
We prove the discrete case; the continuous case follows analogously using integrals.
Discrete Case (Partition Formula): Let be a partition with for all .
By definition of conditional expectation:
Therefore:
Rearranging the sums:
By the law of total probability:
Substituting: β‘
General Case (): When conditioning on a random variable rather than a partition, we use the fact that is itself a random variable (a function of ).
For discrete taking values :
This is precisely the partition formula with .
For continuous with density :
By the definition of conditional expectation:
Therefore:
Interchanging the order of integration (by Fubini's theorem):
Since (joint density):
The inner integral gives the marginal density : β‘
Applications and Consequences
Computing Expectation via Conditioning: Roll a fair die. If the result is even, toss that many fair coins; if odd, toss one coin. Let = number of heads.
Let be the die outcome. Partition by whether is even or odd:
When is even ():
When is odd:
Therefore:
Recursive Calculation: A geometric random variable can be computed recursively.
On the first trial, either we succeed (probability , giving ), or we fail (probability , and we're back at the start):
Solving:
The law of total expectation is an indispensable tool for computing expectations in complex situations. By conditioning on an appropriate random variable or partition, we can break difficult problems into simpler conditional pieces, then reassemble the result.