Suppose the prevalence of people with certain cancer in a give year is 0.015. In addition suppose that the diagnostic test for this cancer is know to have a false positive rate of 0.05 and a false negative rate of 0.10 . Suppose a person is aware of the false positive and false negative rates for this exam. So when he gets a postitive result he takes the exam again

a) if the second test is also positive what are his chances of actually having cancer
b) if the second test is negative what are his chances and should he get another test?

An excel spreadsheet is very helpful for these kinds of problems.

First calculate the probabilities for all possible outcomes. There are two kinds of people with and without cancer, the first test can have two outcomes positive and negative, and the second test has two outcomes. So, there are 8 possible outcomes.
So, the probability that a person has cancer and the two tests are positive is .015*.90*.90 = .01215. Repeat for the 7 other possibilities.
The probability that a person doesnt have cancer and the two tests are (false) positives is .985*.05*.05 =

An excel spreadsheet is very helpful for these kinds of problems.

First calculate the probabilities for all possible outcomes. There are two kinds of people with and without cancer, the first test can have two outcomes positive and negative, and the second test has two outcomes. So, there are 8 possible outcomes.
So, the probability that a person has cancer and the two tests are positive is .015*.90*.90 = .01215. Repeat for the 7 other possibilities.
The probability that a person doesnt have cancer and the two tests are (false) positives is .985*.05*.05 = .0024625

So, a) conditional on two positive tests, the likelihood of having cancer is .01215/(.01215+.0024625) = .831

b) take it from here.

To answer these questions, we can use conditional probabilities and the concept of Bayes' theorem. Let's break it down step by step:

a) If the second test is also positive, we want to calculate the probability of actually having cancer. Let's denote the event "having cancer" as C, and the event "positive test" as P.

The probability of having cancer (C) is given as 0.015 or 1.5% (prevalence). The false positive rate means that the probability of a positive test (P) given no cancer (not C) is 0.05. Therefore, the probability of a positive test given cancer (P|C) would be 1 (100%).

Using Bayes' theorem, we can calculate the probability of having cancer given a positive test:

P(C|P) = (P(P|C) * P(C)) / P(P)

P(P|C) = 1
P(C) = 0.015
P(P) = P(P|C) * P(C) + P(P|not C) * P(not C) = 1 * 0.015 + 0.05 * (1 - 0.015)

Now, we can substitute these values into the formula:

P(C|P) = (1 * 0.015) / (1 * 0.015 + 0.05 * (1 - 0.015))

By calculating this, we can determine the probability of actually having cancer if the second test is also positive.

b) If the second test is negative, we want to calculate the probability of having cancer in this case. Let's denote the event "negative test" as N.

Similar to the previous calculation, the probability of a negative test given cancer (N|C) would be 0.10.

Using Bayes' theorem again, we can calculate the probability of having cancer given a negative test:

P(C|N) = (P(N|C) * P(C)) / P(N)

P(N|C) = 0.10
P(C) = 0.015
P(N) = P(N|C) * P(C) + P(N|not C) * P(not C) = 0.10 * 0.015 + (1 - 0.05) * (1 - 0.015)

Now, we can substitute these values into the formula:

P(C|N) = (0.10 * 0.015) / (0.10 * 0.015 + (1 - 0.05) * (1 - 0.015))

By calculating this, we can determine the probability of having cancer if the second test is negative.

Based on these calculated probabilities, we can assess whether getting another test is necessary or recommended.