Law of total probability


In probability theory, the law of total probability is a fundamental rule relating marginal probabilities to conditional probabilities. It expresses the total probability of an outcome which can be realized via several distinct events—hence the name.

Statement

The law of total probability is the proposition that if is a finite or countably infinite partition of a sample space and each event is measurable, then for any event of the same probability space:
or, alternatively,
where, for any for which these terms are simply omitted from the summation, because is finite.
The summation can be interpreted as a weighted average, and consequently the marginal probability,, is sometimes called "average probability"; "overall probability" is sometimes used in less formal writings.
The law of total probability can also be stated for conditional probabilities.
Taking the as above, and assuming is an event independent of any of the :

Informal formulation

The above mathematical statement might be interpreted as follows: given an event, with known conditional probabilities given any of the events, each with a known probability itself, what is the total probability that will happen? The answer to this question is given by.

Example

Suppose that two factories supply light bulbs to the market. Factory X's bulbs work for over 5000 hours in 99% of cases, whereas factory Y's bulbs work for over 5000 hours in 95% of cases. It is known that factory X supplies 60% of the total bulbs available and Y supplies 40% of the total bulbs available. What is the chance that a purchased bulb will work for longer than 5000 hours?
Applying the law of total probability, we have:
where
Thus each purchased light bulb has a 97.4% chance to work for more than 5000 hours.

Other names

The term law of total probability is sometimes taken to mean the law of alternatives, which is a special case of the law of total probability applying to discrete random variables. One author uses the terminology of the "Rule of Average Conditional Probabilities", while another refers to it as the "continuous law of alternatives" in the continuous case. This result is given by Grimmett and Welsh as the partition theorem, a name that they also give to the related law of total expectation.