QED
Probability · step 3 of 13

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.

  1. Name the events and list what you are givenTypically P(disease), P(positive | disease) and P(positive | no disease). Write them down before computing.
  2. Compute the denominator by total probabilityP(B) = P(B|A)P(A) + P(B|Aᶜ)P(Aᶜ). This is where the base rate enters.
  3. Assemble BayesP(A|B) = P(B|A)P(A)/P(B). The numerator is one of the terms in the denominator.
  4. 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?

  1. P(D) = 0.01, P(+|D) = 0.99, P(+|Dᶜ) = 1 − 0.95 = 0.05.
  2. P(+) = 0.99(0.01) + 0.05(0.99) = 0.0099 + 0.0495 = 0.0594.
  3. P(D|+) = 0.0099 / 0.0594.
  4. = 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.

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.

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 →