Math foundations
Conditional Probability: Given That B Happened
The idea
Unconditional probability asks how common A is in the full population. Conditional probability asks how common A is among cases where B already happened. That restriction changes the denominator.
Screening is the classic trap: a positive test is not the same event as having the condition. P(disease | positive test) and P(positive test | disease) use the same joint counts but answer different questions.
Conditional probability answers: Among cases where B is true, how often is A true?
Example: P(A | B) is not P(B | A)
Conditional probability restricts you to cases where B already happened. Swapping A and B changes the denominator.
A positive test does not mean the same thing as a sick patient.
P(A)
2.0%
Has condition
P(B)
9.0%
Positive test
P(A | B)
20.0%
Given Positive test
P(B | A)
90.0%
Given Has condition
P(Has condition | Positive test) = 20.0%, but P(Positive test | Has condition) = 90.0%. They swap numerator and restrict to different groups.
The math
Definition
Restrict to outcomes where B happened. What share of that slice also has A? If P(B) is zero, the conditional is undefined.
Chain form
Joint probability factors into a conditional times the probability of the condition. This is the bridge to dependent chains and Bayes updates.
Do not swap
High test accuracy on sick patients does not automatically mean a positive test implies a high chance of disease. Base rate and false positives still matter.
A simple application
Before you staff a review queue from model alerts, ask what a flag means in your population. The conditional read is what reviewers experience, not the model's recall on known positives alone.
The habit: name the given event out loud. “Given this alert fired” is a different sample than “given this order is fraud.” The applied posts on base rates, screening, and threshold tradeoffs build on this definition.