Calculating P(A|B): A Step-by-Step Guide

  • Thread starter brendan
  • Start date
In summary, the conversation discusses using Bayes' theorem to calculate P(A|B), or the probability of having a disease given a positive test result. P(B|A) is the probability of a positive test given the presence of the disease, while P(A) and P(B|A') represent the probabilities of having the disease and a false positive test, respectively. After using Bayes' theorem, it is found that there is only approximately a 10% chance of having the disease even after testing positive. The conversation also mentions the need for multiple tests to provide more accurate results and the example of 100,000 people to demonstrate the calculations.
  • #1
brendan
65
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
  • #2
Sorry P(B|A)
Brendan
 
  • #3
Given A, either B or B' so P(B|A)= 1- P(B'|A).
 
  • #4
thank you for your help.
I was using bayes theorem to find the probabilty 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.
 
  • #5
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
 
  • #6
brendan said:
thank you for your help.
I was using bayes theorem to find the probabilty 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.
 

1. How do I calculate P(A|B)?

To calculate P(A|B), you will need to know the following values:

  • P(A): the probability of event A occurring
  • P(B): the probability of event B occurring
  • P(A ∩ B): the probability of both event A and event B occurring

The formula for calculating P(A|B) is: P(A|B) = P(A ∩ B) / P(B).

2. What is the meaning of P(A|B)?

P(A|B) represents the conditional probability of event A occurring given that event B has already occurred. In other words, it is the probability of event A happening, taking into account the knowledge that event B has already occurred.

3. Can P(A|B) be greater than 1?

No, P(A|B) cannot be greater than 1. This is because the conditional probability of an event cannot be higher than the probability of the event itself.

4. How do I interpret the result of P(A|B)?

The result of P(A|B) can be interpreted as the likelihood of event A occurring given that event B has already occurred. For example, if P(A|B) is 0.8, it means that there is an 80% chance of event A happening after event B has already occurred.

5. Can P(A|B) be negative?

No, P(A|B) cannot be negative. This is because probabilities cannot have negative values. If you encounter a negative value when calculating P(A|B), it is likely due to an error in your calculations.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
963
  • Differential Equations
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Special and General Relativity
Replies
21
Views
607
Replies
5
Views
1K
Back
Top