Bayes' theorem calculator for a positive test

Put in how common the condition is, how often the test catches it and how often it clears someone who's healthy, and you'll see the chance that a positive result is real. You'll also see what a second positive from an independent test does to that, and the same figures as counts out of 10,000 people, which I find is the easiest way to see what's going on.

Chance a positive is real
Chance a negative is really clear
After a second independent positive
Out of 10,000 people: true positives
Out of 10,000 people: false positives

How it works

Picture 10,000 people with a 1% rate. You'd have 100 with the condition, and the test catches 99 of them. The other 9,900 are healthy, and even a test that clears 95% of them still flags 495, so you end up with 594 positives of which only 99 are real. That's about 16.7%, and it's Bayes' theorem done with counts, the true positives divided by all the positives.

If you then get a second positive from an independent test, you start from 16.7% this time, and with the same test that takes you to about 79.8%. Interviewers ask this one because almost everybody's first guess is 99%, and I think counting people is the quickest way to show you why it's wrong. I've checked the figures against exact fractions.

More probability questions of this kind, with worked answers: quant interview probability questions