Law of Total Probability
Updated · exact formulas, double precision
P(B) = P(B | A₁)·P(A₁) + P(B | A₂)·P(A₂) + … + P(B | Aₙ)·P(Aₙ)
The law of total probability finds the chance of an event by splitting the world into cases (A₁, A₂, …) that don't overlap and cover every possibility, then adding the chance of B in each case weighted by how likely that case is.
How to use the law of total probability
- Choose cases that don't overlap and together cover everything (each part comes from exactly one machine).
- Write the probability of each case, P(Aᵢ). They must add up to 1.
- Write the probability of B within each case, P(B | Aᵢ).
- Multiply in each row and add the results.
Example: defective parts from three machines
| Machine | Share of parts | Defect rate | Contribution |
|---|---|---|---|
| A | 50% | 1% | 0.005 |
| B | 30% | 2% | 0.006 |
| C | 20% | 5% | 0.010 |
| Total | 100% | 0.021 |
So 2.1% of all parts are defective.
Connection to Bayes' theorem
The total probability is the denominator in Bayes' theorem. If a part is defective, the chance it came from machine C is 0.010 ÷ 0.021 ≈ 47.6%, even though C makes only 20% of the parts. The conditional probability calculator does this for two cases. More rules are on the probability formulas page.
Questions people ask
What is the law of total probability?
P(B) = Σ P(B|Aᵢ)·P(Aᵢ) over non-overlapping cases that cover everything.
Sources
More probability calculators
- Probability Calculator
- Conditional Probability (Bayes) Calculator
- Z-Score Calculator
- Normal Distribution Calculator
- P-Value Calculator
- Binomial Probability Calculator
- Poisson Distribution Calculator
- Expected Value Calculator
- Discrete Probability Distribution Calculator
- Odds to Probability Calculator
- Dice Probability Calculator
- Permutation and Combination Calculator