{"id":3384,"date":"2023-10-08T22:11:05","date_gmt":"2023-10-08T22:11:05","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/?post_type=chapter&#038;p=3384"},"modified":"2025-05-17T03:04:28","modified_gmt":"2025-05-17T03:04:28","slug":"bayes-theorem-learn-it-1","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/bayes-theorem-learn-it-1\/","title":{"raw":"Bayes' Theorem: Learn It 1","rendered":"Bayes&#8217; Theorem: Learn It 1"},"content":{"raw":"<section class=\"textbox learningGoals\">\r\n<ul>\r\n\t<li>Understand conditional probability and Bayes' theorem<\/li>\r\n<\/ul>\r\n<\/section>\r\n<h2>Bayes' Theorem<\/h2>\r\n<p>In this section, we concentrate on the more complex conditional probability problems we began looking at in the last section.<\/p>\r\n<p><img class=\"alignleft\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2016\/12\/28211759\/800px-Bayes_Theorem_MMB_01.jpg\" alt=\"Blue neon sign of Bayes' Theorem equation\" width=\"334\" height=\"214\" \/><\/p>\r\n<p>Let's look at an example of complex conditional probability!<\/p>\r\n<p>Probability plays a crucial role in assessing the accuracy of medical tests, especially in diagnosing diseases. When a person undergoes a medical test, we expect the test to accurately detect the disease if the person has it, and to provide a negative result if the person is disease-free. This scenario embodies the concept of conditional probability.<\/p>\r\n<p>Bayes' Theorem is a mathematical tool used in such situations. It enables us to calculate the probability of a person having a disease given the test result, considering the probability of the test being accurate and the prior likelihood of the person having the disease. In other words, Bayes' Theorem helps us update our beliefs about a person's disease status based on the test outcome and existing information. This theorem is invaluable in medical diagnosis and various other fields where accurate predictions based on uncertain information are vital.<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<div>\r\n<h3>Bayes' Theorem<\/h3>\r\n<p>Bayes' Theorem is a fundamental concept in probability theory that allows us to update our beliefs about an event when new evidence or information becomes available.<\/p>\r\n<\/div>\r\n<\/section>\r\n<p>Let's consider an example of Bayes' Theorem! We will discuss this theorem a bit later, but for now, we will use an alternative and, we hope, much more intuitive approach.<\/p>\r\n<section class=\"textbox example\">\r\n<p>Suppose a certain disease has an incidence rate of 0.1% (that is, it afflicts 0.1% of the population). A test has been devised to detect this disease. The test does not produce false negatives (that is, anyone who has the disease will test positive for it), but the false positive rate is 5% (that is, about 5% of people who take the test will test positive, even though they do not have the disease).<\/p>\r\n<p>Suppose a randomly selected person takes the test and tests positive.\u00a0 What is the probability that this person actually has the disease?<\/p>\r\n<p>[reveal-answer q=\"850693\"]Show Answer[\/reveal-answer]<br \/>\r\n[hidden-answer a=\"850693\"]<\/p>\r\n<p>What can we collect from the prompt of this question?<\/p>\r\n<ul>\r\n\t<li>[latex]P(\\text{disease})=0.001[\/latex].<\/li>\r\n\t<li>The test does not produce false positive means [latex]P(\\text{positive}|\\text{disease})=1[\/latex].<\/li>\r\n\t<li>The false positive rate is [latex]5\\%[\/latex], that is [latex]P(\\text{positive}|\\text{no disease})=0.05[\/latex].<\/li>\r\n<\/ul>\r\n<p>The question we are trying to answer is: What is the probability that this person actually has the disease? Mathematically, we are trying to find [latex]P(\\text{disease}|\\text{positive})[\/latex].<\/p>\r\n<p>We already know that [latex]P(\\text{positive}|\\text{disease})=1[\/latex], but remember that conditional probabilities are not equal if the conditions are switched.<\/p>\r\n<p>Rather than thinking in terms of all these probabilities we have developed, let\u2019s create a hypothetical situation and apply the facts as set out above.<\/p>\r\n<ul>\r\n\t<li>First, suppose we randomly select 1000 people and administer the test. How many do we expect to have the disease? Since about [latex]\\frac{1}{1000}[\/latex] of all people are afflicted with the disease, [latex]\\frac{1}{1000}[\/latex] of [latex]1000[\/latex] people is [latex]1[\/latex]. (Now you know why we chose [latex]1000[\/latex].) Only [latex]1[\/latex] of [latex]1000[\/latex] test subjects actually has the disease; the other [latex]999[\/latex] do not.<\/li>\r\n\t<li>We also know that [latex]5\\%[\/latex] of all people who do not have the disease will test positive. There are [latex]999[\/latex] disease-free people, so we would expect [latex](0.05)(999)=49.95[\/latex] (so, about [latex]50[\/latex]) people to test positive who do not have the disease.<\/li>\r\n<\/ul>\r\n<p>Now back to the original question, computing [latex]P(\\text{disease}|\\text{positive})[\/latex].<\/p>\r\n<p>There are [latex]51[\/latex] people who test positive in our example (the one unfortunate person who actually has the disease, plus the [latex]50[\/latex] people who tested positive but don\u2019t). Only one of these people has the disease, so<\/p>\r\n<p style=\"text-align: center;\">[latex]P(\\text{disease}|\\text{positive}) = \\frac{1}{51} \\approx 0.0196[\/latex].<\/p>\r\n<p>Does this surprise you? This means that of all people who test positive, over [latex]98\\%[\/latex]\u00a0<em>do not have the disease<\/em>.<\/p>\r\n<p>This example is worked through in detail in the video here.<\/p>\r\n<p><iframe title=\"Probability of a diease given a positive test: Bayes Thorem ex1\" src=\"https:\/\/www.youtube.com\/embed\/hXevfqsBino\" width=\"638\" height=\"359\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\r\n<p>[\/hidden-answer]<\/p>\r\n<\/section>\r\n<p>As we have seen in this hypothetical example, the most responsible course of action for treating a patient who tests positive would be to counsel the patient that they most likely do\u00a0<em>not<\/em>\u00a0have the disease and to order further, more reliable, tests to verify the diagnosis.<\/p>\r\n<p>One of the reasons that the doctors and medical students in the study did so poorly is that such problems, when presented in the types of statistics courses that medical students often take, are solved by use of Bayes\u2019 theorem.<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<h3>Bayes' Theorem<\/h3>\r\n<p style=\"text-align: center;\">[latex]P(A|B) = \\dfrac{P(B|A) \\times P(A)}{P(B)}[\/latex]<\/p>\r\n<p style=\"text-align: left;\">where<\/p>\r\n<ul>\r\n\t<li>[latex]P(A|B)[\/latex] represents the probability of event [latex]A[\/latex] occurring given that event [latex]B[\/latex] has occurred<\/li>\r\n\t<li>[latex]P(B|A)[\/latex] represents the probability of event [latex]B[\/latex] occurring given that event [latex]A[\/latex] has occurred<\/li>\r\n\t<li>[latex]P(A)[\/latex] and [latex]P(B)[\/latex] are the probability of events [latex]A[\/latex] and [latex]B[\/latex] occurring, respectively<\/li>\r\n<\/ul>\r\n<\/section>\r\n<section class=\"textbox example\">\r\n<p>Let's look at the previous example and use the theorem to answer: What is the probability that this person actually has the disease?<\/p>\r\n<p>Using the formula of Bayes' Theorem, this translates to:<\/p>\r\n<p>[latex]P(\\text{disease} | \\text{positive}) = \\frac{P(\\text{disease}) \\times P(\\text{positive} | \\text{disease})}{P(\\text{positive})} =\\frac{P(\\text{disease}) \\times P(\\text{positive} | \\text{disease})}{P(\\text{disease}) \\times P(\\text{positive} | \\text{disease}) + P(\\text{no disease}) \\times P(\\text{positive} | \\text{no disease})}<br \/>\r\n[\/latex]<\/p>\r\n<p>Plugging in the numbers, we have:<\/p>\r\n<p style=\"text-align: center;\">[latex]P(\\text{disease} | \\text{positive}) = \\frac{(0.001)(1)}{(0.001)(1) + (0.999)(0.05)} \\approx 0.0196[\/latex]<\/p>\r\n<p style=\"text-align: left;\">which is exactly the same answer as our original solution.<\/p>\r\n<\/section>\r\n<section class=\"textbox tryIt\">\r\n<p>[ohm2_question hide_question_numbers=1]13831[\/ohm2_question]<\/p>\r\n<\/section>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li>Understand conditional probability and Bayes&#8217; theorem<\/li>\n<\/ul>\n<\/section>\n<h2>Bayes&#8217; Theorem<\/h2>\n<p>In this section, we concentrate on the more complex conditional probability problems we began looking at in the last section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2016\/12\/28211759\/800px-Bayes_Theorem_MMB_01.jpg\" alt=\"Blue neon sign of Bayes' Theorem equation\" width=\"334\" height=\"214\" \/><\/p>\n<p>Let&#8217;s look at an example of complex conditional probability!<\/p>\n<p>Probability plays a crucial role in assessing the accuracy of medical tests, especially in diagnosing diseases. When a person undergoes a medical test, we expect the test to accurately detect the disease if the person has it, and to provide a negative result if the person is disease-free. This scenario embodies the concept of conditional probability.<\/p>\n<p>Bayes&#8217; Theorem is a mathematical tool used in such situations. It enables us to calculate the probability of a person having a disease given the test result, considering the probability of the test being accurate and the prior likelihood of the person having the disease. In other words, Bayes&#8217; Theorem helps us update our beliefs about a person&#8217;s disease status based on the test outcome and existing information. This theorem is invaluable in medical diagnosis and various other fields where accurate predictions based on uncertain information are vital.<\/p>\n<section class=\"textbox keyTakeaway\">\n<div>\n<h3>Bayes&#8217; Theorem<\/h3>\n<p>Bayes&#8217; Theorem is a fundamental concept in probability theory that allows us to update our beliefs about an event when new evidence or information becomes available.<\/p>\n<\/div>\n<\/section>\n<p>Let&#8217;s consider an example of Bayes&#8217; Theorem! We will discuss this theorem a bit later, but for now, we will use an alternative and, we hope, much more intuitive approach.<\/p>\n<section class=\"textbox example\">\n<p>Suppose a certain disease has an incidence rate of 0.1% (that is, it afflicts 0.1% of the population). A test has been devised to detect this disease. The test does not produce false negatives (that is, anyone who has the disease will test positive for it), but the false positive rate is 5% (that is, about 5% of people who take the test will test positive, even though they do not have the disease).<\/p>\n<p>Suppose a randomly selected person takes the test and tests positive.\u00a0 What is the probability that this person actually has the disease?<\/p>\n<p><div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q850693\">Show Answer<\/button><\/p>\n<div id=\"q850693\" class=\"hidden-answer\" style=\"display: none\">\n<p>What can we collect from the prompt of this question?<\/p>\n<ul>\n<li>[latex]P(\\text{disease})=0.001[\/latex].<\/li>\n<li>The test does not produce false positive means [latex]P(\\text{positive}|\\text{disease})=1[\/latex].<\/li>\n<li>The false positive rate is [latex]5\\%[\/latex], that is [latex]P(\\text{positive}|\\text{no disease})=0.05[\/latex].<\/li>\n<\/ul>\n<p>The question we are trying to answer is: What is the probability that this person actually has the disease? Mathematically, we are trying to find [latex]P(\\text{disease}|\\text{positive})[\/latex].<\/p>\n<p>We already know that [latex]P(\\text{positive}|\\text{disease})=1[\/latex], but remember that conditional probabilities are not equal if the conditions are switched.<\/p>\n<p>Rather than thinking in terms of all these probabilities we have developed, let\u2019s create a hypothetical situation and apply the facts as set out above.<\/p>\n<ul>\n<li>First, suppose we randomly select 1000 people and administer the test. How many do we expect to have the disease? Since about [latex]\\frac{1}{1000}[\/latex] of all people are afflicted with the disease, [latex]\\frac{1}{1000}[\/latex] of [latex]1000[\/latex] people is [latex]1[\/latex]. (Now you know why we chose [latex]1000[\/latex].) Only [latex]1[\/latex] of [latex]1000[\/latex] test subjects actually has the disease; the other [latex]999[\/latex] do not.<\/li>\n<li>We also know that [latex]5\\%[\/latex] of all people who do not have the disease will test positive. There are [latex]999[\/latex] disease-free people, so we would expect [latex](0.05)(999)=49.95[\/latex] (so, about [latex]50[\/latex]) people to test positive who do not have the disease.<\/li>\n<\/ul>\n<p>Now back to the original question, computing [latex]P(\\text{disease}|\\text{positive})[\/latex].<\/p>\n<p>There are [latex]51[\/latex] people who test positive in our example (the one unfortunate person who actually has the disease, plus the [latex]50[\/latex] people who tested positive but don\u2019t). Only one of these people has the disease, so<\/p>\n<p style=\"text-align: center;\">[latex]P(\\text{disease}|\\text{positive}) = \\frac{1}{51} \\approx 0.0196[\/latex].<\/p>\n<p>Does this surprise you? This means that of all people who test positive, over [latex]98\\%[\/latex]\u00a0<em>do not have the disease<\/em>.<\/p>\n<p>This example is worked through in detail in the video here.<\/p>\n<p><iframe loading=\"lazy\" title=\"Probability of a diease given a positive test: Bayes Thorem ex1\" src=\"https:\/\/www.youtube.com\/embed\/hXevfqsBino\" width=\"638\" height=\"359\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<\/div>\n<\/div>\n<\/section>\n<p>As we have seen in this hypothetical example, the most responsible course of action for treating a patient who tests positive would be to counsel the patient that they most likely do\u00a0<em>not<\/em>\u00a0have the disease and to order further, more reliable, tests to verify the diagnosis.<\/p>\n<p>One of the reasons that the doctors and medical students in the study did so poorly is that such problems, when presented in the types of statistics courses that medical students often take, are solved by use of Bayes\u2019 theorem.<\/p>\n<section class=\"textbox keyTakeaway\">\n<h3>Bayes&#8217; Theorem<\/h3>\n<p style=\"text-align: center;\">[latex]P(A|B) = \\dfrac{P(B|A) \\times P(A)}{P(B)}[\/latex]<\/p>\n<p style=\"text-align: left;\">where<\/p>\n<ul>\n<li>[latex]P(A|B)[\/latex] represents the probability of event [latex]A[\/latex] occurring given that event [latex]B[\/latex] has occurred<\/li>\n<li>[latex]P(B|A)[\/latex] represents the probability of event [latex]B[\/latex] occurring given that event [latex]A[\/latex] has occurred<\/li>\n<li>[latex]P(A)[\/latex] and [latex]P(B)[\/latex] are the probability of events [latex]A[\/latex] and [latex]B[\/latex] occurring, respectively<\/li>\n<\/ul>\n<\/section>\n<section class=\"textbox example\">\n<p>Let&#8217;s look at the previous example and use the theorem to answer: What is the probability that this person actually has the disease?<\/p>\n<p>Using the formula of Bayes&#8217; Theorem, this translates to:<\/p>\n<p>[latex]P(\\text{disease} | \\text{positive}) = \\frac{P(\\text{disease}) \\times P(\\text{positive} | \\text{disease})}{P(\\text{positive})} =\\frac{P(\\text{disease}) \\times P(\\text{positive} | \\text{disease})}{P(\\text{disease}) \\times P(\\text{positive} | \\text{disease}) + P(\\text{no disease}) \\times P(\\text{positive} | \\text{no disease})}<br \/>[\/latex]<\/p>\n<p>Plugging in the numbers, we have:<\/p>\n<p style=\"text-align: center;\">[latex]P(\\text{disease} | \\text{positive}) = \\frac{(0.001)(1)}{(0.001)(1) + (0.999)(0.05)} \\approx 0.0196[\/latex]<\/p>\n<p style=\"text-align: left;\">which is exactly the same answer as our original solution.<\/p>\n<\/section>\n<section class=\"textbox tryIt\">\n<iframe loading=\"lazy\" id=\"ohm13831\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=13831&theme=lumen&iframe_resize_id=ohm13831&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><br \/>\n<\/section>\n","protected":false},"author":51,"menu_order":16,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":2910,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/3384"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/users\/51"}],"version-history":[{"count":26,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/3384\/revisions"}],"predecessor-version":[{"id":6943,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/3384\/revisions\/6943"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/2910"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/3384\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=3384"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=3384"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=3384"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=3384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}