conditional probability
Also called: P(A | B), probability given
The probability of A when you already know B is true, written P(A | B) and read "A given B": P(A and B) ÷ P(B). The condition shrinks the denominator to the cases where B holds.
Example
Klasna’s churn model flags 120 of 1,000 Club members; 48 of them cancel, and 80 cancel in total.
- P(cancel) = 80 ÷ 1,000 = 0.08.
- P(cancel | flagged) = 48 ÷ 120 = 0.40 (precision).
- P(flagged | cancel) = 48 ÷ 80 = 0.60 (recall).
Common mistakes
- Swapping the condition. P(A | B) ≠ P(B | A): 0.40 vs 0.60 above.
- Reading a p-value backwards. It conditions on "no effect"; it is not P(no effect).
- Trusting accuracy on rare events. A model that flags nobody scores 92% here and catches nothing.
- Dividing by the whole table. The denominator of a conditional probability is the condition’s row or column.
Learn it in the course
- Conditional probability and the 2×2 table · P(A | B) as a share inside a row, precision, recall and accuracy, relative risk and the odds ratio, and why the direction of a condition matters.