Suppose that the reliability of a HIV test is specified as follows:

Of people having HIV, 90% of the test detect the disease but 10% go undetected. Of people free of HIV, 99% of the test are judged HIV–ive but 1% are diagnosed as showing HIV+ive. From a large population of which only 0.1% have HIV, one person is selected at random, given the HIV test, and the pathologist reports him/her as HIV+ive. What is the probability that the person actually has HIV?

0.083

To solve this problem, we can use Bayes' theorem. Bayes' theorem allows us to update our prior belief about an event based on new information.

Let's define the events:
HIV+ive: The person actually has HIV.
HIV-ive: The person does not have HIV.
Test+ive: The test reports the person as HIV+ive.
Test-ive: The test reports the person as HIV-ive.

We want to find the probability that the person actually has HIV given that the test reports them as HIV+ive. We can denote this probability as P(HIV+ive | Test+ive).

According to Bayes' theorem, we can express this probability as:
P(HIV+ive | Test+ive) = (P(Test+ive | HIV+ive) * P(HIV+ive)) / P(Test+ive)

Let's calculate the individual probabilities step by step:

1. P(Test+ive | HIV+ive): This is the probability that the test reports a person with HIV as being HIV+ive. From the given information, we know this probability is 90%, or 0.9.

2. P(HIV+ive): This is the prior probability that a randomly selected person has HIV. From the problem statement, we know that only 0.1% of the population has HIV, which is equivalent to 0.001.

3. P(Test+ive): This is the probability that the test reports a person as HIV+ive, regardless of whether they actually have HIV or not. To calculate this probability, we need to consider two possibilities: (1) a person has HIV and the test reports them as HIV+ive, and (2) a person does not have HIV, but the test incorrectly reports them as HIV+ive.

P(Test+ive) = P(Test+ive | HIV+ive) * P(HIV+ive) + P(Test+ive | HIV-ive) * P(HIV-ive)

From the given information, we know:
- P(Test+ive | HIV+ive) = 0.9
- P(Test+ive | HIV-ive) = 0.01 (since 1% of people free of HIV are diagnosed as showing HIV+ive)
- P(HIV-ive) = 1 - P(HIV+ive) = 1 - 0.001 = 0.999

Plugging in the values:
P(Test+ive) = 0.9 * 0.001 + 0.01 * 0.999

Now we can substitute all the values into Bayes' theorem to find the probability that the person actually has HIV given that the test reports them as HIV+ive:

P(HIV+ive | Test+ive) = (0.9 * 0.001) / (0.9 * 0.001 + 0.01 * 0.999)

By calculating this expression, we can find the final answer.