haya.Learning made clear
Unit XIII · Probability
10 min readConcept sheet3-mark question; the first half of every Bayes' theorem question

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.

PartitionE₁, E₂, ..., Eₙ are pairwise disjoint, their union is S, and each P(Eᵢ) > 0
Theorem of total probabilityP(A) = P(E₁)P(A|E₁) + P(E₂)P(A|E₂) + ... + P(Eₙ)P(A|Eₙ)
Simplest partitionE and E′, for any event E with 0 < P(E) < 1
Sum checkP(E₁) + P(E₂) + ... + P(Eₙ) = 1

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

  1. 1
    A = A ∩ S = A ∩ (E₁ ∪ E₂ ∪ ... ∪ Eₙ)
  2. 2
    = (A ∩ E₁) ∪ (A ∩ E₂) ∪ ... ∪ (A ∩ Eₙ)
  3. 3
    These pieces are pairwise disjoint, because the Eᵢ are.
  4. 4
    So P(A) = P(A ∩ E₁) + P(A ∩ E₂) + ... + P(A ∩ Eₙ).
  5. 5
    By the multiplication theorem, P(A ∩ Eᵢ) = P(Eᵢ) P(A|Eᵢ).
  6. 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

Problem

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.

Working
  1. E₁, E₂, E₃: the bolt is from X, Y, Z. P(E₁) = 0.5, P(E₂) = 0.3, P(E₃) = 0.2 (sum 1).
  2. D: the bolt is defective. P(D|E₁) = 0.02, P(D|E₂) = 0.03, P(D|E₃) = 0.04.
  3. P(D) = 0.5 × 0.02 + 0.3 × 0.03 + 0.2 × 0.04
  4. = 0.010 + 0.009 + 0.008 = 0.027
Answer

P(D) = 0.027, so 2.7% of the bolts are defective.

Example 2: two bags

Problem

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.

Working
  1. P(Bag I) = P(Bag II) = 1/2
  2. P(green | Bag I) = 4/6 = 2/3; P(green | Bag II) = 3/8
  3. P(green) = 1/2 × 2/3 + 1/2 × 3/8 = 1/3 + 3/16
  4. = 16/48 + 9/48 = 25/48
Answer

P(green) = 25/48.

Example 3: a die decides the box

Problem

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.

Working
  1. P(Box A) = 2/6 = 1/3; P(Box B) = 4/6 = 2/3
  2. P(prize | A) = 3/10; P(prize | B) = 1/5
  3. P(prize) = 1/3 × 3/10 + 2/3 × 1/5 = 1/10 + 2/15
  4. = 3/30 + 4/30 = 7/30
Answer

P(prize) = 7/30.

In real life

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.

Exam angle

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.

Remember it

Branch, multiply, add. Every way A can happen, weighted by its branch.