0

Cancer is present in 22% of a population and is not present in the remaining 78%.

An imperfect clinical test successfully detects the disease with probability 0.70. Thus, if a person has the disease, the probability is 0.70 that the test will be positive and it is 0.30 that the test is negative.

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.220.70 + 0.780.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 .

RobPratt
  • 50,938
  • Related: https://math.stackexchange.com/questions/2279851/applied-probability-bayes-theorem/2279888#2279888 – Ethan Bolker Dec 09 '17 at 18:14
  • See https://en.wikipedia.org/wiki/Bayes'_theorem#Drug_testing for an example of just this sort of problem. – amd Dec 09 '17 at 21:32

2 Answers2

1

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...

Dean
  • 1,440
0

One way to solve this is to assume a large enough population size and calculate the number of people in each subgroup.

If the total population is 10 000, we have 2200 people with the disease and 7800 without.

Among the 2200, we have 70% positive tests, 1540 people.

Among the 7800, we have 5% positive tests, 390 people.

             has disease   healthy    total
tests +         1540           390     1930
tests -          660          7410     8070
total           2200          7800    10000

A random person who has tested positive has a probability of 1540/1930 ≈ 0.80 of having the disease.

Another way to express it, with Bayes' theorem:

p(A|X) = p(X|A) * p(A) / p(X)

p(A) = 0.22 (given) p(X) = 0.193 (calculated in the table, 1930 / 10000) p(X|A) = 0.7 (given)

0.7 * 0.22 / 0.193 ≈ 0.7979