A doctor recommends a test for a particular disease for a patient having a symptom. Before the results of the test, the only evidence the doctor has to go on is that 10% having this symptom has the disease. Past experience has shown that in 99% of the cases in which disease is present the test reveals the presence of the disease. In 95% of the cases in which disease is not present test reveals the absence of the disease.
What is the probability that the test reveals the presence of the disease?
If the test reveals that the disease is present, what is the probability that the patient is actually having the disease?
Following shows how I answered the question [ H denotes the patient is having the disease, N denotes the patient doesn't have the disease, D denotes the test results]
P(D)=P(H).P(D/H)+P(N).P(D/N) $=0.1*0.99+0.9*0.95 =0.099+0.855 =0.954$
Then, P(H/D)=( P(H).P(D/H))÷P(D) $=0.99/0.954 =99/954$
Even though I answered, I don't know whether I have taken the correct approach. So I need help to understand the question properly and how to do it.
No, you have not used correct value of $P(D/N)$ which would be $0.05,\;\; not\;\; 0.95$
However, it is so much less confusing for beginners to use Bayes' Theorem in a more commonsense manner.
Out of $1000$ people, $100$ are expected to have the disease of which $100*0.99 = 99$ would test positive,
and from the $900$ non-diseased, $900*0.05 = 45$ would test positive
Thus P(has disease|tested positive) $=\dfrac{99}{144}$