# Bayes Theorem Probability Question: cancer or not

Cancer is present in 22% of a population and is not present in the remaining 78%. An imperfect clinical test successfully detects the disease and with probability 0.70. Thus, if a person has the disease in the serious form, the probability is 0.70 that the test will be positive and it is 0.30 if the test is negative. Moreover among the unaffected persons, the probability that the test will be positive is 0.05. A person selected at random from the population is given the test and the result is positive. What is the probability that this person has the cancer ?

p(A) = Person Has Cancer p(X) = Positive Result

p(A|X) => p(X|A)P(A)/p(X|A)P(A)+p(X|~A)P(~A)

p(A) = 0.70 p(~A) = 0.30 p(X|A) = 22% = 0.22 p(X|~A) = 0.78

=> 0.22 * 0.70/0.22*0.70 + 0.78*0.30 => 0.397

Is my answer and concept is right towards this question ? if not, please correct me out. I am new to probability and help is appreciated .

You have written Bayes theorem correctly but have mixed up the terms.

P(A) is the "prior" probability of a person having cancer (prior to the test result) this value is 0.22.

P(X|A) is the likelihood: the probability of having a positive test result for a person with cancer (remember "|" means "given"): this value is 0.7

Hopefully it is clear now what the other terms are...