Main content

# Fundamentals: Bayes' Theorem

## Video transcript

my name is Ian ol Azov I'm a graduate student at the CUNY Graduate Center and today I want to talk to you about Bayes theorem Bayes theorem is a fact about probabilities a version of which was first discovered in the 18th century by Thomas Bayes the theorem is Bayes most famous contribution to the mathematical theory of probability it has a lot of applications and some philosophers even think it's the key to understanding what it means to think rationally in order to understand the theorem though we'll have to understand a little bit about probabilities the probability of a proposition is the chance or likelihood that that proposition is true suppose you know that one student in a class of 20 has the flu but you don't know who if you know that Sally is a student in the class you would say the probability that Sally has the flu is 1 in 20 or 5 percent or point zero 5 we can call this your prior probability that Sally has the flu because it's your probability prior to finding out any new information as a shorthand we'll write P of Sally has the flu equals 0.05 suppose now that there are five girls and 15 boys in the class now you don't know whether the class's flu patient is a boy or a girl but if you were to find out that the patient was a girl your probability that Sally has the flu would go up to one in five or twenty percent or 0.2 on the other hand if you were to find out that the patient was a boy your probability that Sally has the flu would go down to zero because these things are still iffy though remember you don't yet know whether the flu patient is a boy or girl will call these things conditional probabilities your probability that Sally has the flu conditional on the flu patient being a girl is point to your probability that Sally has the flu given that the flu patient is a boy is zero as a shorthand we'll write P of Sally has the flu given that the flu patient is a girl equals point two and P of Sally has the flu given that the flu patient is a boy equals zero the little vertical line tells you that we're talking about conditional probabilities now here's the thing sometimes you don't know what your conditional probabilities should be in other words you know that you might encounter some new evidence in the future but you don't yet know how that evidence should affect the probability you assign to some hypothesis here's where Bayes theorem comes in it gives you a way of figuring out what your conditional probabilities should be so what does Bayes theorem actually say remember our shorthand your probability in some hypothesis let's call it h conditional on some new piece of evidence let's call it e is written P of H given e here's what Bayes theorem tells us P of H given e equals P of e given H times P of H divided by P of e in other words it tells us the three ingredients that go into the probability of a hypothesis conditional on some evidence the probability of the evidence conditional on the hypothesis the prior probability of the hypothesis and the prior probability of the evidence let's look at an example imagine that one morning you don't feel right and you go on WebMD to figure out what's wrong you're browsing around until you find an illness that catches your eye hypothesis so the hypothesis under consideration is that you've come down with hypothesis as you read through the list of symptoms you realize that you have all of them in other words you have all of the symptoms that you would have if you had hypothesis so let's say P of e given H or P of symptoms given hypothesize s equals 0.95 you begin to freak out but then you remember Bayes theorem it tells you that there are two more things you need to know in order to figure out the probability that you have hypothesis the prior probability that you would come down with hypothesis and the prior probability that you would have the symptoms that you actually have with a little more googling you discover that the disease is extremely rare only one in 100,000 people have it so P of hypothesis is point zero zero zero zero one now for the last ingredient what kind of symptoms are they suppose they're very common like a headache and a runny nose lots of people have those google tells you one in a hundred so P of symptoms your prior probability that you would come down with the symptoms you have is point zero one at last you know everything that you need to know in order to figure out the probability that you have hypothesize s given your symptoms Bayes theorem tells you that P of hypothesis given symptoms equals P of symptoms given hypothesize s times P of hypothesis divided by P of symptoms in other words P of hypothesis given symptoms equals 0.001 five or a little less than one in a thousand Bayes theorem is very helpful because in figuring out what to make of some new piece of evidence people often ignore the prior probability of the hypothesis or treat P of H given E as P of e given H this mistake is sometimes known as the base rate fallacy in the case we just looked at P of H given E is very different from P of e given H 1 is less than one tenth of a percent and the other is 95 percent without Bayes theorem you might have gotten a lot more worked up about hypothesis than you need it to be wrapping up then Bayes theorem is a formula that tells you how to calculate conditional probabilities or the probability you should assign to some hypothesis given a piece of evidence even if you forget the formula though try to remember that the conditional probability of H given E is determined by three things the conditional probability of e given H the prior probability of H and the prior probability of e if you leave one of those three things out you don't have a complete picture