A certain disease has an incidence rate of 0.5%. If the false negative rate is 7% and the false positive rate is 2%, compute the probability that a person who tests positive actually has the disease.

A contingency table helps.

Complete the table

Test . has . . doesn't have
result disease disease
+ = 0.005*0.93 0.995*.02
- = 0.005*0.07 0.995*.98
tot. 0.005 0.995

The probability of a person who tests positive actually has the disease is in one of the cells.

To compute the probability that a person who tests positive actually has the disease, we can use Bayes' theorem. Bayes' theorem allows us to update the probability of an event based on new information or test results.

Let's define the following events:
D: Person has the disease
P: Person tests positive

We are given the following information:
P(D) = 0.5% (0.005) - This is the incidence rate or the probability that a randomly chosen person has the disease.
P(P|D') = 2% (0.02) - This is the false positive rate or the probability that a person tests positive given that they do not have the disease.
P(P'|D) = 7% (0.07) - This is the false negative rate or the probability that a person tests negative given that they have the disease.

We want to find P(D|P), which is the probability that a person has the disease given that they test positive.

Using Bayes' theorem:
P(D|P) = (P(P|D) * P(D)) / P(P)

Now let's calculate the individual probabilities:

1. P(P) - This is the probability of testing positive. It can be calculated using the false positive rate and the probability of not having the disease:
P(P) = P(P|D') * P(D') + P(P|D) * P(D)

P(D') - This is the probability of not having the disease, which is 1 - P(D):
P(D') = 1 - P(D) = 1 - 0.005 = 0.995

P(P) = (0.02 * 0.995) + (0.07 * 0.005)

2. P(D|P) - This is the probability of having the disease given that the person tests positive:
P(D|P) = (P(P|D) * P(D)) / P(P)

P(D|P) = (0.02 * 0.005) / P(P)

Now we have all the information needed to calculate P(D|P). Let's do that:

P(P) = (0.02 * 0.995) + (0.07 * 0.005) = 0.0199

P(D|P) = (0.02 * 0.005) / 0.0199 ≈ 0.0050251

Therefore, the probability that a person who tests positive actually has the disease is approximately 0.0050251, or about 0.5025%.