How Do You Calculate the Probability of Having a Disease Given a Positive Test?

  • Context: Undergrad 
  • Thread starter Thread starter brendan
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around calculating the conditional probability of having a disease given a positive test result, specifically using Bayes' theorem. Participants explore the relationships between various probabilities involved in the calculation, including false positives and the implications of testing.

Discussion Character

  • Mathematical reasoning
  • Technical explanation
  • Exploratory

Main Points Raised

  • Brendan seeks clarification on calculating P(A|B) using Bayes' theorem, providing specific values for P(B'|A), P(B|A'), P(A), and P(B'|A').
  • Brendan initially confuses P(B|A) with P(B'|A) but later corrects this to find P(B|A) = 0.999.
  • Another participant notes that given A, either B or B' holds, leading to the conclusion that P(B|A) = 1 - P(B'|A).
  • Brendan calculates P(A|B) and concludes that the probability of having the disease after a positive test is approximately 10%.
  • One participant suggests that multiple tests are necessary to reduce the impact of false positives on the results.
  • A later reply provides an alternative approach by simulating a population of 100,000 people to illustrate the calculation, yielding a slightly different probability due to rounding errors.

Areas of Agreement / Disagreement

Participants generally agree on the use of Bayes' theorem for this calculation, but there are slight differences in the final probabilities due to rounding and interpretation of the values. No consensus is reached on the exact probability, as different methods yield slightly varying results.

Contextual Notes

The discussion includes assumptions about the independence of test results and the accuracy of the provided probabilities, which may affect the calculations. Rounding errors are noted as a factor in differing outcomes.

brendan
Messages
64
Reaction score
0
HI guys,
I was wondering how do find P(A|B)
To calculate the following.

P(A|B) = P(B|A)P(A) / (P(B|A)*P(A) + P(B|A')*P(A'))


I know that
P(B'|A) = .001
P(B|A') = 0.09 and
P(A') = .99

P(A) = .01
and P(B'|A') = .91

I'm pretty sure that it requires the use of P(B'|A) = .001 but I can't seem to understand the relationship.

Could some one please point me in the right direction.
regards
Brendan
 
Physics news on Phys.org
Sorry P(B|A)
Brendan
 
Given A, either B or B' so P(B|A)= 1- P(B'|A).
 
thank you for your help.
I was using bayes theorem to find the probability of being infected given that a test was positive.
So I 've used you information about finding P(B|A) to find P(A|B).
Here's what I found.


We need to find.
P(A|B) = P(B|A)P(A) / (P(B|A)*P(A) + P(B|A')*P(A'))

We're Given A, either B or B' so P(B|A)= 1- P(B'|A) = 1 -.001

P(B|A) = .999
P(A) = .01
P(A') = .99
P(B|A')=.09

Therefore:

P(A|B) = P(.999)P(.01) / (P(.999)*P(.01) + P(.09)*P(.99))

P(A|B) = .00999/00.999 + .0891

P(A|B) = .1008

So the patient only has approx 10% chance of having the desease even after testing positive.

once again thanks for your help.
 
yes, that's why you need more than one test in order to provide some independence to the results; the false positives get winnowed down
 
brendan said:
thank you for your help.
I was using bayes theorem to find the probability of being infected given that a test was positive.
So I 've used you information about finding P(B|A) to find P(A|B).
Here's what I found.


We need to find.
P(A|B) = P(B|A)P(A) / (P(B|A)*P(A) + P(B|A')*P(A'))

We're Given A, either B or B' so P(B|A)= 1- P(B'|A) = 1 -.001

P(B|A) = .999
P(A) = .01
P(A') = .99
P(B|A')=.09

Therefore:

P(A|B) = P(.999)P(.01) / (P(.999)*P(.01) + P(.09)*P(.99))

P(A|B) = .00999/00.999 + .0891

P(A|B) = .1008

So the patient only has approx 10% chance of having the desease even after testing positive.

once again thanks for your help.
I assume then that A= "has disease" and B= "tested positive"? In that case we are given "Probability that a person tests positive given that he has the disease" is 0.999, "Probability that a person has the disease (before testing)" is 0.01. I wouldn't use a "formula" for this- here's what I would do. Imagine there are 100000 people. .01 of them, 1000 people, have the disease, 99000 do not. Of the 1000 people who do have the disease .999 of them, 999, test positive, and of the 99000 people who do not have the disease, .09 of them, 8910, also test positive. So out of 999+ 8910= 9909 people who test positive, 1000 of them or 1000/9909= .1009 have the disease. My answer differs slightly from yours because of round off error.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 47 ·
2
Replies
47
Views
5K
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K