All courses › Mathematics R1 › Bayes and conditional probability

Bayes and conditional probability

Conditional probability is the probability of AA when you already know that BB has happened. Bayes' theorem reverses the condition: from the probability of a positive test given the disease, to the probability of the disease given a positive test. You first need the total probability of a positive test. If the disease is rare, most positive tests can still belong to healthy people.

P(A∣B)=P(A∩B)P(B)P(A\mid B) = \frac{P(A \cap B)}{P(B)}conditional probability
P(A∣B)=P(B∣A)P(A)P(B)P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)}Bayes

Symbols

P(A)P(A)the probability of A
P(BmidA)P(Bmid A)the probability of B given A

Example

Two percent are sick. The test catches 90% of the sick and 5% of the healthy. P(positive)=0.02⋅0.9+0.98⋅0.05=0.067P(\text{positive}) = 0.02\cdot 0.9 + 0.98\cdot 0.05 = 0.067. Bayes gives 0.0180.067≈0.2687\dfrac{0.018}{0.067} \approx 0.2687.

The denominator is everyone who tests positive, both sick and healthy.
Practise probability and combinatorics for free →

← Binomial probability · Limits and cancellation →

Part of Mathematics R1: Probability and combinatorics.