Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Probability calculation based on Bayes Rule (https://www.askmehelpdesk.com/showthread.php?t=597975)

  • Sep 19, 2011, 12:08 PM
    oxitt
    Probability calculation based on Bayes Rule
    I have two independent tests, A and B where A+ denotes the test outcome is positive, A- denotes the test outcome is negative. Random variable x denotes that the patient has AIDS. X+ denotes the patient has AIDS, x- denotes the patient doesn't have AIDS.

    We have the following probabilities:
    P(A-|x-) = 0.81
    P(A-|x+) = 0.20
    P(A+|x-) = 0.19
    P(A+|x+) = 0.80

    P(B-|x-) = 0.88
    P(B-|x+) = 0.03
    P(B+|x-) = 0.12
    P(B+|x+) = 0.97

    And prior probability P(x+) = 0.003

    How can I calculate P(x+|A+, B+)? I know how to calculate it for P(x+|A+) but now there are two different tests and I am confused about the calculation.
  • Sep 19, 2011, 08:51 PM
    jcaron2
    If you write out Bayes rule for this case you get the following:

    P(x+|A+, B+) = P(A+, B+|x+)P(x+)/P(A+, B+)

    Since A and B are independent, that should mean

    P(A+, B+|x+) = P(A+|x+)P(B+|x+)

    and

    P(A+, B+) = P(A+)P(B+)

    To compute P(A+), we use the marginal probability:

    P(A+) = P(A+|x+)P(x+) + P(A+|x-)P(x-)

    and likewise for P(B+), where P(x-) = 1 - P(x+)

    So putting it all together, we get

    P(x+|A+, B+) = P(A+|x+)P(B+|x+)P(x+)/[(P(A+|x+)P(x+) + P(A+|x-)(1-P(x+))(P(B+|x+)P(x+) + P(B+|x-)(1-P(x+)))]

    P(x+|A+, B+) = (0.8)(0.97)(0.003)/[((0.80)(0.003) + (0.19)(0.997))((0.97)(0.003) + (0.12)(0.997))]

    P(x+|A+, B+) = (0.002328)/[(0.19183)(0.12255)] = 0.099

    That says that there's only about a 10% chance of x+ even if both tests come back positive. That seems like a really inaccurate pair of tests, but based on the numbers you gave, there's around a 2.3% chance of getting two false positives, whereas only around 0.3% of test-takers are actually positive based on prior probability. So a ~90% false positive rate seems like a reasonable answer.


  • All times are GMT -7. The time now is 01:09 AM.