Suppose that one person in 10,000 people has a rare genetic disease. There is an excellent test for the disease; 99.5% of people with the disease test positive and only 0.06% who do not have the disease test positive.
What is the probability that someone who tests positive has the genetic disease?
$P(A) = 0.0001 ( 1/10000)$ (People having the disease among population)
$P(B|A) = 99.5/100 = 0.995$ (People who are positive)
$P(\bar{A}) = 1 - 0.0001 = 0.9999$ (People who dont have the disease)
$P(B|\bar{A}) = 0.06/100 = 0.0006$ (People who show up positive but dont have the disease)
Using the formula :
$$P(A|B)=\frac{P(A)P(B|A)}{P(A)P(B|A)+P(\bar{A})P(B|\bar{A})}$$
We determine that the probability of some who tests positive and has the genetic disease is :
$$\frac{0.0001 * 0.995}{0.0001*0.995 + 0.9999*0.0006}$$
= 0.1422
Is this the right approach to this problem, please advise.