Lesson 6: Conditional Probability and IndependenceAP
🎧 Listen to this lesson
"Given that..." changes everything. Conditional probability P(B|A) is the probability of B computed inside the world where A has already happened — the sample space shrinks to A, and the denominator becomes P(A) (or the count within A). CED Unit 4 treats conditional probability, the general multiplication rule, tree diagrams and the definition of independence as one connected topic, and the free-response questions love it, because real life — medical tests, spam filters, quality control — is conditional all the way down.
The formulas
- Definition: P(B|A) = P(A and B) / P(A).
- General multiplication rule: P(A and B) = P(A) × P(B|A). This always works — no independence needed. Read it off a tree diagram by multiplying along branches; probabilities at the ends of all branches sum to 1, and any "given" question reverses along the tree by dividing the relevant branch-end by the total of all branch-ends consistent with the condition.
- Independence: A and B are independent exactly when P(B|A) = P(B), equivalently P(A and B) = P(A) × P(B). Check it numerically; never eyeball it.
Worked example 1 (the base-rate lesson). A disease affects 1% of a population. A test for it has a 95% detection rate (sensitivity) and a 5% false-positive rate. Imagine 10,000 people tested: 100 have the disease and about 95 of them test positive; 9,900 are healthy and 5% of them — 495 people — also test positive. So among the 95 + 495 = 590 positive tests, the probability the person actually has the disease is 95/590 ≈ 0.161 — only about 16%! The prior probability (1%) dominates the calculation. This is why screening low-risk populations produces mostly false alarms, and why P(positive | disease) = 0.95 is a completely different number from P(disease | positive) ≈ 0.16. Confusing the two is the prosecutor's fallacy, and the exam tests it in medical, legal and spam-filter costumes.
Worked example 2 (tree diagram). Rain is forecast with probability 0.30. If it rains, the bus is late with probability 0.40; if not, with probability 0.05. Multiply along branches: P(rain and late) = 0.30 × 0.40 = 0.12; P(no rain and late) = 0.70 × 0.05 = 0.035. So P(late) = 0.12 + 0.035 = 0.155. Now reverse: given the bus was late, the probability it rained is P(rain | late) = 0.12/0.155 ≈ 0.774. Notice the update: lateness is *evidence* for rain, raising its probability from 0.30 to 0.77.
Worked example 3 (checking independence in a table). In a survey of 800 teenagers: ages 13–17, 240 use a particular app and 60 do not (300 total); ages 18–24, 360 use it and 140 do not (500 total). Overall P(uses) = 600/800 = 0.75. But P(uses | age 13–17) = 240/300 = 0.80 ≠ 0.75. The conditional and unconditional probabilities differ, so app use and age group are not independent (they are associated). Had they been equal (within rounding), independence would be supported.
Mutually exclusive is not independent — it is the opposite
If A and B are mutually exclusive and both can occur, then P(B|A) = 0 (if A happened, B cannot), while P(B) > 0 — so they fail the independence check spectacularly. Disjoint events with positive probability are *maximally dependent*. This confusion appears in the exam's most-missed multiple-choice questions.
Common mistakes
- Swapping the condition: reporting P(positive | disease) when the question asks P(disease | positive). Underline what follows "given" — that is the denominator's world.
- Declaring disjoint events independent. See above; they are the opposite.
- Claiming independence from a table without computing. Always compare P(B|A) with P(B) numerically.
- Tree branches that do not sum to 1 at each split — an instant self-check students skip.
AP Exam Experience
Question 1. In a two-way table of 400 voters, 260 support a measure. Among the 150 voters under 30, 120 support it. Which statement is correct?
- (A) P(support) = 0.30
- (B) P(support | under 30) = 120/400 = 0.30
- (C) P(support | under 30) = 120/150 = 0.80
- (D) P(under 30 | support) = 120/150 = 0.80
- (E) Support and age are independent because 120 is large.
Answer: (C). Conditioning on "under 30" shrinks the sample space to the 150 younger voters, of whom 120 support the measure: 120/150 = 0.80. Choice (B) uses the grand total (that is the joint probability), and (D) swaps the condition — P(under 30 | support) = 120/260 ≈ 0.46, a different number entirely.
Question 2. Events A and B are mutually exclusive, with P(A) = 0.3 and P(B) = 0.4. Which statement is true?
- (A) A and B are independent.
- (B) P(A and B) = 0.12.
- (C) P(A or B) = 0.7, and A and B are not independent.
- (D) P(B|A) = 0.4.
- (E) P(A and B) = 0.28.
Answer: (C). Disjoint events: P(A or B) = 0.3 + 0.4 = 0.7, and P(A and B) = 0 ≠ P(A)P(B) = 0.12, so they are dependent — knowing A occurred forces B's probability to 0. Choice (B) is the independence computation applied where independence is impossible.
Question 3. A weather service says P(rain) = 0.2. Given rain, the probability a hiker cancels is 0.9; given no rain, it is 0.1. The probability the hiker cancels AND it rains is:
- (A) 0.9
- (B) 0.26
- (C) 0.18
- (D) 0.08
- (E) 0.02
Answer: (C). General multiplication rule: P(rain and cancel) = P(rain) × P(cancel | rain) = 0.2 × 0.9 = 0.18. Choice (B) is P(cancel) = 0.18 + 0.08 — the total, not the joint probability asked for.
Free-response question. A factory's output comes from two machines. Machine A produces 60% of items and 2% of its items are defective. Machine B produces 40% of items and 5% of its items are defective. An item is chosen at random. (a) Construct a tree diagram or table and find the probability that the item is defective. (b) Given that the item is defective, find the probability that it came from Machine A. (c) Are "produced by Machine A" and "defective" independent events? Justify numerically.
Scoring guideline.
- Part (a): Essentially correct if the joint probabilities are computed by multiplying along branches — P(A and defective) = 0.60 × 0.02 = 0.012 and P(B and defective) = 0.40 × 0.05 = 0.020 — and summed: P(defective) = 0.032. Partially correct if one branch product is wrong but the method (sum of branch ends) is right.
- Part (b): Essentially correct if P(A | defective) = 0.012/0.032 = 0.375, with the conditional structure clear (defective items form the new denominator). Incorrect if 0.012 or 0.60 is reported — both ignore the condition.
- Part (c): Essentially correct if it compares either P(defective | A) = 0.02 with P(defective) = 0.032, or P(A and defective) = 0.012 with P(A)P(defective) = 0.60 × 0.032 = 0.0192, and concludes the events are NOT independent because the values differ. Partially correct if a correct comparison is made but no explicit conclusion is stated. Incorrect if independence is claimed because the machines are "separate machines" — physical separation is not the definition; the numbers decide.
Deeper dive: Bayes in the wild — spam filters and search rankings
Your email filter is a conditional-probability engine. It estimates P(spam | message contains "free money") from the base rate of spam and the word's frequency in spam versus legitimate mail. If 40% of incoming mail is spam, the phrase appears in 30% of spam but only 1% of legitimate mail, then among 10,000 messages: 4,000 spam (1,200 with the phrase) and 6,000 legitimate (60 with the phrase), so P(spam | phrase) = 1,200/1,260 ≈ 0.952 — the filter can act on it. Notice the machinery is Worked Example 1's tree with new labels, and notice the design lesson: when the condition is *rare* in the innocent population (1%), even a strong signal yields reliable inference; when signals are common in both populations, posteriors stay muddy. Medical screening, fraud detection and airport security all live on this trade-off, which is why "the test is 99% accurate" headlines are meaningless until the base rate is supplied.
Notation discipline for conditional probability
Write the condition into the symbol every time: P(defective | Machine A) = 0.02 is a complete claim; "the probability is 0.02" is not. The habit matters because two-way tables and trees present several similar numbers at once — joint (0.012), marginal (0.032) and conditional (0.375) probabilities all live in the factory example simultaneously, and the only thing distinguishing them is the condition and the denominator. A reliable self-check before finalising any conditional answer: state its denominator in words ("out of every 1,000 defective items, about 375 came from Machine A"). If the sentence sounds like the question asked, the denominator is right; if it describes the whole population instead, you have computed a joint probability wearing a conditional costume.
Second worked example: sampling without replacement
Two cards are drawn from a standard deck *without* replacement. P(both aces) by the general multiplication rule: (4/52) × (3/51) = 12/2652 ≈ 0.0045. The second factor is a conditional probability in action: P(second card is an ace | first was an ace) = 3/51, because the deck and the ace count both shrank. Consequently the draws are dependent: P(second ace) overall is still 4/52 (symmetry — verify it by adding the branches (4/52)(3/51) + (48/52)(4/51) ≈ 0.00452 + 0.07240 = 0.0769, and indeed (12 + 192)/2652 = 204/2652 ≈ 0.0769 = 4/52), but P(second ace | first ace) = 3/51 ≈ 0.0588 ≠ 0.0769, and the definition of independence is the equality that just failed. Compare *with* replacement: the draws become independent and P(both aces) = (4/52)² ≈ 0.0059. The contrast is the point — replacement restores independence; without it, conditional probabilities must do the work, and "assume independence" is an error, not a shortcut. This same dependence is why real surveys sampling without replacement need the 10% condition you will meet in Unit 5: if the sample is a small slice of the population, the conditional probabilities barely move and independence is a safe approximation.
📊 Interactive
Interactive — hover or explore the chart above.
🎬 Watch & Learn
Free YouTube video lessons on “Conditional Probability and Independence” — pick a result below:
- AP Statistics — Conditional Probability and Independence: full video lesson
- Conditional Probability and Independence on Khan Academy
- Conditional Probability and Independence on jbstatistics
- Conditional Probability and Independence on StatQuest
- Exam practice & worked examples: Conditional Probability and Independence