Course Content
Statistics & Math for AI/ML Interviews
8 sections · 30 lessons
Can conditional probability ever be greater than marginal probability? Explain with intuition.
What you need to know
Definitions
The marginal probability P(A) is the probability of A across everyone, with no extra information. The conditional probability P(A | B) is the probability of A inside the group where B is true.
Three possible outcomes
P(A | B) > P(A) B is evidence for A (positive association)P(A | B) = P(A) B tells you nothing (independent)P(A | B) < P(A) B is evidence against A (negative association)A useful way to compare is lift:
lift = P(A | B) / P(A)A lift above 1 means B makes A more likely.
Worked example: a medical test
1% of people have a disease. The test catches 90% of real cases, and it wrongly flags 5% of healthy people. Picture 10,000 people:
Sick: 100 people → 90 test positiveHealthy: 9,900 people → 495 test positiveAll positives: 90 + 495 = 585P(disease) = 100 / 10,000 = 1%P(disease | positive) = 90 / 585 ≈ 15.4%Conditioning on a positive test raised the probability 15 times, from 1% to about 15%. That is a big rise, but it is still far from 90%, which surprises most people. The next section on Bayes' theorem explains why.
Why the rise has to be balanced
The law of total probability says P(A) is a weighted average of P(A | B) and P(A | not B). An average sits between its parts. So if conditioning on B pushes the probability above P(A), conditioning on "not B" must pull it below. Evidence that raises a belief when present lowers it when absent.
A real-life example
In cricket, suppose a team wins 50% of its one-day matches overall. In matches where it scores 350 or more, it wins 90%. P(win | 350+) = 0.9 is much greater than P(win) = 0.5. Scoring big is strong evidence of winning. And by the averaging rule, its win rate when scoring under 350 must be below 50%.
An e-commerce version is product recommendation. Only 2% of all shoppers buy a phone case. Among shoppers who just bought a phone, 30% buy a case.
lift = 0.30 / 0.02 = 15That lift of 15 is why the site shows cases on the phone confirmation page. Association-rule mining ("people who bought X also bought Y") is a search for conditional probabilities much larger than the marginals.
Follow-up questions to expect
- "Is P(A | B) always greater than P(A and B)?" — It is always greater than or equal, because P(A and B) = P(A | B) × P(B) and P(B) is at most 1.
- "What is the base-rate fallacy?" — Confusing P(disease | positive) with P(positive | disease), and so ignoring how rare the disease is. With a 1% base rate, a test that catches 90% of cases but falsely flags 5% of healthy people still gives mostly false positives.
- "Can conditioning on a variable reverse a trend?" — Yes, that is Simpson's paradox: a treatment can look better overall but worse in every subgroup when the groups have very different sizes.