Quote:
Originally Posted by Steve
Another math problem that people often get wrong is this. A certain disease strikes 1 out of 1000 people, totally at random. There's a test for the disease that's 95% accurate. If you have the disease, there's a 95% chance the test will say positive, and a 5% chance it says negative, and if you don't have the disease there's a 95% chance the test says negative, and a 5% chance it says positive. You take the test, and it comes back positive. What are the chances you have the disease?

If 10% of people have the disease  100 out of 1000, then there will be 95 true positives, and 5 false negatives, and of the 900 who don't have it, there will be 855 true negatives, and 45 false positives. That adds up to 140 positives (45 of them, or 32% false), and 860 negatives (5 of them false). If it comes back positive, 95 of the 140 positives are true, so the chance of having the disease would be about 68%.
If 20% of people have the disease  200 out of 1000, then there will be 190 true positives, and 10 false negatives, and of the 800 who don't have it, there will be 760 true negatives, and 40 false positives. That adds up to 230 positives (40 of them, or 17% false), and 770 negatives (10 of them false). If it comes back positive, 190 of the 230 positives are true, so the chance of having the disease is about 83%.
I could go on, but suffice to say that this varies nonlinearly with the disease rate. I put it into a spreadsheet and for disease rates from 1% to 20%, there's a curve from 16% to 83% likelihood that a positive result means you really have the disease.
As the disease rate goes smaller and smaller, the ratio of that "successful test" to "disease rate" approaches 19:1, or the success rate of the tests. It's really quite interesting to see in a spreadsheet.
Suppose the disease rate is .0001%, so in 100 million people, you have 100 people with the disease. With the 95/5 accuracies on the test, you'll catch 95 out of the 100 people with the disease, but you will also get a whopping 4,999,995 false positives. The chance of a true positive, of all positives, is 95/4,999,995 or about 0.0019%, or 19 times the disease rate.