I feel like I spend a lot of time explaining the difference between $P(A | B)$, $P(B | A)$ and $P(A \cap B)$, so I figured it would be good to have an article I can point people at to explain properly.

Let’s imagine we’re at an animal shelter where there are many animals of all descriptions. I’m going to pick an animal at random; my events are $A$: the animal I pick has four legs; and $B$: the animal I pick is a cat.

### $\cap$ means both things are true

$P(A \cap B)$ is the probability that the animal I pick is a four-legged cat. That’s the simplest to understand: it’s just the number of four-legged cats out of all of the animals in the shelter.

### $A|B$ means “$A$ given $B$”

“Given” is a word that seems to cause confusion. It simply means, “if you know the second thing is true, what’s the probability of the first?”

In this context, $P(A|B)$ means “the probability of my selected animal having four legs, given that it’s a cat.” That is to say, I’ve picked out a cat from the list; how likely is it to have four legs? Obviously, this depends on the shelter, but in general, you’d expect that to be quite a high probability: $P(A|B)$ would be quite close to 1 here.

By contrast, $P(B|A)$ means “the probability of my animal being a cat, given that it has four legs.” That is to say, I’ve picked out a quadruped from the list. How likely is it to be a cat? Again, it depends on the shelter, but you’d expect several dogs, guinea pigs, rats, lizards and alpacas ((Probably not alpacas)) as well - $P(B|A)$ would be rather small.

### The key point

The key thing is that “given [a condition]” means you have to ignore everything that doesn’t satisfy your condition. For example, in $P(A|B)$, you don’t care about the other animals, only about the cats. You’re only interested in the proportion of four-legged cats out of all of the cats.