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

To compute the probability that a person who tests positive actually has the disease, we can use Bayes' theorem. Bayes' theorem is a way of updating probabilities based on new information.

Let's denote:
- A: the event that a person has the disease
- B: the event that a person tests positive

We want to find P(A|B), the probability that a person has the disease given that they tested positive.

By Bayes' theorem, we have:

P(A|B) = (P(B|A) * P(A)) / P(B)

Where:
- P(B|A): the probability of testing positive given that a person has the disease (true positive rate)
- P(A): the probability of a person having the disease (incidence rate)
- P(B): the probability of testing positive

Let's calculate each of these probabilities step by step:

1. P(B|A) = 1 - false negative rate = 1 - 0.05 = 0.95
(The false negative rate is the complement of the true positive rate.)

2. P(A) = incidence rate = 0.6% = 0.006
(The incidence rate is given in the problem as a percentage, which needs to be divided by 100 to convert it into a decimal.)

3. P(B) = P(B|A) * P(A) + P(B|not A) * P(not A)
(The probability of testing positive can be calculated as the sum of the probabilities of testing positive given that the person has the disease, multiplied by the probability of having the disease, and testing positive given that the person does not have the disease, multiplied by the probability of not having the disease.)

P(B) = 0.95 * 0.006 + 0.02 * (1 - 0.006)
= 0.0057 + 0.01388
= 0.01958

Now we can substitute the values into Bayes' theorem:

P(A|B) = (0.95 * 0.006) / 0.01958
= 0.0057 / 0.01958
≈ 0.2917

Therefore, the probability that a person who tests positive actually has the disease is approximately 0.2917, or 29.17%.