foundations of probability
Law of Total Probability
You should know: conditional probability
Overview
The law of total probability expresses the probability of an event A in terms of conditional probabilities given a partition of the sample space. If B₁, B₂, ..., Bₙ partition the sample space (they are mutually exclusive and their union is the entire space, each with positive probability), then P(A) = Σᵢ P(A|Bᵢ)P(Bᵢ). This lets you compute an overall probability by breaking a problem into cases, finding the probability of A within each case, and weighting by how likely each case is. It is one of the most widely used tools in probability for problems involving multiple scenarios, stages, or sources.
Intuition
Suppose you want to know the overall probability of rain tomorrow, but that depends on which of several weather patterns (cases) occurs. Rather than reasoning about rain directly, you break the problem apart: for each possible weather pattern, ask 'given this pattern, what's the chance of rain?' — then combine those conditional answers, weighted by how likely each pattern is to occur. That weighted average across every possible case is exactly the law of total probability: divide, conquer, and recombine.
Formal Definition
If {B₁, ..., Bₙ} is a partition of the sample space Ω with P(Bᵢ) > 0 for each i, then for any event A:
Worked Examples
Identify the partition and conditional probabilities.
Apply the law of total probability.
Compute the sum.
Answer: P(defective) = 0.032 (3.2%).
Practice Problems
A bag has two coins: a fair coin (P(H)=0.5) and a biased coin (P(H)=0.8). One coin is chosen at random and flipped. Find P(heads).
70% of emails are legitimate and 30% are spam. 1% of legitimate emails contain the word 'free', while 40% of spam emails do. Find the overall probability a random email contains 'free'.
A test for a disease is 90% accurate on sick patients and 95% accurate on healthy patients (correctly identifying each group). 2% of the population is sick. Find the probability a random person tests positive.
Quiz
Summary
- For a partition {B₁,...,Bₙ} of the sample space, P(A) = Σᵢ P(A|Bᵢ)P(Bᵢ).
- It turns a hard direct computation into an easier weighted average across disjoint cases.
- It underlies Bayes' theorem, which uses the same denominator to update probabilities given evidence.
Mathematics