Conditional Probability and Independence
Key Terms
- Conditional probability
- P(A|B) is the probability of A occurring given that B has already occurred. The sample space is restricted to B.
- Formula: P(A|B) = P(A ∩ B) / P(B), provided P(B) > 0.
- Rearranging gives the multiplication rule: P(A ∩ B) = P(B) × P(A|B) = P(A) × P(B|A).
- Events A and B are independent if knowing B occurs does not change the probability of A: P(A|B) = P(A).
- Equivalent independence test: A and B are independent if and only if P(A ∩ B) = P(A) × P(B).
- A tree diagram organises multi-stage experiments. Multiply probabilities along branches to find the probability of a sequence. Add the probabilities of all branches giving the desired outcome.
• Conditional probability: P(A|B) = P(A ∩ B) / P(B)
• Multiplication rule: P(A ∩ B) = P(A) × P(B|A) = P(B) × P(A|B)
• Independence condition: P(A ∩ B) = P(A) × P(B) &lrArr; P(A|B) = P(A) &lrArr; P(B|A) = P(B)
• Tree diagram: P(branch) = product of probabilities on that branch
• Sum rule: Add probabilities of all branches leading to same outcome
Tree diagram: drawing two cards (with replacement) — Heart (H) or Not Heart (N), P(H)=1/4
P(exactly one Heart) = P(HN) + P(NH) = 3/16 + 3/16 = 6/16 = 3/8
Worked Example 1 — Conditional probability from a table
Question: From the table (Male/Football=32, Male/Swimming=18, Female/Football=20, Female/Swimming=30, total=100). Find P(Football | Male).
P(Football | Male) = P(Football ∩ Male) / P(Male) = (32/100) / (50/100) = 32/50 = 16/25
Shortcut: restrict to the Male row only. 32 out of 50 males prefer football.
Worked Example 2 — Tree diagram and independence test
Question: A bag has 3 red and 2 blue counters. One counter is drawn (not replaced) and then a second is drawn. Find P(both red) and P(2nd is red | 1st is red).
P(both red) = P(1st red) × P(2nd red | 1st red) = 3/5 × 2/4 = 6/20 = 3/10
P(2nd red | 1st red) = 2/4 = 1/2
P(2nd red) = P(RR) + P(BR) = 3/5×2/4 + 2/5×3/4 = 6/20+6/20 = 12/20 = 3/5
Since P(2nd red | 1st red) = 1/2 ≠ 3/5 = P(2nd red), the draws are not independent (without replacement).
What Does "Given That" Actually Mean?
Conditional probability answers this question: If I already know B has happened, how does that change the probability of A?
The key idea is that knowing B has occurred restricts the sample space. Instead of looking at all possible outcomes, we now only look at outcomes inside B. The probability of A, given B, is the proportion of B's outcomes that also belong to A.
This gives the formula:
P(A|B) = P(A ∩ B) ÷ P(B)
We divide by P(B) to rescale the probabilities so they add to 1 within the restricted sample space. The symbol A|B is read "A given B".
The Multiplication Rule — Rearranging the Formula
Cross-multiplying the conditional probability formula gives the multiplication rule:
P(A ∩ B) = P(B) × P(A|B)
You can also write it the other way around: P(A ∩ B) = P(A) × P(B|A). Both are correct — they calculate the same intersection probability. Choose whichever version has the conditional probability you already know.
Independence — When Knowing B Tells You Nothing
Two events A and B are independent when knowing one has occurred gives no information about the other. Formally:
A and B are independent ⇔ P(A|B) = P(A)
This is equivalent to the cleaner test: P(A ∩ B) = P(A) × P(B). To check independence, calculate both sides and see if they are equal. This version is usually easier to work with numerically.
Tree Diagrams for Multi-Stage Experiments
When an experiment happens in stages (e.g. drawing two cards, selecting items one after another), a tree diagram is the most reliable tool.
How to build a tree diagram:
- Draw a branch for each outcome of the first stage. Label each branch with its probability.
- From each first-stage node, draw branches for each outcome of the second stage. Use conditional probabilities — these may differ depending on what happened first.
- To find P(a path), multiply all probabilities along that path.
- To find the probability of an event spread across multiple paths, add the path probabilities.
Example: A bag has 4 red and 6 blue marbles. Two are drawn without replacement. Find P(both red).
P(1st red) = 4/10. Then P(2nd red | 1st red) = 3/9 (one red marble is now gone). So P(both red) = 4/10 × 3/9 = 12/90 = 2/15.
Worked Example — Using the Formula
In a survey: P(owns a dog) = 0.4, P(owns a cat) = 0.3, P(owns both) = 0.1. Find P(owns a dog | owns a cat).
P(dog | cat) = P(dog ∩ cat) ÷ P(cat) = 0.1 ÷ 0.3 = 1/3 ≈ 0.333.
So among cat owners, about one-third also own a dog — more than the general rate of 0.4 would suggest if you mistakenly applied it without conditioning.
Mastery Practice
-
Fluency
Calculate the conditional probability from the given information.
- (a) P(A ∩ B) = 0.12, P(B) = 0.4. Find P(A|B).
- (b) P(A ∩ B) = 1/6, P(A) = 1/2. Find P(B|A).
- (c) P(A|B) = 0.3, P(B) = 0.5. Find P(A ∩ B).
- (d) P(A|B) = 0.6, P(A ∩ B) = 0.18. Find P(B).
-
Fluency
From the two-way table: (Male/Passed=36, Male/Failed=14, Female/Passed=30, Female/Failed=20, total=100) find each conditional probability.
- (a) P(Passed | Male)
- (b) P(Male | Passed)
- (c) P(Failed | Female)
- (d) P(Female | Failed)
-
Fluency
Test whether the following pairs of events are independent.
- (a) P(A) = 0.4, P(B) = 0.3, P(A ∩ B) = 0.12.
- (b) P(A) = 0.5, P(B) = 0.6, P(A ∩ B) = 0.25.
- (c) P(A) = 1/3, P(B) = 1/4, P(A ∩ B) = 1/12.
- (d) P(A) = 0.7, P(A|B) = 0.5.
-
Fluency
A spinner has 5 equal sections: {1, 2, 3, 4, 5}. It is spun twice (with replacement). Let A = {result is odd} and B = {result is at least 4}.
- (a) Are A and B independent for a single spin? (Find P(A), P(B) and P(A∩B).)
- (b) Find P(odd on both spins).
- (c) Find P(at least one result is 5).
-
Understanding
Tree diagram — two-stage experiment without replacement.
Setup: A bag contains 4 red (R) and 3 blue (B) marbles. Two marbles are drawn without replacement.- (a) Draw a tree diagram showing all branches and their probabilities.
- (b) Find P(both red).
- (c) Find P(exactly one blue).
- (d) Find P(2nd marble is blue | 1st is red).
- (e) Find P(1st is red | 2nd is blue).
-
Understanding
Medical testing — conditional probability in context.
Context: 1% of the population has a disease (D). A test is 95% accurate for those WITH the disease (P(positive|D) = 0.95) and 90% accurate for those WITHOUT (P(negative|D′) = 0.90, so P(positive|D′) = 0.10).- (a) Use a tree diagram or two-way table with 10 000 people to find P(positive test).
- (b) Find P(D | positive test) — the probability of having the disease given a positive test. This is called the positive predictive value.
- (c) Explain why P(D | positive) is so low, even though the test is 95% accurate for people with the disease.
-
Understanding
Using independence to simplify calculations.
A machine has two components: A (fails with probability 0.05) and B (fails with probability 0.08). Failures are independent. The machine fails if either component fails.
- (a) Find P(both fail).
- (b) Find P(machine fails) using P(at least one fails) = 1 − P(neither fails).
- (c) Find P(only A fails).
- (d) Find P(B fails | machine fails).
-
Understanding
Three-stage tree diagram.
Context: A coin is biased with P(H) = 0.6. It is flipped three times.- (a) Find P(exactly two heads).
- (b) Find P(at least two heads).
- (c) Find P(3rd flip is heads | first two are heads).
- (d) Are the outcomes of successive flips independent? Justify.
-
Problem Solving
Proving independence from a two-way table.
Challenge. A survey of 200 students records gender (Male/Female) and whether they passed a subject (Pass/Fail). Results: Male/Pass=60, Male/Fail=40, Female/Pass=60, Female/Fail=40.- (a) Find P(Pass), P(Male) and P(Male ∩ Pass).
- (b) Test algebraically whether “Pass” and “Male” are independent.
- (c) Find P(Pass | Male) and P(Pass | Female). What do you notice?
- (d) Interpret what independence means in this real-world context.
-
Problem Solving
Extended conditional probability — three events.
Challenge.- (a) A box has 5 white and 3 black balls. Three are drawn without replacement. Find P(all three are white).
- (b) Cards are drawn one at a time from a standard 52-card deck without replacement. Find P(1st is an Ace ∩ 2nd is an Ace ∩ 3rd is an Ace).
- (c) If P(A) = 0.4, P(B|A) = 0.5, and P(C|A ∩ B) = 0.6, find P(A ∩ B ∩ C) using the extended multiplication rule P(A∩B∩C) = P(A)×P(B|A)×P(C|A∩B).