Skip to main content
Loading Explore guides…
Bayes' Theorem Formulas · Acedra
Home
Explore
Mathematics
Bayes' Theorem Formulas
Sign in to save
Chat
If YouTube asks you to sign in, open the video on YouTube.
Watch on YouTube
Reload player
Transcript
34 segments
Copy
Hide video
0:00
in this video we're going to focus on B theorem but first let's go over some formulas particularly with conditional probability the probability of event a occurring given that event B has already occurred is the probability that event A and B will occur divided by the probability that event B will occur likewise we can say that the probability of B given a is equal to the probability of b and a occurring divided by the probability that event a will occur now the probability that event A
0:45
and B will occur is equal to the probability that event b and a will occur so basically what I'm doing is I'm setting these two equal to each other now this is equal to the probability of a given B times the probability of B so let's replace that on the left side now on the right side the probability of b and a occurring is the product of the probability of B occurring given a has already occurred times the probability of of an a occurring
1:31
now what I'm going to do is divide both sides by the probability that event B will occur and so this is going to give me the formula that is associated with Bas theorem so the probability that a will occur given that B has already occurred is equal to the probability that b will occur given that a has occurred times the probability of event a occurring divided the probability that event B will occur so base theorem helps us to calculate the conditional probability of
2:09
an event if basically you know the reverse conditional probability with some other probability values as well but this is the basic formula of baser so P of a given B is equal to P of B given a * P of a / P of B now let's use a simple example that will illustrate the use of Base theorem so let's say that in a bottle there's a bunch of pieces of papers with numbers on it let's say event a represents the following numbers being drawn 1 2 3 4 and 5 LSA event B represents the numbers 4 5 6 7 8 and 9
3:03
now what is the probability of a given B let's use base theorem to calculate this particular probability even though we don't need to for educational purposes let's do it now what I'm going to do is create a vend
3:22
diagram so let's say the first circle is for event a the second one is for B so A and B has these two numbers in common four and five so that's the intersection of A and B A also has the numbers 1 2 and 3 B has the number 6 7 8 and 9 now in order to calculate this using Bas term we need to know the probability of event a occurring the probability that event B will occur and basically the reverse conditional probability the probability that B will occur given that a has already
4:03
occurred so what is the probability that a will occur well we need to write the sample space the sample space represents all of the possible numbers the numbers in A and B so the numbers that we can get represent all of the natural numbers from 1 to
4:27
9 so a has five out of the nine possible numbers that we can choose from so the probability that event a will occur assuming that each number has an equal chance of being drawn out of the bottle is going to be five out of nine now B has six numbers out of the nine numbers here so the probability that event B will occur is six out of nine now what about the next one what is the probability that b will occur given that a has already occurred there's a formula for that which we talked about
5:06
earlier in this video but to think about it conceptually how much of B is in a a has five elements it has the numbers one to five out of those five numbers there's only two numbers that is in B that is part of a so the probability that b will occur given that event a has occurred is 2 out of five so now with this information we can calculate this particular conditional probability the probability that a will occur given that B has already occurred it's going to be P of B of A or rather B
5:48
given a Time P of a over P of B and let me get rid of this
6:02
so P of B given a that's what we have here that's 2 over 5 time P of a which is 5 over 9 / P of B which is 6 over9 so right now we could cancel the fives and if we multiply the top and the bottom of the fraction by n we can also cancel the nines so we're left with 2 over 6 which reduces to 1 over 3 so the probability that a will occur given that B has already occurred is 1 out of three now let's confirm that using conditional probability so P of a given B is the probability that event A and
6:58
B occurs over the probability that b will occur so we know that the sample space has nine numbers how much of that is a and b the intersection of A and B is basically two numbers four and five so the probability that event A and B will occur is two out of the nine possible numbers now the probability that b will occur is what we see here it's 6 over 9 so multiplying the top and the bottom numbers by 9 we're going to get the same result initially it's going to be 2 over 6 which reduces to 1 over
7:43
3 now granted we could have done this from the beginning but now you see how Bas term works with the formula that we wrote earlier but let's consider another example in which we could use the base THM formula now for those of you who truly value this video if you want to show your appreciation one of the best ways you can do so is by subscribing to this Channel and it really doesn't take too long just click on that red button at the bottom of the screen and that's it
8:16
by the way if you decide to do so don't forget to turn on or click on that notification Bell now for those of you who want to support my channel here's the link to my patreon page also when you get a chance check out the links in the description section below this video because I'm going to post some other resources that you might find helpful so let's get back to the video a particular study showed that 12% of men will likely develop prostate cancer at some point in their
8:47
lives a man with prostate cancer has a 95% chance of a positive test result from a medical screening exam a man without prostate cancer has a 6% chance of getting a false positive test result what is the probability that a man has cancer given that he has a positive test result go ahead and try this problem feel free to take a minute if you need to so let's write down what we know the probability that a man has cancer I'm going to write P of C is 12% which is2 as a decimal now the second
9:38
sentence says that a man with prostate cancer has a 95% chance of a positive test result so given that the person has cancer the probability that he will get a positive result or positive test result is 95% or
10:03
.95 now what about the third sentence a man without prostate cancer has a 6% chance of getting a false positive test
10:15
result so the probability of getting a positive test result given that the person does not have prostate cancer is 6% or 06 so what is the probability that the person has cancer given that he has a positive test result that's what we need to find so let's write the equation for that using Bas term so this is going to be the reverse conditional probability which is the probability of getting a positive test result given that the person has cancer times the probability that the person
10:58
has cancer divided by the probability that the person has a positive test result now we have these two values already but we don't have this one how can we find it in this case it's going to be very helpful to make a tree
11:20
diagram so 12% of the population will have prostate cancer based on this particular study that means that 88% which is 100 - 12 or 88 will not have cancer now out of those who have cancer 95% of them will have a positive test result which means the other 5% will have a negative test result now out of those who do not have cancer 6% will have a positive test result which means the the other 94% will have a negative test result so using this tree diagram how can we determine the probability that
12:10
the person will have a positive test result the probability that a person will have a positive test result depends on two events that is the probability that the person has cancer and they will have a positive test result or which will be represented by the addition symbol the probability that the person does not have cancer and has a positive test result those are the two options so the probability that the person has cancer and has a positive test result is the product of these two
12:50
values where they will have cancer and have a positive test result so it's basically 12 time
13:04
.95 the probability that the person does not have cancer and has a positive test result is the product of these two values so it's 88 *
13:23
062 * .95 + 88 * 06 6 that's equal to1 1668 now I'm running out of space so I'm going to have to delete a few things hopefully you you wrote that down because I'm going to refer to it
13:48
later if not you can always rewind the
13:54
video now let's plug in the numbers into this formula
14:01
so the probability of getting a positive test given that the person has cancer that's 0.95 the probability that the person has prostate cancer is 12% and the probability that the man or a man will have a positive test result is going to be 1668 or 16.68% so it's .95 * 12 /1 1668 and so you should get
14:44
68345 so there's approximately a 68.3% chance that the person will have cancer given that they have a positive test result so what is the probability that the person person does not have cancer even though they have a positive test result that's going to be 100 minus this number that is 100% - 68.3% or 1 - 683 which is 317 so there's approximately a 31.7% chance that even though the person has a positive test result that they do not have cancer so sometimes even if you get a positive
15:28
test result doesn't mean that you have that condition that there's always a risk factor but the answer that we're looking for in this problem is this number 68.3% now there's another way in which we can get that answer let's talk about how we can do it so let's say that there's 10,000 people in a city and based on his survey 12% of those individuals have cancer so we're going to use the same percentages 10,000 time2 is 1,200 and the other 88% do not have cancer so 10,000 * 88 is
16:18
8,800 now of those who do have cancer we know that 95% of them will get a positive test result so 95% of 1200 or 1200 * .95 that's 1140 so the other 5% that's 1200 * 05 we get a negative test result and so that's 60 now of those who do not have cancer we know that 6% of that population will get a positive test result so 8,800 * 06 that's 528 the other 94% will get a negative test result when they don't have cancer so 8800 * .94 that's 8, 272 so now let's see if we can use this
17:20
information to get the same answer so let me clear away a few things
17:32
so the probability that a person has cancer given that the person has a positive test result is going to be well let's uh break it up into two parts based on the number of people that we chose it doesn't matter if you chose 10,000 or 100,000 because we're dealing with a ratio it's still going to be the same out of this group of 10,000 people how many have a positive test result the amount of people that have a positive test result is the sum of those two numbers it's 1140 plus
18:14
528 now out of those who have a positive test result how many of them have cancer it's only this number that's the number who have cancer and have a positive test result so that's 1140 so let's go ahead and add 1140 + 528 so that's 1668 so 1140 / 1668 gives us 683 so we could see why the answer is the same there's a 68.3% chance that the person will have cancer given that they have a positive test result so now you see two ways in which you can get the answer using a tree
19:07
diagram or using the formula associated with Bas DM thanks for watching
Here to help you learn
Sign in to keep a private conversation with your course tutor.
Ask me anything about the material…
Sign in to chat