Conditional probability and independence
P(A | B) is the probability of A among the cases where B happened; A and B are independent when knowing B does not change the probability of A.
- Probability that both happen.
- Probability of the conditioning event.
- Unconditional (marginal) probability of A.
When to use
- Two-way tables: condition on a row or a column and read the proportion within it.
- Screening, risk and conversion questions ("of customers who saw the offer, what fraction bought?").
- Checking whether two categorical variables are related (formally: chi-square test of independence).
How to interpret
Conditioning shrinks the sample space to the cases where B occurred. Independence in a table means the conditional distributions are the same in every row.
Common mistakes
- Confusing with — e.g. P(positive test | disease) vs P(disease | positive test). Use Bayes' theorem to turn one into the other.
- Dividing by the wrong total in a two-way table (grand total instead of the row or column total).
- Concluding causation from dependence.
Example
In a survey, 30% of customers are members () and 12% are members who renewed early (). : 40% of members renewed early. If 25% of all customers renewed early, , so membership and early renewal are not independent.