Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

The law of total probability helps you find the probability of an event by breaking the sample space into separate cases. It is useful when an outcome can happen through several different paths, such as choosing from different groups, machines, classes, or weather conditions. Instead of trying to count event A all at once, you split the problem into partitions B1, B2, B3, and so on.

This makes complex probability questions easier to organize and solve.

Understanding Statistics: The Law of Total Probability

Each case contributes two pieces of information. First, find how common that case is in the full population. Next, find the chance of the target event within that case.

Multiplying these values gives the share of all outcomes that belong to that route. For example, suppose sixty percent of packages come from factory one, where two percent are damaged. The factory one route produces one point two percent damaged packages overall.

If the remaining forty percent come from factory two, where five percent are damaged, that route produces two percent damaged packages overall. Adding the route contributions gives a total damage chance of three point two percent.

A tree diagram can make this reasoning visible. The first set of branches represents the cases, such as factory one and factory two. Each branch then splits into the target event and its opposite.

To find one complete route, multiply the probabilities along its branches. To find an event that appears on several final branches, add those route probabilities.

A two way table does the same job when data are given as counts. Start with the count in each group, calculate how many meet the condition, then combine those counts before dividing by the total number observed.

The main challenge is choosing cases that work properly. Every possible outcome must fit into one case, with no outcome placed in two cases at once. Categories like age groups can work if their boundaries are clear.

Categories such as students who play sports and students who take music lessons usually do not work by themselves, because one student may be in both groups. In that situation, create nonoverlapping cases or use a different method.

Students should watch for wording that changes the population. The chance of rain given clouds is not the same as the chance of clouds given rain.

This method matters whenever averages hide important differences between groups. A school may compare overall test pass rates while class sizes and teaching methods differ. A hospital may estimate the reliability of a screening result across age groups.

An online shop may predict late deliveries using different shipping services. In each setting, a group with a high within group rate may have little effect if that group is rare. This is why the size of every group must be included.

The same total probability found from all routes later becomes the full chance of the observed evidence when working backward with Bayes theorem. Careful labels, a sketch of the cases, and a final check that the contributions add to a sensible probability help prevent errors.

Key Facts

  • If B1, B2, ..., Bn form a partition of the sample space, then P(A) = P(A|B1)P(B1) + P(A|B2)P(B2) + ... + P(A|Bn)P(Bn).
  • A partition means the events B1, B2, ..., Bn are mutually exclusive and together cover the whole sample space S.
  • Mutually exclusive means P(Bi and Bj) = 0 for i not equal to j.
  • The multiplication rule gives P(A and Bi) = P(A|Bi)P(Bi).
  • The law of total probability can also be written as P(A) = sum from i = 1 to n of P(A and Bi).
  • Bayes' theorem uses total probability in the denominator: P(Bk|A) = P(A|Bk)P(Bk) / P(A).

Vocabulary

Sample space
The sample space is the set of all possible outcomes of a random experiment.
Partition
A partition is a collection of non-overlapping events that together include every outcome in the sample space.
Conditional probability
Conditional probability P(A|B) is the probability that event A occurs given that event B has occurred.
Mutually exclusive
Mutually exclusive events cannot happen at the same time.
Bayes' theorem
Bayes' theorem updates the probability of a cause or condition after observing new evidence.

Common Mistakes to Avoid

  • Forgetting to check that the B events form a partition is wrong because the law of total probability requires the cases to be non-overlapping and complete.
  • Adding P(A|B1), P(A|B2), and P(A|B3) directly is wrong because each conditional probability must be weighted by the probability of its case.
  • Using P(A|B) as if it were the same as P(B|A) is wrong because reversing the condition usually changes the probability.
  • Leaving out one possible case is wrong because the total probability must include every way event A can occur within the sample space.

Practice Questions

  1. 1 A factory uses Machine 1 for 60% of its products and Machine 2 for 40%. Machine 1 makes defective products 2% of the time, and Machine 2 makes defective products 5% of the time. What is the probability that a randomly selected product is defective?
  2. 2 A school has 30% freshmen, 25% sophomores, 25% juniors, and 20% seniors. The probabilities that a student in each group takes physics are 0.40, 0.35, 0.30, and 0.25 respectively. What is the probability that a randomly selected student takes physics?
  3. 3 Explain why the law of total probability would not be valid if B1, B2, B3, and B4 overlap or fail to cover the entire sample space.