Bayes’ theorem
Bayes’ theorem reverses a conditional: P(A|B) = P(B|A)P(A)/P(B), with P(B) usually expanded by the law of total probability. Its famous consequence is that a highly accurate test for a rare condition still produces mostly false positives — the base rate P(A) dominates, and ignoring it is the single most common probabilistic error in medicine and law.
✓ Unlimited questions · marked criterion by criterion · no card needed
Method: how to approach it
The order below is what examiners expect to see, and each step carries its own marks.
- Name the events and list what you are givenTypically P(disease), P(positive | disease) and P(positive | no disease). Write them down before computing.
- Compute the denominator by total probabilityP(B) = P(B|A)P(A) + P(B|Aᶜ)P(Aᶜ). This is where the base rate enters.
- Assemble BayesP(A|B) = P(B|A)P(A)/P(B). The numerator is one of the terms in the denominator.
- Sanity check against the base rateThe posterior should move in the direction the evidence points, but stay anchored by a small prior.
Worked example
A disease affects 1% of people. A test is 99% sensitive and 95% specific. Given a positive result, what is the probability of having the disease?
- P(D) = 0.01, P(+|D) = 0.99, P(+|Dᶜ) = 1 − 0.95 = 0.05.
- P(+) = 0.99(0.01) + 0.05(0.99) = 0.0099 + 0.0495 = 0.0594.
- P(D|+) = 0.0099 / 0.0594.
- = 1/6 ≈ 0.1667.
Answer. About 16.7% — despite a 99% sensitive test, most positives are false, because healthy people vastly outnumber sick ones.
Where marks get dropped
These are the specific errors that cost credit on bayes’ theorem questions — QED's rubric penalises each of them separately.
- Reporting the sensitivity as the answer. P(+|D) = 0.99 is not P(D|+), and confusing them is the base rate fallacy.
- Forgetting the false positives from the healthy majority. With a 1% prevalence they outnumber true positives five to one here.
- Mixing up specificity with the false positive rate. Specificity is P(−|Dᶜ); the false positive rate is its complement.
Practise this until it is automatic
Unlimited fresh questions
QED generates new bayes’ theorem problems on demand at warm-up, exam and challenge level, so you can drill this one skill until it stops costing you marks.
Marked like an examiner
Every answer is scored against a point-by-point rubric with partial credit, so you see exactly which step of the method broke down — not just a tick or a cross.
Answer in real notation
A one-tap symbol palette, a visual equation editor and a truth-table builder — or photograph your handwritten working and QED converts it to LaTeX.
Saved to your library
Every question you generate is kept and re-takeable as a timed exam, and your Probability mastery is tracked so you know when this is exam-ready.
Bayes’ theorem — frequently asked questions
Why is the answer so low?
Because 99% of people are healthy, and 5% of them test positive — that is 4.95% of the population, versus 0.99% true positives. Sheer numbers dominate.
What are prior and posterior?
The prior P(A) is the probability before the evidence; the posterior P(A|B) is after. Bayes is the rule for updating one into the other.
How do I handle repeated tests?
Use the posterior from the first test as the prior for the second, assuming conditional independence given the true state. Two independent positives raise the probability sharply.
The rest of Probability
Events, conditional probability, random variables. Each subtopic below has its own method, worked example and mark-losing traps.
- 1Sample spaces & events
- 2Conditional probability & independence
- 3Bayes’ theorem
- 4Random variables & expected value
- 5Variance & standard deviation
- 6Binomial & uniform distributions
- 7Law of total probability & tree diagrams
- 8Geometric & Poisson distributions
- 9Joint, marginal & conditional distributions
- 10Markov & Chebyshev bounds
- 11Equally likely outcomes & counting
- 12Linearity of expectation
- 13Indicator random variables
Ready to make bayes’ theorem exam-proof?
Generate your first questions free — no card, no setup, no personal data stored. Practise until the method is second nature.
Start practising free →