L32 — Conditional Probability and Independence
Key Terms
- Conditional probability
- P(A | B) = P(A ∩ B) ÷ P(B) — the probability of A given that B has already occurred.
- Independence
- A and B are independent if P(A | B) = P(A), or equivalently P(A ∩ B) = P(A) × P(B).
- Multiplication rule (general)
- P(A ∩ B) = P(A) × P(B | A) — works for any events, dependent or independent.
- With replacement
- Each draw is independent — the probability remains unchanged on every draw.
- Without replacement
- Each draw changes the remaining pool — subsequent draws are dependent on earlier ones.
- Bayes' theorem
- P(A | B) = P(A) × P(B | A) ÷ P(B) — reverses the conditioning direction.
Conditional probability
The conditional probability of A given B has occurred:
P(A | B) = P(A ∩ B) ÷ P(B), provided P(B) > 0.
Independence
Events A and B are independent if knowing B occurred does not change the probability of A:
P(A | B) = P(A), equivalently P(A ∩ B) = P(A) × P(B).
Multiplication rule (general)
P(A ∩ B) = P(A) × P(B | A) = P(B) × P(A | B)
| Scenario | Formula |
|---|---|
| Conditional probability | P(A|B) = P(A ∩ B) / P(B) |
| Independent events | P(A ∩ B) = P(A) × P(B) |
| Dependent events | P(A ∩ B) = P(A) × P(B|A) |
| Test for independence | P(A|B) = P(A), or P(A ∩ B) = P(A)×P(B) |
Sampling with and without replacement
| Type | Effect on probability |
|---|---|
| With replacement | Draws are independent — probabilities unchanged |
| Without replacement | Draws are dependent — denominator decreases |
Worked Example 1 — Conditional probability from a table
Of 50 students: 20 study French (F), 15 study German (G), 8 study both. Find P(G | F).
P(F ∩ G) = 8/50. P(F) = 20/50.
P(G | F) = P(F ∩ G) / P(F) = (8/50) / (20/50) = 8/20 = 2/5.
Interpretation: Given the student studies French, there is a 40% chance they also study German.
Worked Example 2 — Testing independence
P(A) = 0.4, P(B) = 0.5, P(A ∩ B) = 0.2. Are A and B independent?
Test: P(A) × P(B) = 0.4 × 0.5 = 0.2 = P(A ∩ B). ✓
Yes, A and B are independent.
Worked Example 3 — Without replacement (dependent)
A bag has 4 red and 6 blue balls. Two drawn without replacement. Find P(both red).
P(1st red) = 4/10. P(2nd red | 1st red) = 3/9.
P(both red) = (4/10) × (3/9) = 12/90 = 2/15.
Worked Example 4 — Conditional from a Venn diagram
In a class: P(Sport) = 0.6, P(Music) = 0.4, P(both) = 0.25. Find P(Music | Sport).
P(Music | Sport) = P(Music ∩ Sport) / P(Sport) = 0.25 / 0.6 = 5/12 ≈ 0.417.
Worked Example 5 — Medical test (false positives)
A disease affects 1% of the population. A test is 95% accurate for those with the disease and 90% accurate for those without it. Find P(disease | positive test).
P(D) = 0.01, P(D′) = 0.99.
P(+ | D) = 0.95, P(+ | D′) = 0.10 (false positive rate).
P(+) = 0.01×0.95 + 0.99×0.10 = 0.0095 + 0.099 = 0.1085.
P(D | +) = (0.01×0.95) / 0.1085 = 0.0095/0.1085 ≈ 0.0875 ≈ 8.75%.
Even with a positive test, only ~9% chance of actually having the disease — illustrating why rare-disease testing requires careful interpretation.
-
Conditional probability basics. Fluency
- (a) P(A ∩ B) = 0.12, P(B) = 0.4. Find P(A | B).
- (b) P(A) = 0.5, P(B) = 0.6, P(A | B) = 0.3. Find P(A ∩ B).
- (c) A die is rolled. Find P(even | greater than 2).
- (d) A card is drawn. Find P(King | face card).
-
Testing independence. Fluency
- (a) P(A) = 0.3, P(B) = 0.5, P(A ∩ B) = 0.15. Are A and B independent?
- (b) P(A) = 0.4, P(B) = 0.6, P(A ∩ B) = 0.28. Are they independent?
- (c) Two coins are tossed. Are the outcomes of the two coins independent?
- (d) Drawing two cards without replacement. Are the draws independent?
-
With and without replacement. Fluency
- (a) Bag: 3 red, 7 blue. Two draws with replacement. Find P(both red).
- (b) Same bag, two draws without replacement. Find P(both red).
- (c) Why is the answer to (b) less than (a)?
- (d) Bag: 5 red, 5 blue. Two draws without replacement. Find P(different colours).
-
Two-way table and conditional probability. Fluency
120 people: exercise (Yes/No) × healthy diet (Yes/No):
Diet Yes Diet No Total Exercise Yes 48 12 60 Exercise No 24 36 60 Total 72 48 120 - (a) Find P(Diet Yes | Exercise Yes).
- (b) Find P(Exercise Yes | Diet Yes).
- (c) Are exercise and diet independent? Test using the formula.
- (d) Find P(Diet No | Exercise No).
-
Tree diagram and conditional probability. Understanding
A box contains 4 red and 6 white balls. Two balls are drawn without replacement. The diagram shows the first and second draws.
- (a) Verify the four branch probabilities sum to 1.
- (b) Find P(second ball is red).
- (c) Find P(first ball is red | second ball is red). [Use P(R then R) and P(R then R) + P(W then R).]
- (d) Are the first and second draws independent? Justify using probabilities.
-
Probability of dependent events. Understanding
- (a) In a class of 30, 12 have brown eyes and 8 are left-handed; 4 have both. A student is selected randomly. Find P(brown eyes | left-handed).
- (b) A box has 5 defective and 15 good items. Two items selected without replacement. Find P(second defective | first defective).
- (c) P(A) = 0.6, P(B | A) = 0.4, P(B | A′) = 0.2. Find P(A ∩ B) and P(A′ ∩ B).
- (d) Using (c), find P(B) using the law of total probability.
-
Independence in context. Understanding
- (a) A coin is flipped and a die is rolled. Are these events independent? Explain.
- (b) P(rain tomorrow) = 0.3. P(traffic jam tomorrow) = 0.5. P(both) = 0.2. Are rain and traffic jams independent?
- (c) In a bag of 10 balls (4 red, 6 blue), one ball is drawn, noted, and replaced. A second is drawn. Find P(red then blue).
- (d) Same bag but without replacement. Find P(red then blue).
-
Conditional probability from a Venn diagram. Understanding
300 survey respondents: 180 own a car (C), 120 use public transport (T), 60 use both.
- (a) Find P(C | T).
- (b) Find P(T | C).
- (c) Are C and T independent?
- (d) Find P(neither C nor T).
-
Medical testing. Problem Solving
A disease affects 2% of the population. A screening test gives a positive result for 95% of those who have the disease, and a positive result for 8% of those who do not have the disease.
- (a) Define the events D (has disease) and + (positive test). State P(D), P(+|D), P(+|D′).
- (b) Find P(+) using the law of total probability.
- (c) Find P(D | +) using Bayes’ theorem: P(D|+) = P(D)×P(+|D) / P(+).
- (d) Interpret your answer in plain language. Why might this surprise patients?
-
Quality control. Problem Solving
A factory has two machines. Machine A produces 60% of items; 3% of Machine A’s items are defective. Machine B produces 40%; 5% are defective.
- (a) Find P(defective and from Machine A).
- (b) Find P(defective and from Machine B).
- (c) Find P(defective).
- (d) Given an item is defective, find P(it came from Machine A).