Help with conditional probabilty

  • Thread starter BlueScreenOD
  • Start date
  • Tags
    Conditional
In summary: I still think is the case), but I was incorrect. In summary, when a person has a positive breathalyzer test, the likelihood that they are actually drunk is around 50%.
  • #1
BlueScreenOD
14
0
I've been struggling for a good couple hours on the below, and I was hoping someone might be able to push me in the right direction...

"A" represents the event "the breath analyzer indicates the suspect is drunk" and "B" represents the event "the suspect is drunk." On a given Saturday night, about 5% of drivers are known to be drunk.

P(A | B) = P(compliment of A | complement of B) = p

a.) determine P(compliment of B | A) if p = .95
b.) how big should p be so that P(B | A) = 0.9?

---

From the problem I can deduce that P(B) is .05 and P(compliment of A | B) = (A | compliment of B) = .05, but how can I put P(compliment of B | A) in terms of P(A | B)? Any help would be greatly appreciated.
 
Physics news on Phys.org
  • #2
Hi BlueScreenOD, welcome to PF. Are you familiar with Bayes' Theorem?

(And it's "complement" :smile:)
 
  • #3
Thanks for your reply Mapes!

This is what I have so far, could be kind enough to tell me if this looks right? I'll use ^ for the intersection operator.

P(A | B) = 1 - P(A | complement B)
because P(complement A | complement B) = 1 - P(A | complement B)
P(A ^ B) / P(B) = 1 - P(A ^ complement B)
because P(A | B) = P(A ^ B) P(B)
P(A ^ B) / .05 + P(A ^ complement B) / .95 = 1
19 * P(A ^ B) + P (A ^ complement B) = .95
P(A ^ B) + P (A ^ complement B) = .95 - 18 * P(A ^ B)
P(A) = .95 - 18 * P(A ^ B)
because (A ^ B) + P (A ^ complement B) is P(A)
P(A) = .95 - 18 * [P(A | B) * P(B)]
P(A) = 0.095

The value strikes me as high, though... am i screwing something up?
 
  • #4
Nope, looks good. The breathalyzer comes up positive nearly all the time for the 5% drunk people, and 5% for the general population. So it comes up positive about 10% of the time.

Note, though, that P(A) = P(A|B)P(B) + P(A|notB)P(notB), so you can get to this result a bit easier.
 
  • #5
Wow, that's a much simpler calculation. Thanks for your help!
 
  • #6
I've done the work for the two questions and I'm getting different values than in earlier posts.

Note for reference that P(A|B) is the sensitivity of the test and P(A'|B') is the specificity of the test, both of which are frequently thought of as measures of accuracy. P(B|A) is the positive predictive value and P(B'|A') is the negative predictive value.

If one creates a tree diagram with initial branches to B and B' (the complement of B) and then from each of those, branches to A and A' we get four terminals and probabilities:

P(BA) = 0.05p
P(BA') = 0.05(1 - p)
P(B'A) = 0.95(1 - p)
P(B'A') = 0.95p

This gives

P(A) = 0.05p + 0.95(1 - p) = 0.95 - 0.9p
P(A') = 0.05(1 - p) + 0.95p = 0.05 + 0.9p

Q1) Find P(B'|A) if p = 0.95

P(B'|A) = P(B'A)/P(A) = (0.95 - 0.95p)/(0.95 - 0.9p)

When p = 0.95 this equals 0.5. This says that the likelihood that a person with a positve breathalyzer test actually being drunk is 50%, assuming an accuracy of 95%.

Q2) Find p if P(B|A) = 0.9.

P(B|A) = P(BA)/P(A) = (0.05p)/(0.95 - 0.9p)

Solving this against 0.9 gives p = 0.994186...

So in order for the test to have a positive predictive value of at least 90%, the accuracy of the test needs to be at least 99.4% accurate.

In general when the rate of incidence of a particular condition is low, tests need to be very accurate in order to have high positive predictive value.

--Elucidus
 
  • #7
Elucidus said:
I've done the work for the two questions and I'm getting different values than in earlier posts.

Your P(A) is 0.095, which is the same as BlueScreenOD got and was as far as BlueScreenOD got. It's more helpful if you help the poster figure out the homework problem rather than just posting the answer.
 
  • #8
Mapes said:
Your P(A) is 0.095, which is the same as BlueScreenOD got and was as far as BlueScreenOD got. It's more helpful if you help the poster figure out the homework problem rather than just posting the answer.

When I first read through BlueScreenOD's attempt, I thought I saw errors - which would lead to erroneous answers. (BlueScreenOD's value for P(A) is correct for part 1 as you say - I missed that.)

In general P(A|B) does not equal 1 - P(A|B'), but as it turns out, for this particular situation it does since the sensitivity and specificity are equal. Some of the other equations are also generally false. This is what lead me to reexamine the problem.

I also thought that a full solution had been attempted and was in error (which is not the case). I did not intend to spoil the opportunity and I apologize (at 11:30pm I probably wasn't as sharp as I should've been :)

As a final helpful hint though: these problems are often be easily solved with a tree diagram, but Bayes' Rule works as well.

--Elucidus
 
  • #9
I ended up with the same answers. Thank you both for your help!

Elucidus said:
As a final helpful hint though: these problems are often be easily solved with a tree diagram, but Bayes' Rule works as well.

I haven't learned that technique yet, but I'll have to look into it.
 

1. What is conditional probability?

Conditional probability is a measure of the likelihood of an event occurring given that another event has already occurred. It is calculated by dividing the probability of the joint occurrence of the two events by the probability of the given condition.

2. How is conditional probability used in science?

Conditional probability is used in science to understand and predict the relationship between two events. It is especially useful in fields such as genetics, epidemiology, and machine learning, where the occurrence of one event may affect the probability of another event happening.

3. What is the difference between conditional probability and joint probability?

Conditional probability is the probability of one event occurring given that another event has already occurred. Joint probability, on the other hand, is the probability of two events occurring simultaneously. In other words, conditional probability is a subset of joint probability.

4. How do you calculate conditional probability?

Conditional probability is calculated by dividing the probability of the joint occurrence of the two events by the probability of the given condition. This can be represented by the formula P(A|B) = P(A and B)/P(B), where A is the event of interest and B is the given condition.

5. What is the importance of understanding conditional probability?

Understanding conditional probability is important for making informed decisions and predictions based on data. It allows us to better understand the relationship between events and can help us identify any potential biases or confounding factors in our data. Additionally, it is a fundamental concept in statistics and is used in a wide range of scientific fields.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
813
  • Precalculus Mathematics Homework Help
Replies
12
Views
6K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
4K
Replies
4
Views
3K
  • Precalculus Mathematics Homework Help
Replies
9
Views
3K
  • Beyond the Standard Models
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
9
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
Back
Top