If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## High school statistics

### Course: High school statistics>Unit 6

Lesson 3: Conditional probability

# Conditional probability tree diagram example

Using a tree diagram to work out a conditional probability question. If someone fails a drug test, what is the probability that they actually are taking drugs?

## Want to join the conversation?

• I find it extremely humorous that Sal say "The Drugs" instead of using the normal plural "Drugs" • This video gave me that "AHA, I get it now!" moment. I hear that's a type of accomplishment for teachers. thanks • can we solve it with formula? • It is possible to use the formula here. You would still have to get the following:

We want the percentage of people who are tested positive who are actually on drugs.

We can get this by finding the five percent of ten thousand on drugs (500) and then we multiply this by the probability that the test is correct (99% of the time) and Sal got this to be 495.

Now we can get the other probability that someone is not on drugs but tests positive which is the other 95% of people (9500) multiplied by the probability that these people who are clean test positive for drugs (190)

Here's how you'd use Conditional

A = On the drugs
B = Tested positive
P(A|B) = P(A and B) /P(B)

In this case, the only way to find P(B) is to use the law of Total Probability which is just the sum of all the times when the event B occurs, no matter what happened before it (so Not A is included if B still happened). B occurred when someone was on drugs and tested positive and then it occurred 2% of the time when someone was not on drugs and tested positive. This is why we add 495 and 190.

P(A & B) = 495
P(B) = 190 (test positive, but not on drugs) + 495(test positive, and are on drugs)

This is long winded, but the only immediate difference between this problem and maybe some other conditional probability problems is that the problem branches and the event given may occur in several places throughout your experiment, to which you only have to use the law of Total Probability to sum all of the occurrences of B.
• Why we are the favorable cases 495? Actual drug users are 500. So why not 500. Denominator part I got it. But confused about numerator part. • at . I think it could be misleading to think that a jury should take into account only the probability that Sal is on drugs GIVEN that he tested positive as a measure of how likely or unlikely is the event that Sal is on drugs. (i know that the question we are trying to solve is that one specifically). That 28% probability is GIVEN that Sal happened to be on that first 2% of being incorrecly tested positively when in fact he was not on drugs. Any thoughts? • Can we get this using only formula without giving a specific number of applicants?
(1 vote) • why wasn't the formula
P(U+ I T+)=[P(T+ I U+)*P(U+)]/[(P(T+ I U+)*P(U+))+(P(T+ I U-)*P(U-))]
used? And why won't it work ? The Probality that a student knows the correct answer to a multiple choice question is 2/3 . If the student does not know the answer , then the student guesses the answer . The probality of the guessed answer being correct is 1/4 . Given that the student has answered the questions correctly , the conditional probability that the student knows the correct answer is ?

(1 vote) • 2∕3 of the time the student knows the answer and thereby also gives the correct answer to the question.
So, the probability that the student knows the answer AND answers correctly is
2∕3 ∙ 1 = 2∕3

1∕3 of the time the student doesn't know the answer, in which case they answer correctly 1∕4 of the time.
So, the probability that the student doesn't know the answer AND answers correctly is
1∕3 ∙ 1∕4 = 1∕12

2∕3 + 1∕12 = 3∕4 of the time.

Now, for the conditional probability we want to view that 3∕4 as if it was 1 whole, which we achieve by multiplying by its reciprocal, namely 4∕3.

What we do to one side of an equation we also have to do to the other side, and we get
(2∕3 ∙ 4∕3) + (1∕12 ∙ 4∕3) = 3∕4 ∙ 4∕3,
which simplifies to
8∕9 + 1∕9 = 1

Thus follows that 8∕9 of the times that the student answers a question correctly it's because they already knew the answer and didn't have to guess it.  