yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

The Bayesian Trap


7m read
·Nov 10, 2024

Picture this: You wake up one morning and you feel a little bit sick. No particular symptoms, just not 100%. So you go to the doctor and she also doesn't know what's going on with you, so she suggests they run a battery of tests and after a week goes by, the results come back, turns out you tested positive for a very rare disease that affects about 0.1% of the population and it's a nasty disease, horrible consequences, you don't want it.

So you ask the doctor, "You know, how certain is it that I have this disease?" and she says, "Well, the test will correctly identify 99% of people that have the disease and only incorrectly identify 1% of people who don't have the disease." So that sounds pretty bad. I mean, what are the chances that you actually have this disease? I think most people would say 99%, because that's the accuracy of the test. But that is not actually correct!

You need Bayes' Theorem to get some perspective. Bayes' Theorem can give you the probability that some hypothesis, say that you actually have the disease, is true given an event; that you tested positive for the disease. To calculate this, you need to take the prior probability of the hypothesis was true—that is, how likely you thought it was that you have this disease before you got the test results—and multiply it by the probability of the event given the hypothesis is true—that is, the probability that you would test positive if you had the disease—and then divide that by the total probability of the event occurring—that is testing positive.

This term is a combination of your probability of having the disease and correctly testing positive plus your probability of not having the disease and being falsely identified. The prior probability that a hypothesis is true is often the hardest part of this equation to figure out and, sometimes, it's no better than a guess. But in this case, a reasonable starting point is the frequency of the disease in the population, so 0.1%.

And if you plug in the rest of the numbers, you find that you have a 9% chance of actually having the disease after testing positive. Which is incredibly low if you think about it. Now, this isn't some sort of crazy magic. It's actually common sense applied to mathematics. Just think about a sample size of 1000 people.

Now, one person out of that thousand is likely to actually have the disease. And the test would likely identify them correctly as having the disease. But out of the 999 other people, 1% or 10 people would falsely be identified as having the disease. So, if you're one of those people who has a positive test result and everyone's just selected at random—well, you're actually part of a group of 11 where only one person has the disease. So your chances of actually having it are 1 in 11. 9%. It just makes sense.

When Bayes first came up with this theorem, he didn't actually think it was revolutionary. He didn't even think it was worthy of publication; he didn't submit it to the Royal Society of which he was a member, and in fact, it was discovered in his papers after he died and he had abandoned it for more than a decade. His relatives asked his friend, Richard Price, to dig through his papers and see if there is anything worth publishing in there. And that's where Price discovered what we now know as the origins of Bayes' Theorem.

Bayes originally considered a thought experiment where he was sitting with his back to a perfectly flat, perfectly square table and then he would ask an assistant to throw a ball onto the table. Now this ball could obviously land and end up anywhere on the table and he wanted to figure out where it was. So what he'd ask his assistant to do was to throw on another ball and then tell him if it landed to the left or to the right, or in front, behind of the first ball, and he would note that down and then ask for more and more balls to be thrown on the table. What he realized was that through this method he could keep updating his idea of where the first ball was.

Now, of course, he would never be completely certain, but with each new piece of evidence, he would get more and more accurate, and that's how Bayes saw the world. It wasn't that he thought the world was not determined, that reality didn't quite exist, but it was that we couldn't know it perfectly, and all we could hope to do was update our understanding as more and more evidence became available.

When Richard Price introduced Bayes' Theorem, he made an analogy to a man coming out of a cave, maybe he'd lived his whole life in there and he saw the Sun rise for the first time, and kind of thought to himself: "Is this a one-off, is this a quirk, or does the Sun always do this?" And then, every day after that, as the Sun rose again, he could get a little bit more confident that, well, that was the way the world works.

So Bayes' Theorem wasn't really a formula intended to be used just once; it was intended to be used multiple times, each time gaining new evidence and updating your probability that something is true. So if we go back to the first example when you tested positive for a disease, what would happen if you went to another doctor, get a second opinion and get that test run again, but let's say by a different lab, just to be sure that those tests are independent, and let's say that test also comes back as positive.

Now what is the probability that you actually have the disease? Well, you can use Bayes' formula again, except this time for your prior probability that you have the disease, you have to put in the posterior probability, the probability that we worked out before which is 9%, because you've already had one positive test. If you crunch those numbers, the new probability based on two positive tests is 91%. There's a 91% chance that you actually have the disease, which kind of makes sense. Two positive results by different labs are unlikely to just be chance, but you'll notice that probability is still not as high as the accuracy, the reported accuracy of the test.

Bayes' Theorem has found a number of practical applications, including notably filtering your spam. You know, traditional spam filters actually do a kind of bad job; there's too many false positives, too much of your email ends up in spam, but using a Bayesian filter, you can look at the various words that appear in emails and use Bayes' Theorem to give a probability that the email is spam, given that those words appear.

