condprob() — Conditional probability

The chance of A once you know that B has already happened.

P(A|B) = P(A∩B) / P(B)

Key idea

Definition

chance both A and B happen
chance B happens (the known part)
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

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.