- Foundation
- About 17 min
- 5 practice questions
Partitions and the theorem of total probability
Recognise a partition of a sample space and find the probability of an event that can happen through several mutually exclusive routes using the theorem of total probability.
If something looks wrong, please tell us.
Sometimes an event can happen in several different ways: a ball may come from one of two bags, an item may be made by one of three machines. If we know how likely each 'way' is, and how likely the event is along each way, we can find its total probability. This needs the idea of a partition.
Partition of a sample space
Events E₁, E₂, …, Eₙ form a partition of the sample space S if (i) they are pairwise disjoint: Eᵢ ∩ Eⱼ = φ for i ≠ j; (ii) they are exhaustive: E₁ ∪ E₂ ∪ … ∪ Eₙ = S; and (iii) each has non-zero probability. Every outcome lies in exactly one of them. The simplest partition is {E, E′} for any event E with 0 < P(E) < 1.
A partition of S
-
Pairwise disjoint
- No outcome in two of the events
-
Exhaustive
- Their union is the whole of S
-
Non-zero probabilities
- P(Eᵢ) > 0 for each i
The theorem of total probability
Let E₁, …, Eₙ be a partition of S, and A any event. Since the Eⱼ cover S without overlap, A = (A ∩ E₁) ∪ (A ∩ E₂) ∪ … ∪ (A ∩ Eₙ), and these pieces are pairwise disjoint. Adding their probabilities and using the multiplication theorem on each piece, P(A ∩ Eⱼ) = P(Eⱼ) P(A|Eⱼ):
Theorem of total probability: P(A) = P(E₁) P(A|E₁) + P(E₂) P(A|E₂) + … + P(Eₙ) P(A|Eₙ).
In a tree diagram, the first set of branches are the Eⱼ; each branch then splits into A and A′. Multiply along each path ending in A and add the results.
Worked examples
Worked example 1: two bags
Bag I has 3 red and 2 black balls; bag II has 2 red and 4 black balls. A bag is chosen at random (each with probability 1/2) and a ball is drawn. Find the probability that it is red. Let E₁, E₂ be 'bag I chosen', 'bag II chosen' (a partition) and A = 'red'. P(A|E₁) = 3/5, P(A|E₂) = 2/6 = 1/3. P(A) = (1/2)(3/5) + (1/2)(1/3) = 3/10 + 1/6 = 9/30 + 5/30 = 14/30 = 7/15.
Worked example 2: three machines
In a factory (illustrative figures), machines A, B and C make 50%, 30% and 20% of the output, and 2%, 3% and 4% of their items respectively are defective. Find the probability that an item picked at random is defective. P(D) = (0.5)(0.02) + (0.3)(0.03) + (0.2)(0.04) = 0.010 + 0.009 + 0.008 = 0.027, that is 2.7% of all items.
| Machine | P(machine) | P(defective | machine) | Product |
|---|---|---|---|
| A | 0.5 | 0.02 | 0.010 |
| B | 0.3 | 0.03 | 0.009 |
| C | 0.2 | 0.04 | 0.008 |
| Total | 1 | 0.027 |
Worked example 3: an unseen first draw
An urn has 4 white and 3 black balls. One ball is drawn and put aside without its colour being seen; then a second ball is drawn. Find the probability that the second ball is white. Partition by the first ball: W₁ (white, 4/7) or B₁ (black, 3/7). P(second white | W₁) = 3/6 and P(second white | B₁) = 4/6. Total: (4/7)(3/6) + (3/7)(4/6) = 12/42 + 12/42 = 24/42 = 4/7, the same as for the first draw. An unseen draw gives no information, so it does not change the chance.
Worked example 4: a coin decides the urn
A coin is tossed. On a head, a ball is drawn from urn X (3 white, 1 black); on a tail, from urn Y (1 white, 3 black). P(white) = (1/2)(3/4) + (1/2)(1/4) = 3/8 + 1/8 = 1/2.
Key takeaways
- A partition is a set of pairwise disjoint, exhaustive events with non-zero probabilities.
- P(A) = Σ P(Eⱼ) P(A|Eⱼ): weight each route's conditional probability by the chance of that route.
- Check that the P(Eⱼ) add to 1 before using them.
- A table or tree keeps the products organised.
- The theorem of total probability is the denominator of Bayes' theorem in the next lesson.
Check your understanding
-
1. A die is thrown. Which collection of events is a partition of its sample space?
- {1, 2, 3} and {3, 4, 5, 6}
- {1, 2} and {4, 5, 6}
- {1, 2}, {3, 4} and {5, 6}
- 'even' and 'prime'
Show answer
Answer: C. {1, 2}, {3, 4}, {5, 6} do not overlap, together cover all six outcomes, and each has probability 1/3. The first pair overlaps at 3, the second misses 3, and 'even' and 'prime' overlap at 2.
-
2. Bag I has 2 red and 3 black balls; bag II has 4 red and 1 black ball. A bag is chosen at random and a ball drawn. What is the probability that it is red?
- 7/10
- 3/5
- 2/5
- 4/5
Show answer
Answer: B. P(red) = (1/2)(2/5) + (1/2)(4/5) = 1/5 + 2/5 = 3/5. Simply adding the red balls and dividing by all ten balls also gives 6/10 = 3/5 here only because the bags are equally likely and the same size.
-
3. Machines P and Q make 60% and 40% of the output, with 1% and 2% defective respectively. What is the probability that a randomly chosen item is defective?
- 0.03
- 0.015
- 0.012
- 0.014
Show answer
Answer: D. P(D) = (0.6)(0.01) + (0.4)(0.02) = 0.006 + 0.008 = 0.014.
-
4. A coin is tossed; a head means urn X (3 white, 1 black) is used and a tail means urn Y (1 white, 3 black). What is the probability of drawing a white ball?
- 1/2
- 3/4
- 1/4
- 3/8
Show answer
Answer: A. P(white) = (1/2)(3/4) + (1/2)(1/4) = 3/8 + 1/8 = 1/2.
-
5. Assertion (A): For any events A and E with 0 < P(E) < 1, P(A) = P(E) P(A|E) + P(E′) P(A|E′). Reason (R): E and E′ form a partition of the sample space.
- Both A and R are true, and R is the correct explanation of A
- Both A and R are true, but R is not the correct explanation of A
- A is true, but R is false
- A is false, but R is true
Show answer
Answer: A. E and E′ are disjoint, exhaustive and both have non-zero probability, so they form a partition (R). The theorem of total probability for this two-event partition is exactly A.
Sign in to keep track of the lessons you finish.