[Math] Bayes Theorem for Conditional Probability Tree Diagram

bayes-theoremprobability theory

How do I go about solving for the missing probabilities in my tree diagram and answering the question of "What is the probability of testing positive?

Tree Diagram

I'm trying to learn how to answer the following type of questions using Bayes Theorem.

Let’s walk through an example similar to the one given in class. Assume that the probability of having a rare condition is 1%. It is possible to test for the condition, but the test is imperfect. If you have the condition, there is an 85% chance that you will test positive. If you do not have the condition, there is a 5% chance that you will test positive. Call the condition A, so that P(A) = 0.01, and call a positive test +, so that p(+|A) = 0.85.

What is the probability p(+) that you test positive for the condition?

Best Answer

  • You have $P(+ \mid A)=0.85$ and $P(+ \mid A)+P(- \mid A)=1$ so $P(- \mid A)=0.15$

  • Similarly you have $P(+ \mid A^c)=0.05$ and $P(+ \mid A^c)+P(- \mid A^c)=1$ so $P(- \mid A^c)=0.95$

But you do not actually need these to answer the question. What you do need is the joint probabilities

  • $P(+,A)=P(A)\,P(+ \mid A) = 0.0085$
  • $P(+,A^c)=P(A^c)\,P(+ \mid A^c) = 0.0495$

so the probability of a positive test result

  • $P(+) = P(+,A) + P(+,A^c) = 0.058$

You could go further and find the conditional probability of having condition A given a positive test result

  • $P(A \mid +) = \dfrac{P(+,A)}{P(+)} \approx 0.14655$
Related Question