Hektoen International

A Journal of Medical Humanities

Thomas Bayes and Bayes’ Theorem in medicine

Geoffrey Baird
Seattle, Washington, United States

 

The work of an eighteenth-century British clergyman can help
you when someone forgets to switch off their turn signal

Medical nomenclature is often ridiculous. One professor in my medical school used to say of misnomers in medicine that they were like the Holy Roman Empire, which was neither holy, nor Roman, nor much of an empire. So goes the medical and mathematical principle of Bayes’ theorem.

Thomas Bayes was born in or about 1701, in or about London, England. Like many of the great analytical and scientific minds of yesteryear in England, including surprisingly Charles Darwin 100 years later, Bayes studied theology. Initially, he went into the family business, helping his Presbyterian minister father run a chapel before later ministering at his own chapel. However, he seems to have had a pretty interesting side job, writing at least one treatise on mathematics titled, “An Introduction to the Doctrine of Fluxions, and a Defence of the Mathematicians Against the Objections of the Author of The Analyst.” In 1700’s mathematical English, “fluxions” is the old name for calculus, and Bayes used this work to defend the logic of the founder of calculus, one Isaac Newton. This treatise must have gotten the intelligentsia of the time really excited, because Bayes was eventually elected to be a Fellow of the Royal Society.

Two more things are important to know about Bayes. One is that he died in 1761. The second is that most everything else we know about him and what is known called Bayes’ theorem was discovered, reconstructed, and defined after his death. Poor Thomas Bayes never knew how famous he would become.

In 1763 an essay Bayes wrote entitled, “An Essay towards solving a Problem in the Doctrine of Chances” was read before the Royal Society. When we submitted papers to the Proceedings of the National Academy of Sciences during my graduate school years, we emailed them in. In the olden days, though, when you submitted a paper to the Royal Society, you actually walked on down there and read it to the audience. I imagine a scene as raucous as British Parliament is today, with lots of catcalls and throwing of rotten fruit, although the reality was probably more sedate. But who knows? Maybe the first reading of Bayes’ work incited howls of “Ridiculous!” (or something more profane), because that is what some people still say today.

A key definition in Bayes’ essay was that of probability, defined as “The probability of any event is the ratio between the value at which an expectation depending on the happening of the event ought to be computed, and the value of the thing expected upon its happening.” If you are asking yourself what that means, then join the club. I think it is confusing, too. Furthermore, the essence of this sentence is not exactly what we think of as Bayes’ theorem today. What this sentence is saying is that if a lottery payout is $100 dollars, but your expected earning with each play are only $1, that means that the probability of winning must be around $1/$100, or 1%. What we mean when we talk about Bayes’ theorem today is a tad different.

To explain the modern interpretation of Bayes’ theorem, let us say that we are trying to test for pregnancy. You go to the store and you buy a little dipstick-type pregnancy test, which as a clinical pathologist I am going to call a “lateral flow immunochromatographic test strip.” Well, OK, I’ll call it a dipstick, because that’s too much. Let us think about how we will interpret the dipstick test in a few different scenarios. First, let us take a ninety-year-old nun who tells us that she has never had sexual intercourse in her entire life, she does not feel pregnant, and has not been trying to get pregnant. She went through menopause 40 years ago. If you are e thinking it is stupid to test this woman for pregnancy, you are way ahead of me. Slow down! Anyhow, back to the nun. She pees on the strip. We wait five minutes, and we see a “negative” sign. She is not pregnant, right? Right. She is not pregnant. Now, what would you say if the dipstick turned positive? Is she pregnant? No, she is not pregnant. Let’s take another example, and use the dipstick to test ME for pregnancy. If you met me, you would see that I appear to be male, and I truly believe that I am. If my urine tested positive for pregnancy, would I be pregnant? No. Finally, let us test a woman who is obviously pregnant. She tells us she is seven months along, she has a big belly, we can feel kicks, we do an ultrasound and see a little baby girl in her belly. We bring out the pregnancy test, and find that it is positive. Yay, it works! However, let us say it was negative…was she not pregnant? No, it must have been a mistake.

