Law of total expectation
The law of total expectation states that a random variable’s expectation equals the expectation of its conditional expectation given another variable or partition. It lets an average be computed by averaging conditional averages.