At the beginning of this problem, part of this chart can be filled in as follows:
Has disease | Does not have disease | Totals | |
Test positive | |||
Test negative | |||
Totals | 0.19 | 0.81 | 1 |
If we say that A is testing positive and B is having the disease, then the sensitivity of the test is interpreted as the probability of testing positive, given that the patient has the disease, or P(A|B). We can get P(A∩B) from the formula P(A∩B)=P(A|B)P(B). So this would be P(A∩B) = 0.9 · 0.19 = 0.171. Similarly, we can find P(A'∩B'). The specificity is interpreted as the probability of testing negative, given that the patient does not have the disease, or P(A'|B'). Since we know this to be 0.95, and we know P(B') to be 0.81, we get P(A'∩B')=P(A'|B')P(B') = 0.95 · 0.81 = 0.7695.
Now we can add these to the chart:
Has disease | Does not have disease | Totals | |
Test positive | 0.171 | ||
Test negative | 0.7695 | ||
Totals | 0.19 | 0.81 | 1 |
All the rest can be filled in by subtracting and adding according to the totals, as follows:
Has disease | Does not have disease | Totals | |
Test positive | 0.171 | 0.0405 | 0.2115 |
Test negative | 0.019 | 0.7695 | 0.7885 |
Totals | 0.19 | 0.81 | 1 |
If we multiply these percentages by 1,000,000, we get this chart of expected values:
Has disease | Does not have disease | Totals | |
Test positive | 171,000 | 40,500 | 211,500 |
Test negative | 19,000 | 769,500 | 788,500 |
Totals | 190,000 | 810,000 | 1,000,000 |