The chance of A once you know that B has already happened.
P(A|B) = P(A∩B) / P(B)
Key idea
P(A|B), read "A given B," is the chance of A once B has already happened — you shrink the world to just B. (e.g. rain given it is cloudy)
The formula divides the overlap (the intersection) by the given event: P(A|B) = P(A and B) / P(B). (e.g. 0.2 / 0.4 = 0.5)
P(A|B) and P(B|A) are usually NOT the same — swapping them is a classic error. (e.g. P(rain|clouds) is not P(clouds|rain))
If A and B are independent (one does not affect the other), conditioning changes nothing: P(A|B) = P(A). (e.g. 0.5 = 0.5)
Rearranged, this is the multiplication rule: P(A and B) = P(A|B) x P(B). (e.g. 0.5 x 0.4 = 0.2)
Definition
P(A∣B)=P(B)P(A∩B)
P(A∩B)
chance both A and B happen
P(B)
chance B happens (the known part)
P(A∣B)
chance of A given B already happened
In plain words
Once you know B happened, only the B circle is left. Of that circle, the slice that also touches A is the conditional chance — the chance of A now that B is certain.
Where you'd use it
In a class, 20% like both pizza and ice cream, and 40% like ice cream. Among the ice-cream lovers, the chance they also like pizza is P(pizza|ice cream) = 0.2 / 0.4 = 50%.
A drawn card is red. The chance it is also a king is P(king|red) = (2/52) / (26/52) = 2/26 ≈ 7.7% — conditioning on "red" halves the deck.
If P(disease ∩ positive) = 0.0099 and P(positive) = 0.0594, then P(disease|positive) ≈ 17% — a positive test on a rare disease is often wrong.
Worked example 4
If P(A∩B) = 0.2 and P(B) = 0.4, then given B has happened, A happens 50% of the time: 0.2 / 0.4 = 0.5.
Frequently asked questions
What does P(A|B) mean?
The probability of A given that B has already happened — you restrict the world to just B.
What’s the formula?
P(A|B) = P(A∩B) / P(B) — the overlap divided by the probability of the "given" event.
Is P(A|B) the same as P(B|A)?
No — they have different denominators and are usually different. Confusing them is a classic error.
How does it relate to independence?
If A and B are independent, P(A|B) = P(A): knowing B tells you nothing about A.