In probability theory, the law (or formula) 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.
Contents
Statement
The law of total probability is the proposition that if
or, alternatively,
where, for any
The summation can be interpreted as a weighted average, and consequently the marginal probability,
The law of total probability can also be stated for conditional probabilities. Taking the
Informal formulation
The above mathematical statement might be interpreted as follows: given an outcome
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. 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.
Applications
One common application of the law is where the events coincide with a discrete random variable X taking each value in its range, i.e.
where Pr(A | X) is the conditional probability of A given the value of the random variable X. This conditional probability is a random variable in its own right, whose value depends on that of X. The conditional probability Pr(A | X = x) is simply a conditional probability given an event, [X = x]. It is a function of x, say g(x) = Pr(A | X = x). Then the conditional probability Pr(A | X) is g(X), hence itself a random variable. This version of the law of total probability says that the expected value of this random variable is the same as Pr(A).
This result can be generalized to continuous random variables (via continuous conditional density), and the expression becomes
where
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 even uses the terminology "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.