To prevent an epidemic outbreak, all the inhabitants of a city are tested for a virus. The whole population can be divided into the subsets and the corresponding complements and . The test has sensitivity (i.e. test positive if infected) and specificity (i.e. test negative if healthy) Of the whole population only a percentage of is sick. Paul has a positive test result. To the nearest integer percentage, what is the probability , that he is actually infected?
Bonus question: Paul is repeatedly tested positive in a second test. How high is the probability that he is infected? (Both tests are statistically independent and have the same effectiveness and specificity.)
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
In a city with N = 1 0 0 , 0 0 0 inhabitants N P ( I ) = 1 0 0 persons are infected. Out of them N P ( T ∣ I ) P ( I ) = 9 9 persons are tested positive. Out of the healthy population of N P ( I ) = 9 9 , 9 0 0 people a percentage of P ( T ∣ I ) = 1 − P ( T ∣ I ) = 2 % are also tested positive, so that we have N P ( T ∣ I ) P ( I ) = 1 9 9 8 false positive test results. The probablitity for a positive tested person to be infected results P ( I ∣ T ) = P ( T ∣ I ) P ( I ) + P ( T ∣ I ) P ( I ) P ( T ∣ I ) P ( I ) = 9 9 + 1 9 9 8 9 9 = 4 . 7 2 1 % ≈ 5 % Altough the test has a fairly large sensitivity and specitivity, only 5 % of the positive tests are actually correct due to the small amount of infections in the whole population.
For the second test we have group of N ′ = 2 0 9 7 people with 9 9 infections. Out of them 9 8 persons are tested a second time true positive. Out of 1 9 9 8 healthy people there are still 4 0 false positive test. Therefore, the infection probability results P ( I ∣ T 1 ∩ T 2 ) ≈ 9 8 + 4 0 9 8 ≈ 7 1 % After the second positive test result, Paul is probably infected, but we are still far from certainty.