I do not want to freak you out, but what you just did was learn a pretty complex mathematical theorem, namely Bayes’ Theorem. In statistical terms, the theorem tells us how much we should believe in a proposition based on what we thought before we collected evidence and how good the evidence was. In our pregnancy example, we thought the old nun and middle-aged male were not pregnant before doing the test, and we thought that they were not pregnant after the test regardless of the answer. Same thing for the pregnant woman, who we thought was pregnant before AND after the test, regardless of the test results. We call our belief ahead of the test the “pretest probability,” our believe after the test the “posttest probability,” and we assign a value to the test called a “likelihood ratio” which tells us how much we should increase or decrease or belief based on the results of the test. What we learned in the pregnancy example is that if the pretest probability is REALLY low, i.e. you are a ninety-year-old nun or a man, you are not going to be pregnant. Even a positive pregnancy test result will not be able to increase that vanishingly low pretest probability into a meaningfully high posttest probability. Likewise, if the pretest probability is really high, a negative result is not going to lower that probability much. Any test performed when you already know the answer is stupid… so you should not do it.

You may not know it, but you already use Bayes’ Theorem in your day-to-day life. When? Have you ever been stuck behind a guy on the road who has his blinker on for three miles, and gotten nervous about overtaking him? Think about that blinker like a pregnancy test. If you blindly accept the “test results,” you would conclude that he’s shortly going to move left or right, so you cannot overtake him. However, if you decide that he simply forgot his blinker was on, and that his pretest probability of truly turning is low, then the post-test probability, or your belief about his intentions after collecting all the evidence, is that it is probably safe to overtake him. You just used Bayes’ theorem! If he still cuts you off, well, Bayes’ theorem does not address how to deal with idiots.

One of the interesting properties of Bayes theorem is that it separates the pretest probability from the quality of the test or evidence you use to get to the posttest probability. A pregnancy test, for example, is not a black and white thing, despite what people say or think. It is a device that, when positive, simply says that you are fifty times more likely to be pregnant than you were before you took the test. Let’s call that 50x multiplier a “likelihood ratio.” If there was a one in a million chance you were pregnant before the test, and it came up positive, there’s now about a fifty in one million chance that you’re pregnant. Or, call it a 999,950 out of one million chance that you’re NOT pregnant. Put that way, it seems like a pregnancy test is awful, right? Even when it is positive, you are definitely not pregnant. Why, then, do we allow people to use these tests? Well, let us think of the case in which a patient might be pregnant, and the chances are 50-50, or 1:1 odds. She has been trying for a while, missed a period, but it is still early, and maybe she’ll get her period tomorrow, since she has had late periods before. We do the test, and it is positive. Doing the math, we multiply those 1:1 odds now to get 50:1 odds in FAVOR of pregnancy, or a 98% chance of pregnancy. It is baby shower time! But how did that pregnancy test get so much better? Truth be told, it did not. What got better was the pretest probability, and if you were the doctor, what got better was your decision of when to use the test. Tests are much more meaningful when pretest probabilities are more in the “Hmm….not really sure, but maybe” range, rather than in the “I feel great, but who knows, I could be secretly ill so let us test obscure vitamin levels!” range.

So, this is Bayes theorem. Like Holy Roman Empire, Bayes’ theorem really is not much of a theorem, Bayes never wrote it down, and we do not even know if he would have believed it. But, it is a helpful way to think about lab tests, so if you’re OK with honoring this eighteenth-century clergyman by using his name to describe what I think is the single most important concept in clinical laboratory testing, let us keep doing that.

 


 

GEOFFREY BAIRD, MD, PhD, is a clinical pathologist in the Department of Laboratory Medicine at the University of Washington in Seattle, WA, USA. His clinical interests include clinical chemistry, toxicology, and laboratory test utilization. His research interests are proteomics and tissue pre-analytics. He is board-certified in Anatomic and Clinical Pathology.

 

Winter 2018   |  Sections  |  Science

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.