Now Bayes' Theorem tells us how to update our beliefs in light of new evidence, but it can't tell us how to set our prior beliefs, and so it's possible for some people to hold that certain things are true with a 100% certainty, and other people to hold those same things are true with 0% certainty.

What Bayes' Theorem shows us is that in those cases, there is absolutely no evidence, nothing anyone could do to change their minds, and so, as Nate Silver points out in his book, The Signal and The Noise, we should probably not have debates between people with a 100% prior certainty, and 0% prior certainty, because, well really, they'll never convince each other of anything.

Most of the time when people talk about Bayes' Theorem, they discuss how counterintuitive it is and how we don't really have an inbuilt sense of it, but recently my concern has been the opposite: that maybe we're too good at internalizing the thinking behind Bayes' Theorem.

The reason I'm worried about that is because I think in life we can get used to particular circumstances, we can get used to results, maybe getting rejected or failing at something or getting paid a low wage and we can internalize that as though we are that man emerging from the cave and we see the Sun rise every day, and every day, and we keep updating our beliefs to a point of near certainty that we think that that is basically the way that nature is, it's the way the world is and there's nothing that we can do to change it.

You know, there's Nelson Mandela's quote that: "Everything is impossible until it's done," and I think that is kind of a very Bayesian viewpoint on the world. If you have no instances of something happening, then what is your prior for that event? It will seem completely impossible; your prior may be 0 until it actually happens.

You know, the thing we forget in Bayes' Theorem is that our actions play a role in determining outcomes and determining how true things actually are. But if we internalize that something is true and maybe we're 100% sure that it's true, and there's nothing we can do to change it, well, then we're going to keep on doing the same thing, and we're going to keep on getting the same result; it's a self-fulfilling prophecy.

So I think a really good understanding of Bayes' Theorem implies that experimentation is essential. If you've been doing the same thing for a long time and getting the same result that you're not necessarily happy with, maybe it's time to change.

So is there something like that that you've been thinking about? If so, let me know in the comments.

Hey, this episode of Veritasium was supported in part by viewers like you on Patreon and by Audible. Audible is a leading provider of spoken audio information including an unmatched selection of audiobooks: original programming, news, comedy, and more. So if you're thinking about trying something new and you haven't tried Audible yet, you should give them a shot, and for viewers of this channel, they offer a free 30-day trial just by going to: audible.com/Veritasium.

You know, the book I've been listening to on Audible recently is called: The Theory That Would Not Die by Sharon Bertsch McGrayne, and it is an incredible in-depth look at Bayes' Theorem, and I've learned a lot just listening to this book, including the crazy fact that Bayes never came up with the mathematical formulation of his rule; that was done independently by the mathematician Pierre-Simon Laplace.

So, really I think he deserves a lot of credit for this theory, but Bayes gets naming rights because he was first, and if you want, you can download this book and listen to it, as I have, when I've just been driving in the car or going to the gym, which I'm doing again, and so if there's a part of your day that you feel is kind of boring then I can highly recommend trying out audiobooks from Audible. Just go to: audible.com/Veritasium.

So as always I want to thank: Audible for supporting me, and I want to thank you for watching.

More Articles

View All
The U.S. Faces a Major Debt Problem
I just got off the phone with the president. I talked to him twice today, and after weeks of negotiations, we have come to an agreement in principle. This is House Speaker Kevin McCarthy explaining to the media that finally the Republicans and the Democra…
Conditions for valid t intervals | Confidence intervals | AP Statistics | Khan Academy
Flavio wanted to estimate the mean age of the faculty members at her large university. She took an SRS, or simple random sample, of 20 of the approximately 700 faculty members, and each faculty member in the sample provided Flavio with their age. The data…
3 Easiest Ways to Prank Noobs -- "Up All Knight"
Welcome to Up All Night! Thank you, thank you. No, guys, seriously, please, thank you! Hey, today we’re discussing my three favorite ways to prank noobs. Ooh, sexy! There’s a lot of good ones. Okay, my first one is a package deal. When they’re not lookin…
Homeroom with Sal and Regina Ross - Tuesday, March 8
Hi everyone, Sal Khan here from Khan Academy. Happy International Women’s Day! In honor of International Women’s Day, we have a special guest, someone who I know quite well, Khan Academy’s Chief People Officer, Regina Ross. We’re going to talk about her j…
The Moon
When you look at the Moon in the night sky, it might seem reasonably close, but it’s actually incredibly far away. Right over here is a scaled picture of the distance between the Earth and the Moon. Earth has a diameter of approximately 8,000 miles, while…
Confidence interval for the slope of a regression line | AP Statistics | Khan Academy
Musa is interested in the relationship between hours spent studying and caffeine consumption among students at his school. He randomly selects 20 students at his school and records their caffeine intake in milligrams and the amount of time studying in a g…