Probability

Lesson 4 of 14

Bayes' Theorem

Reversing conditional probabilities: priors, likelihoods, posteriors, and the medical test puzzle.

Reversing the conditional

Often you know P(B∣A)P(B \mid A) but need P(A∣B)P(A \mid B): a test's accuracy given disease versus the chance of disease given a positive test. Bayes' theorem flips the conditioning:

P(A∣B)=P(B∣A) P(A)P(B)P(A \mid B) = \frac{P(B \mid A)\,P(A)}{P(B)}

with the denominator expanded by the law of total probability: P(B)=P(B∣A)P(A)+P(B∣Ac)P(Ac)P(B) = P(B \mid A)P(A) + P(B \mid A^c)P(A^c).