Bayes Rule

2
Let’s say that A is the probability of catching the deadly disease . That’s 1 out of 100, or in other words, 1%. We can write that as 0.01 for convenience. Let’s also say that B is the probability that the test results came back positive. This is a little more complicated to calculate, but we’ll come back to it. We know the probability of B given A – given that one actually have the disease, the probability of a positive test is 99%, or 0.99. What you really want to know is the probability of A given B – the probability that you actually have the disease, given a positive test result. Here’s what Bayes’ rule says (read “|” as “given”): P(A|B) = ( P(B|A) * P(A) ) / P(B) Let’s fill this out with some numbers. P(A), the probability of having the disease, is 0.01. P(B|A), the probability of a positive test result given that you have the disease, is 0.99. That gives us: P(A|B) = ( 0.99 * 0.01 ) / P(B) What we need to know is P(B), the overall probability of a positive test result. To figure this out, let’s break it down into cases. There are two cases to consider: a) the probability that you have a positive test result if you’re one of the people who has the disease, b) plus the probability that you have a positive test result if you’re not one of the people who has the disease. Here are those two cases:

description

Probability

Transcript of Bayes Rule

Lets say that A is the probability of catching the deadly disease . Thats 1 out of 100, or in other words, 1%. We can write that as 0.01 for convenience.

Lets also say that B is the probability that the test results came back positive. This is a little more complicated to calculate, but well come back to it.

We know the probability of B given A given that one actually have the disease, the probability of a positive test is 99%, or 0.99.

What you really want to know is the probability of A given B the probability that you actually have the disease, given a positive test result.

Heres what Bayes rule says (read | as given):

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

Lets fill this out with some numbers. P(A), the probability of having the disease, is 0.01. P(B|A), the probability of a positive test result given that you have the disease, is 0.99. That gives us:

P(A|B) = ( 0.99 * 0.01 ) / P(B)

What we need to know is P(B), the overall probability of a positive test result.

To figure this out, lets break it down into cases.

There are two cases to consider:

a) the probability that you have a positive test result if youre one of the people who has the disease,b) plus the probability that you have a positive test result if youre not one of the people who has the disease.

Here are those two cases:1% of people actually have the disease, and 99% of those will test positive. That gives us:0.01 * 0.99 = 0.0099

99% of people do not have the disease, and 1% of those will test positive. That gives us:0.99 * 0.01= 0.0099

Adding up these terms, we get an overall P(A) of:0.0099 + 0.0099 = 0.0198, or 1.98%

Now, put that term into our equation:P(A|B) = ( 0.99 * 0.01 ) / P(B)P(A|B) = ( 0.99 * 0.01 ) / 0.0198P(A|B) = ( 0.0099 ) / 0.0198P(A|B) = 0.5, or about 50%