Conditional Probability
“Conditional probability re-measures B after 'shrinking the world to A'.”
The formula
P(B|A) = P(A∩B) / P(A)How to read it: the probability of B given that A happened is the probability of A and B together, divided by the probability of A
- P(B|A)
- — the probability of B given that A has happened
- P(A∩B)
- — the probability that A and B both happen
- P(A)
- — the probability of the conditioning event A
The hook
'The chance of rain' and 'the chance of rain given a cloudy sky' are different — one new piece of information can rewrite the probability entirely.
In plain words
Given that event A has already happened, it's the probability B happens under that condition. You shrink the world to A, then weigh B.
The intuition
The moment a condition appears, the 'whole set of cases' changes. Keep only the 'world where A happened' instead of the full sample space, and re-measure B's share inside it. That's why you divide A∩B by A — the denominator shrinks from everything down to A.
How it's built
The top is where A and B both occur, P(A∩B); the bottom is the narrowed new whole, P(A). Rearranged, this gives P(A∩B)=P(A)·P(B|A), the 'multiplication rule' that chains sequential events together.
Example
Roll a die with A=even (2,4,6), B=at least 4 (4,5,6). Given it's even, the chance it's ≥4? Of the 3 evens, {4,6} are ≥4 → 2/3. By formula too: (2/6)/(3/6)=2/3.
Common mistake
P(B|A) and P(A|B) are not the same. Swapping 'probability of testing positive given the disease' with 'probability of the disease given a positive test' causes fatal errors in medicine and courtrooms.
Where it's used
Medical diagnosis (disease probability given a positive test), spam filters, recommendation algorithms, weighing evidence in trials — anywhere you 'update a judgment with new information'.
Where it came from
The idea of reversing a conditional probability to infer a cause led to Reverend Bayes's 18th-century theorem, now the backbone of AI inference.
Prerequisites
Quick check
If P(A)=0.5 and P(A∩B)=0.2, what is P(B|A)?
- 0.2
- 0.4✓
- 0.5
- 0.7
Practice
If P(A)=0.4 and P(A∩B)=0.1, find P(B|A).
Answer: 0.25
- P(B|A) = P(A∩B)/P(A) = 0.1/0.4
- = 0.25
Takeaway: Divide the joint probability by the condition's probability.
Given a die roll came up even, find the probability the number is at least 4.
Answer: 0.667
- Evens are {2,4,6}, three of them
- Among these, ≥4 is {4,6}, two of them
- 2/3 ≈ 0.667
Takeaway: The condition shrinks the sample space to the evens.
If P(A)=0.6 and P(A∩B)=0.3, find P(B|A).
Answer: 0.5
- 0.3 / 0.6
- = 0.5
Takeaway: The denominator is the narrowed new whole.
Explain in one line why the denominator is P(A) in conditional probability.
Answer: undefined
- Knowing A happened shrinks the whole world to A
- Now B's share must be measured 'inside A'
- So we divide by P(A)
Takeaway: A condition is a lens that makes A the new whole.