Partition of a sample space and total probability
If E₁, E₂, ..., Eₙ partition the sample space, then for any event A, P(A) = Σ P(Eᵢ) P(A|Eᵢ). Add the chance of A along every branch.
What a partition is
A partition cuts the sample space into pieces that do not overlap and cover everything, each with a non-zero chance. Example: every bolt in a factory comes from exactly one of machines X, Y and Z. So the events 'from X', 'from Y' and 'from Z' form a partition. The theorem of total probability says: to find the chance of an event A (say, 'the bolt is defective'), add its chance through each piece.
Proof of the theorem
- 1A = A ∩ S = A ∩ (E₁ ∪ E₂ ∪ ... ∪ Eₙ)
- 2= (A ∩ E₁) ∪ (A ∩ E₂) ∪ ... ∪ (A ∩ Eₙ)
- 3These pieces are pairwise disjoint, because the Eᵢ are.
- 4So P(A) = P(A ∩ E₁) + P(A ∩ E₂) + ... + P(A ∩ Eₙ).
- 5By the multiplication theorem, P(A ∩ Eᵢ) = P(Eᵢ) P(A|Eᵢ).
- 6★So, P(A) = Σ P(Eᵢ) P(A|Eᵢ), summed over i = 1 to n.
★ key step
How to draw a tree diagram
- Start with a dot on the left.
- Draw one branch for each Eᵢ and write P(Eᵢ) on it. These must add up to 1.
- From the end of each branch, draw a branch for A and write P(A|Eᵢ) on it.
- Multiply along each path to get P(Eᵢ) P(A|Eᵢ), and write it at the tip.
- Add the tips that end in A: that sum is P(A).
Example 1: three machines
Machines X, Y and Z make 50%, 30% and 20% of the bolts in a factory. Of their bolts, 2%, 3% and 4% are defective. Find the probability that a bolt picked at random is defective.
- E₁, E₂, E₃: the bolt is from X, Y, Z. P(E₁) = 0.5, P(E₂) = 0.3, P(E₃) = 0.2 (sum 1).
- D: the bolt is defective. P(D|E₁) = 0.02, P(D|E₂) = 0.03, P(D|E₃) = 0.04.
- P(D) = 0.5 × 0.02 + 0.3 × 0.03 + 0.2 × 0.04
- = 0.010 + 0.009 + 0.008 = 0.027
P(D) = 0.027, so 2.7% of the bolts are defective.
Example 2: two bags
Bag I has 4 green and 2 white marbles. Bag II has 3 green and 5 white marbles. A coin is tossed: heads, pick Bag I; tails, pick Bag II. One marble is drawn. Find the probability that it is green.
- P(Bag I) = P(Bag II) = 1/2
- P(green | Bag I) = 4/6 = 2/3; P(green | Bag II) = 3/8
- P(green) = 1/2 × 2/3 + 1/2 × 3/8 = 1/3 + 3/16
- = 16/48 + 9/48 = 25/48
P(green) = 25/48.
Example 3: a die decides the box
A die is thrown. If it shows 1 or 2, a card is drawn from Box A, which has 3 prize cards among 10. Otherwise a card is drawn from Box B, which has 1 prize card among 5. Find the probability of drawing a prize card.
- P(Box A) = 2/6 = 1/3; P(Box B) = 4/6 = 2/3
- P(prize | A) = 3/10; P(prize | B) = 1/5
- P(prize) = 1/3 × 3/10 + 2/3 × 1/5 = 1/10 + 2/15
- = 3/30 + 4/30 = 7/30
P(prize) = 7/30.
A dairy cooperative collects milk from several villages. If it knows each village's share and how often its cans fail the quality test, total probability gives the chance that any can fails.
1 marks: “Write the theorem of total probability for the partition E, E′.” P(A) = P(E) P(A|E) + P(E′) P(A|E′).
2 marks: “A coin is tossed. If it shows heads, a ball is drawn from Bag A (2 red, 3 blue); if tails, from Bag B (4 red, 1 blue). Find the probability that the ball is red.” P(red) = 1/2 × 2/5 + 1/2 × 4/5 = 1/5 + 2/5 = 3/5.
3 marks: “In a city, 50% of office workers travel by bus, 30% by metro and 20% by auto. The chances of being late are 10%, 5% and 15%. Find the probability that a worker chosen at random is late.” P(late) = 0.5 × 0.10 + 0.3 × 0.05 + 0.2 × 0.15 = 0.05 + 0.015 + 0.03 = 0.095.
Branch, multiply, add. Every way A can happen, weighted by its branch.