The formula
P(A|B) = P(A∩B) ÷ P(B)
What it means
Conditioning shrinks the space of cases. Knowing B has happened rules out every case where it did not, so the probability of A is no longer measured against the whole but only within B. That is why you divide by P(B): you are changing the denominator.
How to work it out by hand
- Write the probability of each event on its own
- Write the probability that both happen
- Divide the probability of both by the one you know has happened
- Compare the overlap with the product: if they match, they are independent
What is worth knowing
Confusing P(A|B) with P(B|A) is behind a great deal of badly read statistics, and it has a name: the prosecutor's fallacy. “80 % of crash victims were wearing a seatbelt” does not make seatbelts dangerous, because nearly everyone wears one: the figure that matters is the other way round. The independence test is useful on its own too: if the overlap matches the product of the two probabilities, knowing one tells you nothing about the other, and if it departs from it, they are related.