Let $A_{1},…,A_{n}$ be a partition of the sample space, and assume for all $A_{i}$ that $P(A_{i})>0$. Then for any r.v. $Y$, the expectation can be expressed as

$E(Y)=i=1∑n E(Y∣A_{i})⋅P(A_{i})$## Expressing LOTP using LOTE

Consider any event $B$, and let $I_{B}$ be an Indicator variable that equals 1 if $B$ occurs, and 0 otherwise. Using the same $A_{1},…,A_{n}$ from above, we can use LOTE to express the expectation of $I_{B}$ as

$E(I_{B})=i=1∑n E(I_{B}∣A_{i})⋅P(A_{i})$Remember that $E(I_{B}∣A_{i})$ simplifies to $0+1⋅P(I_{B}∣A_{i})=P(I_{B}∣A_{i})$. Now we’re finding the probability that $I_{B}=1$, given $A_{i}$, which is equivalent to finding the probability that $B$ occurs, given $A_{i}$.

$E(I_{B})=i=1∑n P(I_{B}∣A_{i})⋅P(A_{i})=i=1∑n P(B∣A_{i})⋅P(A_{i})=P(B)$We’ve just rediscovered LOTP using LOTE. In a sense, LOTP is a special case of LOTE when the random variable we’re finding the expectation of is an indicator variable that represents that event.