Hunter says she is itchy. There is a test for allergy to cats, but this test is not always right: for people that really do have the allergy, the test says "yes" 80% of the time for people that do not have the allergy, the test says "yes" 10% of the time ("false positive") if 1% of the population have the allergy, and hunter's test says "yes", what are the chances that hunter really has the allergy?
Answers
Answer:
first we know the chance of having allergy when test says yes and written P(Allergy|Yes)
Then the formula is
P(Allergy|yes)=
Here P(allergy) is probability of allergy=1%
P(Yes|Allergy) is probability of test saying yes for people with allergy=80%
P(Yes) is probability of test saying Yes =??%
we dont know what the general chance of the test saying yes is but we can calculate it by adding up those with and those without the allergy:
1% have the allergy and the test says yes to 80% of them
99% do not have the allergy and the test says Yes to 10% of them
P(Yes)=1%*80%+99%*10%=10.7%
it means that the 10.7% of the population will get a yes result
P(Allergy|Yes)=1%*80%/10.7%=7.48%
P(Allergy|Yes)=about 7%
This is the same result we got on False Positives and False Negatives.