A disease affects 1 in 1000. The test is positive for 99 % of the sick and 1 % of the healthy. If you test positive, what is roughly the probability you are sick?
Bayes' theorem inverts a conditional probability: it gives the probability \(P(B_j\mid A)\) of a cause \(B_j\) given an observed effect \(A\), from the probability of the effect given that cause.