Statistics Quest

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.

P(A∣B)=P(A∩B)P(B),P(B)>0P(A \given B) = \frac{P(A \cap B)}{P(B)}, \quad P(B) > 0
Definition of conditional probability.
P(A∩B)P(A \cap B)
Probability that both happen.
P(B)P(B)
Probability of the conditioning event.
A, B independent  ⟺  P(A∩B)=P(A) P(B)  ⟺  P(A∣B)=P(A)A,\,B \text{ independent} \iff P(A \cap B) = P(A)\,P(B) \iff P(A \given B) = P(A)
Independence.
P(A)P(A)
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 P(A∣B)P(A \given B) with P(B∣A)P(B \given A) — 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 (P(M)=0.3P(M) = 0.3) and 12% are members who renewed early (P(R∩M)=0.12P(R \cap M) = 0.12). P(R∣M)=0.12/0.3=0.4P(R \given M) = 0.12/0.3 = 0.4: 40% of members renewed early. If 25% of all customers renewed early, P(R∣M)=0.4≠0.25P(R \given M) = 0.4 \ne 0.25, so membership and early renewal are not independent.