# Law of total probability

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.

## Statement

The law of total probability is[1] the proposition that if ${\displaystyle \left\{{B_{n}:n=1,2,3,\ldots }\right\}}$ is a finite or countably infinite partition of a sample space (in other words, a set of pairwise disjoint events whose union is the entire sample space) and each event ${\displaystyle B_{n}}$ is measurable, then for any event ${\displaystyle A}$ of the same probability space:

${\displaystyle \Pr(A)=\sum _{n}\Pr(A\cap B_{n})}$

or, alternatively,[1]

${\displaystyle \Pr(A)=\sum _{n}\Pr(A\mid B_{n})\Pr(B_{n}),}$

where, for any ${\displaystyle n}$ for which ${\displaystyle \Pr(B_{n})=0}$ these terms are simply omitted from the summation, because ${\displaystyle \Pr(A\mid B_{n})}$ is finite.

The summation can be interpreted as a weighted average, and consequently the marginal probability, ${\displaystyle \Pr(A)}$, is sometimes called "average probability";[2] "overall probability" is sometimes used in less formal writings.[3]

The law of total probability can also be stated for conditional probabilities. Taking the ${\displaystyle B_{n}}$ as above, and assuming ${\displaystyle C}$ is an event independent with any of the ${\displaystyle B_{n}}$:

${\displaystyle \Pr(A\mid C)=\sum _{n}\Pr(A\mid C\cap B_{n})\Pr(B_{n}\mid C)=\sum _{n}\Pr(A\mid C\cap B_{n})\Pr(B_{n})}$

## Informal formulation

The above mathematical statement might be interpreted as follows: given an event ${\displaystyle A}$, with known conditional probabilities given any of the ${\displaystyle B_{n}}$ events, each with a known probability itself, what is the total probability that ${\displaystyle A}$ will happen? The answer to this question is given by ${\displaystyle \Pr(A)}$.

## 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:

{\displaystyle {\begin{aligned}\Pr(A)&=\Pr(A\mid B_{X})\cdot \Pr(B_{X})+\Pr(A\mid B_{Y})\cdot \Pr(B_{Y})\\[4pt]&={99 \over 100}\cdot {6 \over 10}+{95 \over 100}\cdot {4 \over 10}={{594+380} \over 1000}={974 \over 1000}\end{aligned}}}

where

• ${\displaystyle \Pr(B_{X})={6 \over 10}}$ is the probability that the purchased bulb was manufactured by factory X;
• ${\displaystyle \Pr(B_{Y})={4 \over 10}}$ is the probability that the purchased bulb was manufactured by factory Y;
• ${\displaystyle \Pr(A\mid B_{X})={99 \over 100}}$ is the probability that a bulb manufactured by X will work for over 5000 hours;
• ${\displaystyle \Pr(A\mid B_{Y})={95 \over 100}}$ is the probability that a bulb manufactured by Y will work for over 5000 hours.

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.[citation needed] One author even uses the terminology "continuous law of alternatives" in the continuous case.[4] This result is given by Grimmett and Welsh[5] as the partition theorem, a name that they also give to the related law of total expectation.

## Notes

1. ^ a b Zwillinger, D., Kokoska, S. (2000) CRC Standard Probability and Statistics Tables and Formulae, CRC Press. ISBN 1-58488-059-7 page 31.
2. ^ Paul E. Pfeiffer (1978). Concepts of probability theory. Courier Dover Publications. pp. 47–48. ISBN 978-0-486-63677-1.
3. ^ Deborah Rumsey (2006). Probability for dummies. For Dummies. p. 58. ISBN 978-0-471-75141-0.
4. ^ Kenneth Baclawski (2008). Introduction to probability with R. CRC Press. p. 179. ISBN 978-1-4200-6521-3.
5. ^ Probability: An Introduction, by Geoffrey Grimmett and Dominic Welsh, Oxford Science Publications, 1986, Theorem 1B.

## References

• Introduction to Probability and Statistics by Robert J. Beaver, Barbara M. Beaver, Thomson Brooks/Cole, 2005, page 159.
• Theory of Statistics, by Mark J. Schervish, Springer, 1995.
• Schaum's Outline of Probability, Second Edition, by John J. Schiller, Seymour Lipschutz, McGraw–Hill Professional, 2010, page 89.
• A First Course in Stochastic Models, by H. C. Tijms, John Wiley and Sons, 2003, pages 431–432.
• An Intermediate Course in Probability, by Alan Gut, Springer, 1995, pages 5–6.