{"id":1275,"date":"2018-01-17T05:52:43","date_gmt":"2018-01-17T05:52:43","guid":{"rendered":"http:\/\/punjabirevolution.com\/?page_id=1275"},"modified":"2018-01-17T05:53:18","modified_gmt":"2018-01-17T05:53:18","slug":"bayes-theorem-examples","status":"publish","type":"page","link":"http:\/\/punjabirevolution.com\/index.php\/bayes-theorem-examples\/","title":{"rendered":"Bayes\u2019 Theorem Examples"},"content":{"rendered":"<h1><strong><u>Bayes&rsquo; Theorem Examples<\/u><\/strong><\/h1>\n<h2><strong><u>Example 1<\/u><\/strong><\/h2>\n<p><strong><u><br>\nHistorical Data.<\/u><\/strong><\/p>\n<p>P(cavity) = 0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &mdash; 10%<\/p>\n<p>P(toothache) = 0.05&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &mdash; 5%<\/p>\n<p>&nbsp;<\/p>\n<p>P(Cavity | toothache) = 0.8&nbsp;&nbsp; &mdash; 80%<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong><u>Future Prediction: <\/u><\/strong><\/p>\n<p>P(toothache | cavity)&nbsp; = ?<\/p>\n<p>&nbsp;<\/p>\n<p>using bays law &agrave; P(B|A) = {P(A|B)P(B)}\/P(A)<\/p>\n<p>P(toothache | cavity)&nbsp; = {P(cavity | toothache) P(toothache) } \/ P(cavity)<\/p>\n<p>=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0.8*0.05)\/0.1 = 0.4<\/p>\n<h2><strong><u>Example 2<br>\n<\/u><\/strong><\/h2>\n<p>If HIV has a prevalence of 3% in San Francisco, and a particular HIV test has a false positive rate of .001 and a false negative rate of .01, what is the probability that a random person who tests positive is actually infected (also known as &ldquo;positive predictive value&rdquo;)?<\/p>\n<h3>Solution of Example 2<\/h3>\n<p>We have to find the probability of hiv+ given the report is positive.<\/p>\n<p>Using Bayes theorem<br>\nP(hiv+|t+) = P(t+|hiv+)P(hiv+) \/ P(t+)<\/p>\n<p>Now,<\/p>\n<p>false positive&nbsp; P(t+|hiv-) = .001<\/p>\n<p>P(t-|hiv-) =1-.001 =&nbsp; .999<\/p>\n<p>false negative = P(t-|hiv+) = .01<br>\nP(t+|hiv+) = 1-.01 = .99<\/p>\n<p>P(t+) = P(t+&amp;hiv+) + P(t+&amp;hiv-)<br>\n=P(t+|hiv+)P(hiv+) + P(t+|hiv-)P(hiv-)<br>\n= .99*.03 + .001*.97<\/p>\n<p>Putting all these values in equation<br>\nP(hiv+|t+) = P(t+|hiv+)P(hiv+) \/ P(t+)<\/p>\n<p>= (.99 * .03)\/{.99*.03 + .001*.97}<\/p>\n<p>= .968&nbsp;&nbsp; ===&gt; 96.8%<\/p>\n<p>Bayes&rsquo;s Theorem Example 1<\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/XAdZAGdHR3o?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n<p>Bayes&rsquo;s Theorem Example 2<\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/hSmiE6hUmaE?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n<p>Bayes&rsquo;s Theorem Example 3<\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/B3vcFTKu0lA?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bayes\u2019 Theorem Examples Example 1 Historical Data. P(cavity) = 0.1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212; 10% P(toothache) = 0.05\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212; 5% &nbsp; P(Cavity | toothache) = 0.8\u00a0\u00a0 &#8212; 80% &nbsp; &nbsp; Future Prediction: P(toothache | cavity)\u00a0 = ? &nbsp; using bays law \u00e0 P(B|A) = {P(A|B)P(B)}\/P(A) P(toothache | cavity)\u00a0 = {P(cavity | toothache) P(toothache) } \/ P(cavity) =\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (0.8*0.05)\/0.1 &hellip; <a href=\"http:\/\/punjabirevolution.com\/index.php\/bayes-theorem-examples\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Bayes\u2019 Theorem Examples&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages\/1275"}],"collection":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/comments?post=1275"}],"version-history":[{"count":2,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages\/1275\/revisions"}],"predecessor-version":[{"id":1277,"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/pages\/1275\/revisions\/1277"}],"wp:attachment":[{"href":"http:\/\/punjabirevolution.com\/index.php\/wp-json\/wp\/v2\/media?parent=1275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}