A new test has been developed to detect a particular type of cancer. The test must be evaluated before it is put into use. A medical researcher selects a random sample of 1,000 adults and finds (by other means) that 4% have this type of cancer. Each of the 1,000 adults is given the new test, and it is found that the test indicates cancer in 99% of those who have it and in 1% of those who do not.
a) Based on these results, what is the probability of a randomly chosen person having cancer given that the test indicates cancer?
b) What is the probability of a person having cancer given that the test does not indicate cancer?