A fair die is rolled. Let A = {5, 6} (at least 5) and B = {2, 4, 6} (even). Find P(A|B) and P(B|A). Are A and B independent?
Conditional probability P(A|B) = P(A ∩ B)/P(B) re-measures A inside the reduced world in which B has happened. It yields the multiplication rule, defines independence, and powers tree diagrams, reliability calculations and Bayes' theorem.
Once we learn that event B has occurred, every outcome outside B becomes impossible. The probability of A given B is the share of B's probability that also lies in A. With equally likely outcomes this is simply a ratio of counts: P(A|B) = |A ∩ B| / |B|.
Example: roll one die and let B = “even” = {2, 4, 6} and A = “greater than 3” = {4, 5, 6}. Unconditionally P(A) = 1/2, but P(A|B) = |{4, 6}| / |{2, 4, 6}| = 2/3. Knowing that the number is even makes “greater than 3” more likely.
For a fixed B, P(·|B) is itself a genuine probability: it is non-negative, P(B|B) = 1, and it is additive. So all the earlier rules hold inside the condition, e.g. P(A′|B) = 1 − P(A|B) and P(A ∪ C | B) = P(A|B) + P(C|B) − P(A ∩ C | B).
Drawing three cards one after another without replacement: P(all three aces) = 4/52 × 3/51 × 2/50 = 24/132 600 = 1/5525. The same answer comes from combinations, C(4, 3)/C(52, 3) = 4/22 100 = 1/5525 — two routes, one result.
A tree diagram organises multi-stage experiments. Each branch is labelled with a conditional probability, the probability of a complete path is the product along it, and the probability of an event is the sum over the paths that make it happen. The branches leaving any node always add to 1.
Events A and B are independent when P(A ∩ B) = P(A) · P(B). If P(B) > 0 this is equivalent to P(A|B) = P(A): learning that B happened does not change the chance of A. The definition is symmetric, so A is independent of B exactly when B is independent of A.
Independence passes to complements. If A and B are independent then so are A and B′, because P(A ∩ B′) = P(A) − P(A ∩ B) = P(A) − P(A)P(B) = P(A)(1 − P(B)) = P(A)P(B′). Likewise A′ and B, and A′ and B′. Hence P(A ∪ B) = 1 − P(A′)P(B′) for independent events.
Checking independence: if P(A) = 0.5, P(B) = 0.4 and P(A ∩ B) = 0.2, then 0.5 × 0.4 = 0.2, so A and B are independent. Independence can even hold within a single roll of a die: A = even = {2, 4, 6} and B = {1, 2} give P(A ∩ B) = 1/6 = (1/2)(1/3).
For three events, mutual independence needs four conditions: P(A ∩ B) = P(A)P(B), P(A ∩ C) = P(A)P(C), P(B ∩ C) = P(B)P(C) and P(A ∩ B ∩ C) = P(A)P(B)P(C) (in general 2ⁿ − n − 1 conditions for n events). Pairwise independence is not enough. Toss two fair coins and let A = first shows H, B = second shows H, C = both show the same face. Every pair is independent (each event has probability 1/2 and each pairwise intersection 1/4), yet P(A ∩ B ∩ C) = P(HH) = 1/4 ≠ 1/8.
Repeated independent trials. For independent trials, the probability of a particular sequence is the product of the individual probabilities: P(H, H, T) = (1/2)³ = 1/8 for a fair coin. P(exactly two heads in three tosses) adds the three sequences HHT, HTH, THH, giving 3/8 — the bridge to the binomial distribution in the topic on random variables.
Word problems mix three kinds of probability — joint (both things happen), marginal (one thing, ignoring the other) and conditional (one thing, given the other). Most wrong answers come from computing the right formula for the wrong kind. Consider a college in which 60% of the students are girls, 30% of the girls play chess and 20% of the boys play chess.
| Wording | Kind | Value |
|---|---|---|
| “a randomly chosen student is a girl who plays chess” | joint | P(G ∩ C) = 0.6 × 0.3 = 0.18 |
| “a randomly chosen student plays chess” | marginal (total probability) | P(C) = 0.18 + 0.4 × 0.2 = 0.26 |
| “a girl plays chess” · “if the student is a girl, she plays chess” | conditional | P(C | G) = 0.3 |
| “a chess player is a girl” · “of the chess players, the fraction who are girls” | conditional, reversed | P(G | C) = 0.18/0.26 ≈ 0.692 |
| “a student is a girl or plays chess” | union | P(G ∪ C) = 0.6 + 0.26 − 0.18 = 0.68 |
Signal words for a condition are “given that”, “if”, “among”, “of those who” and “when it is known that”; the condition is whatever follows them. “Of the chess players, what fraction are girls?” conditions on chess, so it asks for P(G | C) — and computing it needs the reversal that Bayes' theorem formalises.
For independent events, P(none occurs) = (1 − p₁)(1 − p₂)⋯(1 − pₙ), so P(at least one occurs) = 1 − Π(1 − pᵢ). A classic: three students solve a problem independently with probabilities 1/2, 1/3 and 1/4. P(problem solved) = 1 − (1/2)(2/3)(3/4) = 1 − 1/4 = 3/4.
For n independent trials with success probability p, P(at least one success) = 1 − (1 − p)ⁿ. How many trials make this at least 0.9 when p = 0.2? We need 0.8ⁿ ≤ 0.1; since 0.8¹⁰ ≈ 0.107 and 0.8¹¹ ≈ 0.086, the answer is n = 11.
Reliability. Suppose components fail independently. A series system works only if every component works: R = p₁p₂⋯pₙ. A parallel (redundant) system works if at least one component works: R = 1 − (1 − p₁)(1 − p₂)⋯(1 − pₙ). With reliabilities 0.9, 0.8 and 0.95: in series R = 0.684; in parallel R = 1 − 0.1 × 0.2 × 0.05 = 0.999. RAID-1 mirroring and dual power supplies are parallel systems.
Data often arrive as a two-way table of counts. A conditional probability is then a cell count divided by its row or column total — no formula juggling needed.
| Got flu | No flu | Total | |
|---|---|---|---|
| Vaccinated | 20 | 280 | 300 |
| Not vaccinated | 60 | 140 | 200 |
| Total | 80 | 420 | 500 |
Reading the table: P(flu) = 80/500 = 0.16; P(flu | vaccinated) = 20/300 = 1/15 ≈ 0.067; P(flu | not vaccinated) = 60/200 = 0.3; and P(vaccinated | flu) = 20/80 = 1/4. Flu and vaccination are dependent (0.067 ≠ 0.16), and P(flu | vaccinated) is very different from P(vaccinated | flu).
The definition agrees with the counts: the joint probability P(V ∩ F) = 20/500 = 0.04, the marginal P(V) = 300/500 = 0.6, and P(F|V) = 0.04/0.6 ≈ 0.067.
Two children. With BB, BG, GB, GG equally likely: given that at least one child is a boy, the reduced space is {BB, BG, GB}, so P(both boys) = 1/3. Given that the elder child is a boy, the space is {BB, BG}, so P(both boys) = 1/2. Two pieces of information that sound alike shrink the space differently.
Dice. Given that the sum of two dice is 8, the reduced space is {(2,6), (3,5), (4,4), (5,3), (6,2)}. Then P(one die shows 3) = 2/5 and P(doublet) = 1/5.
Parity of a pair. Two different digits are chosen from 1 to 7 (four odd, three even). Given that their sum is even, both are odd or both are even, so P(both odd | sum even) = C(4, 2) / [C(4, 2) + C(3, 2)] = 6/9 = 2/3.
Monty Hall. You pick one of three doors; the host, who knows where the car is, opens another door showing a goat and offers a switch. Switching wins with probability 2/3 and staying with 1/3: your first pick was right only 1/3 of the time, and the host's informed choice does not change that. The puzzle became famous in 1990 when Marilyn vos Savant's correct answer drew thousands of letters insisting she was wrong.
Try the problem first, then reveal the working one step at a time.
A fair die is rolled. Let A = {5, 6} (at least 5) and B = {2, 4, 6} (even). Find P(A|B) and P(B|A). Are A and B independent?
An urn holds 4 red and 6 black balls. Two are drawn one after the other without replacement. Find P(both red), P(second red), and P(first red | second red).
Students A, B and C independently solve a problem with probabilities 1/2, 1/3 and 1/4. Find the probability that (a) the problem is solved, (b) exactly one of them solves it.
Two independent links, each working with probability 0.8, connect a site to a switch that works with probability 0.9. Find the probability that the site is connected if the links are (a) in parallel (either link suffices), (b) in series (both are needed).
P(A) = 0.5, P(B) = 0.4 and P(A ∩ B) = 0.2. Are A and B independent? Find P(A|B) and P(A ∪ B).
Two fair dice are rolled and the sum is 7. What is the probability that at least one die shows a 2?
A family has two children. Given that at least one is a girl, what is the probability that both are girls? What if we know the younger child is a girl?
A machine has two independent alarms that detect a fault with probabilities 0.9 and 0.85. (a) What is the probability that a fault is detected? (b) How many independent alarms, each of reliability 0.7, are needed to detect a fault with probability at least 0.99?
A and B are independent with P(A) = 0.3 and P(B) = 0.6. Find P(A ∪ B), P(A′ ∩ B′) and P(exactly one of A, B).
10 questions. 70 % passes the topic quiz (+30 XP, +20 more for 100 %). Exam scoring: +1 correct, −⅓ wrong.
Modelled on real KPSC questions (reworded) with the same concept and answer; each links to its original paper.