Random Variables · Expected Value
Lesson 11
Theorem (law of total expectation). Let \(\alpha \colon U \to \mathbb{R}\) be a random variable and the probability space \(U\) be represented as a disjoint union of \(n\) events of positive probability: \[U = \bigsqcup_{i=1}^{n}A_{i} \ .\] Then, if \(\operatorname{E}[\alpha]\) is finite, we have \[\operatorname{E}[\alpha]=\sum_{i=1}^{n}\operatorname{E}[\alpha \mid A_{i}]\Pr[A_{i}] \ .\]
Proof. \[\begin{align*}\operatorname{E}[\alpha]&=\sum_{a}a\cdot \Pr[\alpha=a]=\\&=\sum_{a}a\cdot \sum_{i=1}^{n}\Pr[\alpha=a \mid A_{i}]\Pr[A_{i}]=\\&=\sum_{a}\sum_{i=1}^{n}a\cdot \Pr[\alpha=a \mid A_{i}]\Pr[A_{i}]=\\&=\sum_{i=1}^{n}\sum_{a}a\cdot \Pr[\alpha=a \mid A_{i}]\Pr[A_{i}]=\\&=\sum_{i=1}^{n}\Pr[A_{i}]\sum_{a}a\cdot \Pr[\alpha=a \mid A_{i}]=\\&=\sum_{i=1}^{n}\Pr[A_{i}]\operatorname{E}[\alpha \mid A_{i}] \ .\end{align*}\]◼
This theorem is useful when, upon occurrence of events \(A_{i}\), it is easier to compute expectation \(\alpha\). In the problem below, such values are given, and it remains to substitute them into the formula.