# Law of total probability

If events B1, B2, ... split all outcomes into separate cases, then P(A) is the sum of P(A given Bi) x P(Bi). You weigh the chance of A in each case by how likely the case is.

Statistics (university) · Part 02: Probability · Card 6 of 8 · Last updated 2026-10-19

## Analogy

To find your average journey time, weigh the time on each route by how often you take that route.

## Example

**Two machines**

Machine A: 60% of output, 2% defective
Machine B: 40% of output, 5% defective
P(defect) = 0.6 x 0.02 + 0.4 x 0.05
= 0.012 + 0.020 = 0.032

## In practice

Used to find an overall rate from several sources, such as defects from several machines.

## Practice

### Flashcards

- **What does the law of total probability add up?** P(A given Bi) x P(Bi) over all separate cases Bi.

## Questions people ask

### When do I use the law of total probability?

Use it when the overall chance of an event is hard to find directly but easy within separate cases. Split the situation into cases that do not overlap and cover everything, find the chance within each, then weight and add. It is the first step of Bayes' theorem.

### Do the case probabilities have to add up to 1?

Yes. The cases must cover every possibility and not overlap, so their probabilities sum to 1. In the machine example, 0.6 plus 0.4 is 1. If they sum to something else, you either missed a case or counted one twice, so recheck how you split the situation before you calculate anything further.

## Related concepts

- [Conditional probability](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-2/statistics-university-part-2-concept-5)
- [Bayes' theorem](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-2/statistics-university-part-2-concept-7)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-2/statistics-university-part-2-concept-6
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-2-concept-6
