{"id":2097,"date":"2021-08-03T17:42:44","date_gmt":"2021-08-03T21:42:44","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=2097"},"modified":"2024-02-08T13:18:12","modified_gmt":"2024-02-08T18:18:12","slug":"3-7-tree-diagrams","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/3-7-tree-diagrams\/","title":{"raw":"3.7 Tree Diagrams","rendered":"3.7 Tree Diagrams"},"content":{"raw":"A <strong>tree diagram<\/strong> is a helpful tool, used to display a sequence of events and their conditional probabilities. Each branch of the tree corresponds to one possible outcome in the sequence of the events; and the probability of the outcome equals the product of all subsequent probabilities on the branch. Tree diagrams provide a useful illustration of the general multiplication rule.\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Tree Diagram<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nSuppose we have two midterms, the probability that you get at least 90 in Midterm I is 0.15. If you get at least 90 in Midterm I, then the probability that you get at least 90 in Midterm II is 0.8; if you do not receive at least 90 in Midterm I, the probability that you will receive at least 90 in Midterm II is 0.1. We could use a tree diagram to present the probabilities.\r\n\r\nLet\u2019s define the events:\r\n\r\n[latex]A_1[\/latex] = obtaining at least 90 in Midterm I, [latex]B_1[\/latex] = obtaining below 90 in Midterm I\r\n[latex]A_2[\/latex] = obtaining at least 90 in Midterm II, [latex]B_2[\/latex] = obtaining below 90 in Midterm II\r\n\r\nWe can summarize the information given in the question using probability notations.\r\n<p style=\"text-align: center;\" align=\"center\">[latex] P(A_1) = 0.15; \\quad P(B_1) = 1-P(A_1)=1-0.15=0.85; [\/latex]<\/p>\r\n<p style=\"text-align: center;\" align=\"center\">[latex] P(A_2|A_1)=0.8; \\quad P(A_2|B_1) = 0.1; [\/latex]<\/p>\r\n<p style=\"text-align: center;\" align=\"center\">[latex] P(B_2|A_1) =1-0.8= 0.2; \\quad P(B_2|B_1) = 1-0.1 = 0.9 .[\/latex]<\/p>\r\n<p align=\"center\">Then the tree diagram is presented as follows:<a id=\"retfig3.4\"><\/a><\/p>\r\n\r\n[caption id=\"attachment_2722\" align=\"aligncenter\" width=\"675\"]<img class=\"wp-image-2722 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/08\/tree_diagram_midterm.png\" alt=\"A tree diagram showing the conditional probabilities of midterm two grades given midterm one grade. Image description available.\" width=\"675\" height=\"396\" \/> <strong>Figure 3.4<\/strong>: Tree Diagram of Outcomes of Two Midterm Exams. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig3.4\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig3.4\">(See Appendix D Figure 3.4)<\/a>][\/caption]\r\n<ol>\r\n \t<li>Find the probability that a student obtained at least 90 in both midterms.<\/li>\r\n<\/ol>\r\n<p style=\"text-align: left;\" align=\"center\">[latex] P(A_1 \\: \\&amp; \\: A_2)= P(A_1) \\times P(A_2 |A_1)=0.15 \\times 0.8=0.12. [\/latex]<\/p>\r\nNote that due to the multiplication rule, the probability of each outcome equals the product of all subsequent probabilities on the corresponding branch.\r\n<ol start=\"2\">\r\n \t<li>Find the probability that a student obtained at least 90 in exactly one midterm.\r\n[latex]\\begin{align*}\r\nP(A_1 \\: \\&amp; \\: B_2 \\text{ or } B_1 \\: \\&amp; \\: A_1) &amp;= P(A_1 \\: \\&amp; \\: B_2) + P(B_1 \\: \\&amp; \\: A_2)\\\\\r\n&amp;= \u00a0P(A_1) \\times P(B_2|A_1) + P(B_1) \\times P(A_2|B_1)\\\\\r\n&amp;= 0.15 \\times 0.2 + 0.85 \\times 0.1 = 0.03 + 0.085= 0.115.\r\n\\end{align*}[\/latex]<\/li>\r\n \t<li>Find the probability that a student obtained at least 90 in at least one of the midterms.<\/li>\r\n<\/ol>\r\n[latex]\\begin{align*}\r\nP(A_1 \\: \\&amp; \\: A_2 \\text{ or } A_1 \\: \\&amp; \\: B_2 \\text{ or } A_2 \\: \\&amp; \\: B_1)&amp; = 1 - P(B_1 \\: \\&amp; \\: B_2) = 1- P(B_1) \\times P(B_2|B_1)\\\\\r\n&amp;= \u00a01- 0.85 \\times 0.9 = 1 - 0.765 = 0.235,\r\n\\end{align*}[\/latex]\r\n\r\nOR\r\n\r\n[latex]\\begin{align*}\r\nP(A_1 \\: \\&amp; \\: A_2 \\text{ or } A_1 \\: \\&amp; \\: B_2 \\text{ or } B_1 \\: \\&amp; \\: A_2)&amp;=P(A_1 \\: \\&amp; \\: A_2)+P(A_1 \\: \\&amp; \\: B_2)+ P(B_1 \\: \\&amp; \\: A_2)\\\\\r\n&amp;=0.12+0.03+0.085=0.235.\r\n\\end{align*}[\/latex]\r\n\r\n<\/div>\r\n<\/div>\r\n<div style=\"height: 27px;\"><\/div>\r\n<div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercise: Tree Diagram<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\n<span style=\"text-align: initial; font-size: 1em;\">It is believed that there is an association between breast cancer and smoking. The following table summarizes results of an observational study of 200 females who are classified by their disease status and smoking status.<\/span>\r\n<div align=\"center\">\r\n<table class=\"aligncenter first-col-border last-col-border\" style=\"width: 100%; height: 60px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\r\n<thead>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 28.333333333333336%;\" valign=\"top\"><\/td>\r\n<th style=\"height: 15px; width: 24.102564102564106%;\" scope=\"col\" valign=\"top\"><strong>Smoker (S)<\/strong><\/th>\r\n<th style=\"height: 15px; width: 29.871794871794865%;\" scope=\"col\" valign=\"top\"><strong>Non-smoker (not S)<\/strong><\/th>\r\n<th style=\"height: 15px; width: 17.564102564102566%;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 28.333333333333336%;\" scope=\"row\" valign=\"top\"><strong>Breast Cancer (B)<\/strong><\/th>\r\n<td style=\"height: 15px; width: 24.102564102564106%;\" valign=\"top\">10 (<strong class=\"redtext\">B &amp; S<\/strong>)<\/td>\r\n<td style=\"height: 15px; width: 29.871794871794865%;\" valign=\"top\">30 (<strong><em>B &amp; not S<\/em><\/strong>)<\/td>\r\n<td style=\"height: 15px; width: 17.564102564102566%;\" valign=\"top\">40\u00a0 (<strong><em>B<\/em><\/strong>)<\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 28.333333333333336%;\" scope=\"row\" valign=\"top\"><strong>Cancer Free (not B)<\/strong><\/th>\r\n<td style=\"height: 15px; width: 24.102564102564106%;\" valign=\"top\">20 (<strong><em>not B &amp; S<\/em><\/strong>)<\/td>\r\n<td style=\"height: 15px; width: 29.871794871794865%;\" valign=\"top\">140 (<strong><em>not B &amp; not S<\/em><\/strong>)<\/td>\r\n<td style=\"height: 15px; width: 17.564102564102566%;\" valign=\"top\">160\u00a0 (<strong><em>not B<\/em><\/strong>)<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 28.333333333333336%;\" scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<td style=\"height: 15px; width: 24.102564102564106%;\" valign=\"top\">30 (<strong class=\"bluetext\"><em>S<\/em><\/strong>)<\/td>\r\n<td style=\"height: 15px; width: 29.871794871794865%;\" valign=\"top\">170 (<strong><em>not S<\/em><\/strong>)<\/td>\r\n<td style=\"height: 15px; width: 17.564102564102566%;\" valign=\"top\">200<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nRepresent the information given in the contingency table above in a tree diagram, branching first on smoking status and then on breast cancer status.<a id=\"retex3.1\"><\/a>\r\n\r\n&nbsp;\r\n\r\n<img class=\"alignnone wp-image-2716 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer.png\" alt=\"A tree diagram showing the probabilities of cancer given smoking status.\" width=\"901\" height=\"396\" \/>\r\n\r\n[<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#ex3.1\">Image Description (See Appendix D Example 3.1)<\/a>]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>","rendered":"<p>A <strong>tree diagram<\/strong> is a helpful tool, used to display a sequence of events and their conditional probabilities. Each branch of the tree corresponds to one possible outcome in the sequence of the events; and the probability of the outcome equals the product of all subsequent probabilities on the branch. Tree diagrams provide a useful illustration of the general multiplication rule.<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Tree Diagram<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Suppose we have two midterms, the probability that you get at least 90 in Midterm I is 0.15. If you get at least 90 in Midterm I, then the probability that you get at least 90 in Midterm II is 0.8; if you do not receive at least 90 in Midterm I, the probability that you will receive at least 90 in Midterm II is 0.1. We could use a tree diagram to present the probabilities.<\/p>\n<p>Let\u2019s define the events:<\/p>\n<p>[latex]A_1[\/latex] = obtaining at least 90 in Midterm I, [latex]B_1[\/latex] = obtaining below 90 in Midterm I<br \/>\n[latex]A_2[\/latex] = obtaining at least 90 in Midterm II, [latex]B_2[\/latex] = obtaining below 90 in Midterm II<\/p>\n<p>We can summarize the information given in the question using probability notations.<\/p>\n<p style=\"text-align: center; text-align: center;\">[latex]P(A_1) = 0.15; \\quad P(B_1) = 1-P(A_1)=1-0.15=0.85;[\/latex]<\/p>\n<p style=\"text-align: center; text-align: center;\">[latex]P(A_2|A_1)=0.8; \\quad P(A_2|B_1) = 0.1;[\/latex]<\/p>\n<p style=\"text-align: center; text-align: center;\">[latex]P(B_2|A_1) =1-0.8= 0.2; \\quad P(B_2|B_1) = 1-0.1 = 0.9 .[\/latex]<\/p>\n<p style=\"text-align: center;\">Then the tree diagram is presented as follows:<a id=\"retfig3.4\"><\/a><\/p>\n<figure id=\"attachment_2722\" aria-describedby=\"caption-attachment-2722\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2722 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/08\/tree_diagram_midterm.png\" alt=\"A tree diagram showing the conditional probabilities of midterm two grades given midterm one grade. Image description available.\" width=\"675\" height=\"396\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/08\/tree_diagram_midterm.png 675w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/08\/tree_diagram_midterm-300x176.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/08\/tree_diagram_midterm-65x38.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/08\/tree_diagram_midterm-225x132.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/08\/tree_diagram_midterm-350x205.png 350w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><figcaption id=\"caption-attachment-2722\" class=\"wp-caption-text\"><strong>Figure 3.4<\/strong>: Tree Diagram of Outcomes of Two Midterm Exams. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig3.4\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig3.4\">(See Appendix D Figure 3.4)<\/a>]<\/figcaption><\/figure>\n<ol>\n<li>Find the probability that a student obtained at least 90 in both midterms.<\/li>\n<\/ol>\n<p style=\"text-align: left; text-align: center;\">[latex]P(A_1 \\: \\& \\: A_2)= P(A_1) \\times P(A_2 |A_1)=0.15 \\times 0.8=0.12.[\/latex]<\/p>\n<p>Note that due to the multiplication rule, the probability of each outcome equals the product of all subsequent probabilities on the corresponding branch.<\/p>\n<ol start=\"2\">\n<li>Find the probability that a student obtained at least 90 in exactly one midterm.<br \/>\n[latex]\\begin{align*}  P(A_1 \\: \\& \\: B_2 \\text{ or } B_1 \\: \\& \\: A_1) &= P(A_1 \\: \\& \\: B_2) + P(B_1 \\: \\& \\: A_2)\\\\  &= \u00a0P(A_1) \\times P(B_2|A_1) + P(B_1) \\times P(A_2|B_1)\\\\  &= 0.15 \\times 0.2 + 0.85 \\times 0.1 = 0.03 + 0.085= 0.115.  \\end{align*}[\/latex]<\/li>\n<li>Find the probability that a student obtained at least 90 in at least one of the midterms.<\/li>\n<\/ol>\n<p>[latex]\\begin{align*}  P(A_1 \\: \\& \\: A_2 \\text{ or } A_1 \\: \\& \\: B_2 \\text{ or } A_2 \\: \\& \\: B_1)& = 1 - P(B_1 \\: \\& \\: B_2) = 1- P(B_1) \\times P(B_2|B_1)\\\\  &= \u00a01- 0.85 \\times 0.9 = 1 - 0.765 = 0.235,  \\end{align*}[\/latex]<\/p>\n<p>OR<\/p>\n<p>[latex]\\begin{align*}  P(A_1 \\: \\& \\: A_2 \\text{ or } A_1 \\: \\& \\: B_2 \\text{ or } B_1 \\: \\& \\: A_2)&=P(A_1 \\: \\& \\: A_2)+P(A_1 \\: \\& \\: B_2)+ P(B_1 \\: \\& \\: A_2)\\\\  &=0.12+0.03+0.085=0.235.  \\end{align*}[\/latex]<\/p>\n<\/div>\n<\/div>\n<div style=\"height: 27px;\"><\/div>\n<div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercise: Tree Diagram<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p><span style=\"text-align: initial; font-size: 1em;\">It is believed that there is an association between breast cancer and smoking. The following table summarizes results of an observational study of 200 females who are classified by their disease status and smoking status.<\/span><\/p>\n<div style=\"margin: auto;\">\n<table class=\"aligncenter first-col-border last-col-border\" style=\"width: 100%; height: 60px; border-spacing: 0px;\" cellpadding=\"2\">\n<thead>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<td style=\"height: 15px; width: 28.333333333333336%;\" valign=\"top\"><\/td>\n<th style=\"height: 15px; width: 24.102564102564106%;\" scope=\"col\" valign=\"top\"><strong>Smoker (S)<\/strong><\/th>\n<th style=\"height: 15px; width: 29.871794871794865%;\" scope=\"col\" valign=\"top\"><strong>Non-smoker (not S)<\/strong><\/th>\n<th style=\"height: 15px; width: 17.564102564102566%;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px; width: 28.333333333333336%;\" scope=\"row\" valign=\"top\"><strong>Breast Cancer (B)<\/strong><\/th>\n<td style=\"height: 15px; width: 24.102564102564106%;\" valign=\"top\">10 (<strong class=\"redtext\">B &amp; S<\/strong>)<\/td>\n<td style=\"height: 15px; width: 29.871794871794865%;\" valign=\"top\">30 (<strong><em>B &amp; not S<\/em><\/strong>)<\/td>\n<td style=\"height: 15px; width: 17.564102564102566%;\" valign=\"top\">40\u00a0 (<strong><em>B<\/em><\/strong>)<\/td>\n<\/tr>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<th style=\"height: 15px; width: 28.333333333333336%;\" scope=\"row\" valign=\"top\"><strong>Cancer Free (not B)<\/strong><\/th>\n<td style=\"height: 15px; width: 24.102564102564106%;\" valign=\"top\">20 (<strong><em>not B &amp; S<\/em><\/strong>)<\/td>\n<td style=\"height: 15px; width: 29.871794871794865%;\" valign=\"top\">140 (<strong><em>not B &amp; not S<\/em><\/strong>)<\/td>\n<td style=\"height: 15px; width: 17.564102564102566%;\" valign=\"top\">160\u00a0 (<strong><em>not B<\/em><\/strong>)<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px; width: 28.333333333333336%;\" scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\n<td style=\"height: 15px; width: 24.102564102564106%;\" valign=\"top\">30 (<strong class=\"bluetext\"><em>S<\/em><\/strong>)<\/td>\n<td style=\"height: 15px; width: 29.871794871794865%;\" valign=\"top\">170 (<strong><em>not S<\/em><\/strong>)<\/td>\n<td style=\"height: 15px; width: 17.564102564102566%;\" valign=\"top\">200<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Represent the information given in the contingency table above in a tree diagram, branching first on smoking status and then on breast cancer status.<a id=\"retex3.1\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2716 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer.png\" alt=\"A tree diagram showing the probabilities of cancer given smoking status.\" width=\"901\" height=\"396\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer.png 901w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer-300x132.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer-768x338.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer-65x29.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer-225x99.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2022\/04\/tree_diagram_cancer-350x154.png 350w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/p>\n<p>[<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#ex3.1\">Image Description (See Appendix D Example 3.1)<\/a>]<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":19,"menu_order":7,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-2097","chapter","type-chapter","status-publish","hentry"],"part":327,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/2097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/users\/19"}],"version-history":[{"count":30,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/2097\/revisions"}],"predecessor-version":[{"id":5280,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/2097\/revisions\/5280"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/327"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/2097\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=2097"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=2097"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=2097"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=2097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}