The law of total probability describes how to calculate the overall probability of an event by accounting for all the different ways it can happen. It’s especially helpful when the event depends on a set of distinct categories or conditions, each with its own likelihood. This law allows you to break down a complex probability problem into manageable parts.
The law of total probability applies when the possible scenarios (called B1, B2, etc.) are mutually exclusive (they don’t overlap) and exhaustive (they cover all possibilities). The law combines the conditional probability of the event happening under each scenario, weighted by each scenario’s likelihood.
Law of Total Probability Formula
The law of total probability formula looks like this:
P(A) = P(A | B1) × P(B1) + P(A | B2) × P(B2) + …
Here’s what each part means:
-
P(A): The total probability of the event you’re interested in.
-
P(A | B1): The probability of A given that B1 has occurred. This is a conditional probability.
-
P(B1): The probability that B1 occurs on its own.
Each term—P(A | Bi) × P(Bi)—represents one path by which A could happen. You multiply the probability of the condition (Bi) by the probability of A happening under that condition (A | Bi). Adding up all these weighted paths gives you the total probability of A.
In essence, the law of total probability is a weighted average. It combines the probabilities of A across different scenarios (the Bi events), weighting each one by how likely that scenario is to occur, and summing the products. The more common the scenario, the more it influences the total.
Example Calculation
Let’s use the law of total probability in an example calculation.
Suppose a company has two factories. Each factory produces a different proportion of the company’s total production and has its own defect rate.
| Factory | Production % | Defect Rate |
| 1 | 70% | 2% |
| 2 | 30% | 5% |
What is the total probability that a randomly selected item is defective?
Let’s apply the formula:
P(defective) = P(defective | Factory 1) × P(Factory 1) + P(defective | Factory 2) × P(Factory 2)
P(defective) = 0.02 × 0.70 + 0.05 × 0.30
P(defective) = 0.014 + 0.015 = 0.029
So, the total probability that a product is defective is 0.029, or 2.9%.
This result gives more weight to Factory 1’s defect rate because it produces a larger portion of the items. Although Factory 2 has a higher defect rate, it contributes less to the overall defect probability. The law of total probability accounts for both the likelihood of each condition and the probability of the event under that condition.
This law is especially useful in problems involving conditional probability and is often a key step in applying Bayes’ Theorem.
« Back to Glossary Index