{"id":2690,"date":"2019-08-02T07:51:14","date_gmt":"2019-08-02T11:51:14","guid":{"rendered":"https:\/\/pressbooks.library.ryerson.ca\/ohsmath\/?post_type=chapter&#038;p=2690"},"modified":"2020-10-19T07:54:23","modified_gmt":"2020-10-19T11:54:23","slug":"7-2-bayes-formula","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/chapter\/7-2-bayes-formula\/","title":{"raw":"7.2. Bayes' Formula","rendered":"7.2. Bayes&#8217; Formula"},"content":{"raw":"[Latexpage]\r\n<h1>Bayes' Formula<\/h1>\r\nIn this section, we will develop and use Bayes' Formula to solve an important type of probability problem. Bayes' formula is a method of calculating the conditional probability <em>P<\/em>(<em>F<\/em> | <em>E<\/em>) from <em>P<\/em>(<em>E<\/em> | <em>F<\/em>). The ideas involved here are not new, and most of these problems can be solved using a tree diagram. However, Bayes' formula does provide us with a tool with which we can solve these problems without a tree diagram. We begin with an example.\r\n\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example 7.2.1<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">Suppose you are given two jars. Jar I contains one black and 4 white marbles, and Jar II contains 4 black and 6 white marbles. If a jar is selected at random and a marble is chosen:<\/div>\r\n<div class=\"textbox__content\" style=\"padding-left: 40px\"><strong>a.<\/strong> What is the probability that the marble chosen is a black marble?<\/div>\r\n<div class=\"textbox__content\" style=\"padding-left: 40px\"><strong>b.<\/strong> If the chosen marble is black, what is the probability that it came from Jar I?<\/div>\r\n<div class=\"textbox__content\" style=\"padding-left: 40px\"><strong>c.<\/strong> If the chosen marble is black, what is the probability that it came from Jar II?<\/div>\r\n<div class=\"textbox__content\"><strong>Solution <\/strong><\/div>\r\n<div class=\"textbox__content\" style=\"text-align: center\">\r\n\r\nLet <em>JI<\/em>\u00a0be the event that Jar I is chosen, <em>JII<\/em> be the event that Jar II is chosen, <em>B<\/em> be the event that a black marble is chosen and <em>W<\/em> the event that a white marble is chosen. We illustrate using a tree diagram.\r\n<div class=\"textbox\">\r\n<table class=\"no-lines\" style=\"border-collapse: collapse;width: 100%\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 50%\">\\begin{tikzpicture}[thick]\r\n\\tikzstyle{black} = [circle, minimum width=8pt,fill,inner sep=0pt]\r\n\\tikzstyle{white} = [thin, circle, draw, minimum width=8pt,fill=white, inner sep=0pt]\r\n\\draw (0,0) circle (1);\r\n\\draw (2.5,0) circle (1);\r\n\\node at (0,-1.3) {Jar I};\r\n\\node at (2.5,-1.3) {Jar II};\r\n\\node at (0,-0.7) [black]{};\r\n\\node at (0.4,-0.6) [white] {};\\node at (-0.4,-0.6) [white] {};\\node at (0.7,-0.3) [white] {};\\node at (-0.7,-0.3) [white] {};\\node at (2.5,-0.7) [black] {};\r\n\\node at (2.9,-0.6) [black] {};\\node at (2.1,-0.6) [black] {};\\node at (3.2,-0.3) [black] {};\\node at (1.8,-0.3) [white] {};\\node at (2.7,-0.3) [white] {};\\node at (2.3,-0.3) [white] {};\\node at (2.9,0) [white] {};\\node at (2.5,0) [white] {};\\node at (2.1,0) [white] {};\\draw (0,0.7) ellipse (6mm and 3mm);\r\n\\draw (2.5,0.7) ellipse (6mm and 3mm);\r\n\\end{tikzpicture}\r\n<p style=\"text-align: center\">(a)<\/p>\r\n<\/td>\r\n<td style=\"width: 50%\">\\begin{tikzpicture}[grow=right, sloped]\r\n\\tikzstyle{level 1}=[level distance=3cm, sibling distance=3.5cm]\r\n\\tikzstyle{level 2}=[level distance=3cm, sibling distance=2cm]\r\n\\node {}\r\nchild {\r\nnode {$JII$}\r\nchild {\r\nnode[label=right:\r\n{$White\\: (1\/2)(6\/10)=3\/10$}] {}\r\nedge from parent\r\nnode[below] {$6\/10$}\r\n}\r\nchild {\r\nnode[label=right:\r\n{$Black\\: (1\/2)(4\/10)=2\/10$}] {}\r\nedge from parent\r\nnode[above] {$4\/10$}\r\n}\r\nedge from parent\r\nnode[below] {$1\/2$}\r\n}\r\nchild {\r\nnode {$JI$}\r\nchild {\r\nnode[label=right:\r\n{$White\\: (1\/2)(4\/5)=4\/10 $}] {}\r\nedge from parent\r\nnode[below] {$4\/5$}\r\n}\r\nchild {\r\nnode[label=right:\r\n{$Black\\: (1\/2)(1\/5)=1\/10$}] {}\r\nedge from parent\r\nnode[above] {$1\/5$}\r\n}\r\nedge from parent\r\nnode[above] {$1\/2$}\r\n};\r\n\\end{tikzpicture}\r\n<p style=\"text-align: center\">(b)<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox__content\"><strong>a.<\/strong> The probability that a black marble is chosen is <em>P<\/em>(<em>B<\/em>) = 1\/10 + 2\/10 = 3\/10.<\/div>\r\n<div class=\"textbox__content\"><strong>b.<\/strong> To find <em>P<\/em>(<em>JI<\/em> | <em>B<\/em>), we use the definition of conditional probability, and we get<\/div>\r\n<div class=\"textbox__content\" style=\"text-align: center\">$P(JI\\,|\\, B) = \\frac{P(JI\\cap B)}{P(B)} = \\frac{1\/10}{3\/10} = \\frac{1}{3}$<\/div>\r\n<div class=\"textbox__content\"><strong>c.<\/strong> Similarly, $P(JII\\,|\\, B) = \\frac{P(JII\\cap B)}{P(B)} = \\frac{2\/10}{3\/10} = \\frac{2}{3}$<\/div>\r\n<div class=\"textbox__content\">In parts <strong>b<\/strong> and <strong>c<\/strong>, the reader should note that the denominator is the sum of all probabilities of all branches of the tree that produce a black marble, while the numerator is the branch that is associated with the particular jar in question.<\/div>\r\n<\/div>\r\n&nbsp;\r\n\r\nThis is a statement of Bayes' formula.\r\n<div class=\"textbox shaded\">\r\n\r\n<strong>Bayes' Formula:<\/strong>Let <em>S<\/em> be a sample space that is divided into <em>n<\/em> partitions, <em>A<\/em><sub>1<\/sub>, <em>A<\/em><sub>2<\/sub>, . . . <em>A<sub>n<\/sub><\/em>. If <em>E<\/em> is any event in <em>S<\/em>, then:\r\n<p style=\"text-align: center\">$P(A_i\\,|\\, E) = \\frac{P(A_i)\\, P(E\\,|\\, A_i)}{P(A_1)\\, P(E\\,|\\, A_1)+P(A_2)\\, P(E\\,|\\, A_2)+\\,\\cdots\\,+P(A_n)\\, P(E\\,|\\, A_n)}$<\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example 7.2.2<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">A department store buys 50% of its appliances from Manufacturer A, 30% from Manufacturer B, and 20% from Manufacturer C. It is estimated that 6% of Manufacturer A's appliances, 5% of Manufacturer B's appliances, and 4% of Manufacturer C's appliances need repair before the warranty expires. An appliance is chosen at random. If the appliance chosen needed repair before the warranty expired, what is the probability that the appliance was manufactured by Manufacturer A? Manufacturer B? Manufacturer C?<\/div>\r\n<div class=\"textbox__content\"><strong>Solution<\/strong><\/div>\r\n<div class=\"textbox__content\">Let events <em>A<\/em>, <em>B<\/em> and <em>C<\/em> be the events that the appliance is manufactured by Manufacturer A, Manufacturer B, and Manufacturer C, respectively. Further, suppose that the event <em>R<\/em> denotes that the appliance needs repair before the warranty expires.<\/div>\r\n<div class=\"textbox__content\">We need to find <em>P<\/em>(<em>A<\/em> | <em>R<\/em>), <em>P<\/em>(<em>B<\/em> | <em>R<\/em>) and <em>P<\/em>(<em>C<\/em> | <em>R<\/em>).<\/div>\r\n<div class=\"textbox__content\">We will do this problem both by using a tree diagram and by using Bayes' formula.<\/div>\r\n<div class=\"textbox__content\">We draw a tree diagram.<\/div>\r\n<div class=\"textbox__content\">\r\n<div class=\"textbox\">\\begin{tikzpicture}[grow=right, sloped]\r\n\\tikzstyle{level 1}=[level distance=3cm, sibling distance=3.5cm]\r\n\\tikzstyle{level 2}=[level distance=3cm, sibling distance=2cm]\r\n\\node {}\r\nchild {\r\nnode {$C$}\r\nchild {\r\nnode[label=right:\r\n{$R^C$}] {}\r\nedge from parent\r\nnode[below] {$0.96$}\r\n}\r\nchild {\r\nnode[label=right:\r\n{$R=(0.20)(0.04)=0.008$}] {}\r\nedge from parent\r\nnode[above] {$0.04$}\r\n}\r\nedge from parent\r\nnode[below] {$0.20$}\r\n}\r\nchild {\r\nnode {$B$}\r\nchild {\r\nnode[label=right:\r\n{$R^C$}] {}\r\nedge from parent\r\nnode[below] {$0.95$}\r\n}\r\nchild {\r\nnode[label=right:\r\n{$R=(0.30)(0.05)=0.015$}] {}\r\nedge from parent\r\nnode[above] {$0.05$}\r\n}\r\nedge from parent\r\nnode[above] {$0.30$}\r\n}\r\nchild {\r\nnode {$A$}\r\nchild {\r\nnode[label=right:\r\n{$R^C$}] {}\r\nedge from parent\r\nnode[below] {$0.94$}\r\n}\r\nchild {\r\nnode[label=right:\r\n{$R=(0.50)(0.06)=0.030$}] {}\r\nedge from parent\r\nnode[above] {$0.06$}\r\n}\r\nedge from parent\r\nnode[above] {$0.50$}\r\n};\r\n\\end{tikzpicture}<\/div>\r\n<\/div>\r\n<div class=\"textbox__content\">\r\n<p style=\"text-align: left\"><span style=\"font-size: 1rem;text-align: left\">The probability <\/span><em style=\"font-size: 1rem;text-align: left\">P<\/em><span style=\"font-size: 1rem;text-align: left\">(<\/span><em style=\"font-size: 1rem;text-align: left\">A<\/em><span style=\"font-size: 1rem;text-align: left\"> | <\/span><em style=\"font-size: 1rem;text-align: left\">R<\/em><span style=\"font-size: 1rem;text-align: left\">), for example, is a fraction whose denominator is the sum of all probabilities of all branches of the tree that result in an appliance that needs repair before the warranty expires, and the numerator is the branch that is associated with Manufacturer A. <\/span><em style=\"font-size: 1rem;text-align: left\">P<\/em><span style=\"font-size: 1rem;text-align: left\">(<\/span><em style=\"font-size: 1rem;text-align: left\">B<\/em><span style=\"font-size: 1rem;text-align: left\"> | <\/span><em style=\"font-size: 1rem;text-align: left\">R<\/em><span style=\"font-size: 1rem;text-align: left\">) and <\/span><em style=\"font-size: 1rem;text-align: left\">P<\/em><span style=\"font-size: 1rem;text-align: left\">(<\/span><em style=\"font-size: 1rem;text-align: left\">C<\/em><span style=\"font-size: 1rem;text-align: left\"> | <\/span><em style=\"font-size: 1rem;text-align: left\">R<\/em><span style=\"font-size: 1rem;text-align: left\">) are found in the same way. We list both as follows:<\/span><\/p>\r\n\r\n<\/div>\r\n<div class=\"textbox__content\">$P(A\\,|\\, R) = \\frac{0.030}{(0.030)+(0.015)+(0.008)} = \\frac{0.030}{0.053} = 0.566$<\/div>\r\n<div class=\"textbox__content\">$P(B\\,|\\, R) = \\frac{0.015}{0.053} = 0.283$\u00a0 \u00a0and\u00a0 \u00a0$P(C\\,|\\, R) = \\frac{0.008}{0.053} = 0.151$.<\/div>\r\n<div class=\"textbox__content\">Alternatively, using Bayes' formula:<\/div>\r\n<div class=\"textbox__content\" style=\"text-align: left\"><span style=\"font-size: 1rem\">$P(A\\,|\\, R) = \\frac{P(A)\\, P(R\\,|\\, A)}{P(A)\\, P(R\\,|\\, A)+P(B)\\, P(R\\,|\\, B)+P(C)\\, P(R\\,|\\, C)} = \\frac{0.030}{(0.030)+(0.015)+(0.008)} = \\frac{0.030}{0.053} = 0.566$<\/span><\/div>\r\n<div class=\"textbox__content\"><em style=\"font-size: 1rem\">P<\/em><span style=\"font-size: 1rem\">(<\/span><em style=\"font-size: 1rem\">B<\/em><span style=\"font-size: 1rem\"> | <\/span><em style=\"font-size: 1rem\">R<\/em><span style=\"font-size: 1rem\">) and <\/span><em style=\"font-size: 1rem\">P<\/em><span style=\"font-size: 1rem\">(<\/span><em style=\"font-size: 1rem\">C<\/em><span style=\"font-size: 1rem\"> | <\/span><em style=\"font-size: 1rem\">R<\/em><span style=\"font-size: 1rem\">) can be determined in the same manner.<\/span><\/div>\r\n<\/div>\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example 7.2.3<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">There are five Jacy's department stores in San Jose. The distribution of number of employees by gender is given in the table below.<\/div>\r\n<div class=\"textbox__content\">\r\n<table style=\"border-collapse: collapse;width: 100%;height: 113px\" border=\"0\">\r\n<tbody>\r\n<tr style=\"height: 29px\">\r\n<td class=\"border\" style=\"width: 23.0987%;text-align: center;height: 29px\">Store Number<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;text-align: center;height: 29px\">Number of Employees<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;text-align: center;height: 29px\">Proportion of Women Employees<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">1<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">300<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.40<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">2<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">150<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.65<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">3<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">200<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.60<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">4<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">250<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.50<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">5<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">100<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.70<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\"><\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">Total = 1000<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div class=\"textbox__content\">If an employee chosen at random is a woman, what is the probability that the employee works at store III?<\/div>\r\n<div class=\"textbox__content\"><strong>Solution<\/strong><\/div>\r\n<div class=\"textbox__content\">Let <em>k<\/em> = 1, 2, ..., 5 be the event that the employee worked at store <em>k<\/em>, and <em>W<\/em> be the event that the employee is a woman. Since there are a total of 1000 employees at the five stores,<\/div>\r\n<div class=\"textbox__content\"><em>P<\/em>(1) = 0.30\u00a0 \u00a0 \u00a0<em>P<\/em>(2) = 0.15\u00a0 \u00a0 \u00a0<em>P<\/em>(3) = 0.20\u00a0 \u00a0 \u00a0<em>P<\/em>(4) = 0.25\u00a0 \u00a0 \u00a0<em>P<\/em>(5) = 0.10<\/div>\r\n<div class=\"textbox__content\">Using Bayes' formula,<\/div>\r\n<div class=\"textbox__content\">$P(3\\,|\\, W) = \\frac{P(3)\\, P(W|3)}{P(1)\\, P(W|1)+P(2)\\, P(W|2)+P(3)\\, P(W|3)+P(4)\\,P(W|4)+P(5)\\,P(W|5)} = \\frac{(0.20)(0.60)}{(0.30)(0.40)+(0.15)(0.65)+(0.20)(0.60)+(0.25)(0.50)+(0.10)(0.70)} = 0.2254$<\/div>\r\n<\/div>\r\n&nbsp;\r\n\r\nFor certain problems, we can use a much more intuitive approach than Bayes' Formula.\r\n\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example 7.2.4<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">A certain disease has an incidence rate of 2%. A test is available to test for the disease, but it is not perfect. The <strong>false negative rate<\/strong> is 10% (that is, about 10% of people who take the test will test negative, even though they actually have the disease). The <strong>false positive rate<\/strong> is 1% (that is, about 1% of people who take the test will test positive, even though they do not actually have the disease). Compute the probability that a person who tests positive actually has the disease: $P(disease\\,|\\, positive)$<\/div>\r\n<div class=\"textbox__content\">Imagine 10,000 people are tested. Of these 10,000, 200 will have the disease; 10% of them, or 20, will test negative and the remaining 180 will test positive. Of the 9800 who do not have the disease, 1% of them, or 98, will test positive. These data can be summarized in a table as follows:<\/div>\r\n<div style=\"text-align: left;padding-left: 40px\">\r\n<table style=\"border-collapse: collapse;width: 91.1765%;height: 56px\" border=\"0\">\r\n<tbody>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\"><\/td>\r\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">Positive test<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">Negative test<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">Total<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\">Have disease<\/td>\r\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">180<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">20<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">200<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\">Do not have disease<\/td>\r\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">98<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">9,702<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">9,800<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\">Total<\/td>\r\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">278<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">9,822<\/td>\r\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">10,000<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div class=\"textbox__content\"><strong>Solution<\/strong><\/div>\r\n<div class=\"textbox__content\">So of the 278 people who test positive, 180 will have the disease. Thus:<\/div>\r\n<div class=\"textbox__content\">$P(disease\\,|\\, positive) = \\frac{180}{278} \\approx 0.647$<\/div>\r\n<div>\r\n<div class=\"textbox__content\">So about 65% of the people who test positive will have the disease.<\/div>\r\n<div class=\"textbox__content\"><span style=\"font-size: 1rem\">Using Bayes' formula directly would give the same result:<\/span><\/div>\r\n<\/div>\r\n<div class=\"textbox__content\">$P(disease\\,|\\, positive) = \\frac{(0.02)(0.90)}{(0.02)(0.90)+(0.98)(0.01)} = \\frac{0.018}{0.0278} \\approx 0.647$<\/div>\r\n<\/div>\r\n&nbsp;\r\n\r\n<header class=\"textbox__header\"><\/header>\r\n<h1 class=\"textbox__content\">Practice questions<\/h1>\r\n<strong>1.<\/strong> Jar I contains five red and three white marbles, and Jar II contains four red and two white marbles. A jar is picked at random and a marble is drawn. Draw a tree diagram and find the following probabilities:\r\n<p style=\"padding-left: 40px\"><strong>a.\u00a0<\/strong><em>P\u00a0<\/em>(Marble is red)<\/p>\r\n<p style=\"padding-left: 40px\"><strong>b.\u00a0<\/strong>P\u00a0(The marble\u00a0came from Jar II given that a white marble is\u00a0drawn)<\/p>\r\n<p style=\"padding-left: 40px\"><strong>c.<\/strong>\u00a0<em>P\u00a0<\/em>(Red marble | Jar I)<\/p>\r\n<strong>2.<\/strong> The table below summarizes the results of a diagnostic test:\r\n<table style=\"border-collapse: collapse;width: 80.6921%;height: 56px\" border=\"0\">\r\n<tbody>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\"><\/td>\r\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">Positive test<\/td>\r\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">Negative test<\/td>\r\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">Total<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\">Have disease<\/td>\r\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">105<\/td>\r\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">15<\/td>\r\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">120<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\">Do not have disease<\/td>\r\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">40<\/td>\r\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">640<\/td>\r\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">680<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\">Total<\/td>\r\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">145<\/td>\r\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">655<\/td>\r\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">800<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nUsing the table, compute the following:\r\n<p style=\"padding-left: 40px\"><strong>a.<\/strong> P\u00a0(Negative test | disease positive)<\/p>\r\n<p style=\"padding-left: 40px\"><strong>b.<\/strong> P (Disease positive | test positive)<\/p>\r\n<strong>3<\/strong><strong>.<\/strong> A computer company buys its chips from three different manufacturers. Manufacturer I provides 60% of the chips, of which 5% are known to be defective; Manufacturer II supplies 30% of the chips, of which 4% are defective; while the rest are supplied by Manufacturer III, of which 3% are defective. If a chip is chosen at random, find the following probabilities:\r\n<p style=\"padding-left: 40px\"><strong>a.\u00a0<\/strong><em>P\u00a0<\/em>(The chip is defective)<\/p>\r\n<p style=\"padding-left: 40px\"><strong>b.\u00a0<\/strong>P\u00a0(The chip came from Manufacturer II | it is defective)<\/p>\r\n<p style=\"padding-left: 40px\"><strong>c.<\/strong>\u00a0<em>P\u00a0<\/em>(The chip is defective | it came from manufacturer III)<\/p>\r\n<strong>4.\u00a0<\/strong>The following table shows the percent of \"Conditional Passes\" that different types of food premises received in a city during their last public health inspection.\r\n<div class=\"textbox__content\">\r\n<table style=\"border-collapse: collapse;width: 100%;height: 110px\" border=\"0\">\r\n<tbody>\r\n<tr style=\"height: 29px\">\r\n<td class=\"border\" style=\"width: 23.0987%;text-align: center;height: 29px\">Premise Type<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;text-align: center;height: 29px\">Number of Premises<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;text-align: center;height: 29px\">Proportion that Received Conditional Pass<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Restaurant<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">2000<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.07<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Grocery Store<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">425<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.03<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 11px;text-align: center\">Cafe\/Bar<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 11px;text-align: center\">1865<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 11px;text-align: center\">0.05<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Food Truck\/Cart<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">150<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.08<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Other<\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">560<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.05<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\"><\/td>\r\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">Total = 5000<\/td>\r\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div class=\"textbox__content\">If a premise is selected at random, find the following probabilities:<\/div>\r\n<p style=\"padding-left: 40px\"><strong>a. <\/strong><em>P\u00a0<\/em>(Received Conditional Pass)<\/p>\r\n<p style=\"padding-left: 40px\"><strong>b. <\/strong><em>P\u00a0<\/em>(Received Conditional Pass | Restaurant)<\/p>\r\n<p style=\"padding-left: 40px\"><strong>c. <\/strong><em>P\u00a0<\/em>(Grocery Store | Received Conditional Pass)<\/p>\r\n&nbsp;","rendered":"<h1>Bayes&#8217; Formula<\/h1>\n<p>In this section, we will develop and use Bayes&#8217; Formula to solve an important type of probability problem. Bayes&#8217; formula is a method of calculating the conditional probability <em>P<\/em>(<em>F<\/em> | <em>E<\/em>) from <em>P<\/em>(<em>E<\/em> | <em>F<\/em>). The ideas involved here are not new, and most of these problems can be solved using a tree diagram. However, Bayes&#8217; formula does provide us with a tool with which we can solve these problems without a tree diagram. We begin with an example.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example 7.2.1<\/p>\n<\/header>\n<div class=\"textbox__content\">Suppose you are given two jars. Jar I contains one black and 4 white marbles, and Jar II contains 4 black and 6 white marbles. If a jar is selected at random and a marble is chosen:<\/div>\n<div class=\"textbox__content\" style=\"padding-left: 40px\"><strong>a.<\/strong> What is the probability that the marble chosen is a black marble?<\/div>\n<div class=\"textbox__content\" style=\"padding-left: 40px\"><strong>b.<\/strong> If the chosen marble is black, what is the probability that it came from Jar I?<\/div>\n<div class=\"textbox__content\" style=\"padding-left: 40px\"><strong>c.<\/strong> If the chosen marble is black, what is the probability that it came from Jar II?<\/div>\n<div class=\"textbox__content\"><strong>Solution <\/strong><\/div>\n<div class=\"textbox__content\" style=\"text-align: center\">\n<p>Let <em>JI<\/em>\u00a0be the event that Jar I is chosen, <em>JII<\/em> be the event that Jar II is chosen, <em>B<\/em> be the event that a black marble is chosen and <em>W<\/em> the event that a white marble is chosen. We illustrate using a tree diagram.<\/p>\n<div class=\"textbox\">\n<table class=\"no-lines\" style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 50%\">\n<p class=\"ql-center-picture\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-22ea30290d311d0c5d6974814cdee57d_l3.png\" height=\"120\" width=\"222\" class=\"ql-img-picture quicklatex-auto-format\" alt=\"Rendered by QuickLaTeX.com\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p style=\"text-align: center\">(a)<\/p>\n<\/td>\n<td style=\"width: 50%\">\n<p class=\"ql-center-picture\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-36d7ee6e7856db334bb2e7532e3b04dd_l3.png\" height=\"288\" width=\"515\" class=\"ql-img-picture quicklatex-auto-format\" alt=\"Rendered by QuickLaTeX.com\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<p style=\"text-align: center\">(b)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div class=\"textbox__content\"><strong>a.<\/strong> The probability that a black marble is chosen is <em>P<\/em>(<em>B<\/em>) = 1\/10 + 2\/10 = 3\/10.<\/div>\n<div class=\"textbox__content\"><strong>b.<\/strong> To find <em>P<\/em>(<em>JI<\/em> | <em>B<\/em>), we use the definition of conditional probability, and we get<\/div>\n<div class=\"textbox__content\" style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-4f2719720ca06c49dd163a43812c3661_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#74;&#73;&#92;&#44;&#124;&#92;&#44;&#32;&#66;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#80;&#40;&#74;&#73;&#92;&#99;&#97;&#112;&#32;&#66;&#41;&#125;&#123;&#80;&#40;&#66;&#41;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#47;&#49;&#48;&#125;&#123;&#51;&#47;&#49;&#48;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#51;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"261\" style=\"vertical-align: -10px;\" \/><\/div>\n<div class=\"textbox__content\"><strong>c.<\/strong> Similarly, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-56b5173bb4903d73a3460bd2b59e23e1_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#74;&#73;&#73;&#92;&#44;&#124;&#92;&#44;&#32;&#66;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#80;&#40;&#74;&#73;&#73;&#92;&#99;&#97;&#112;&#32;&#66;&#41;&#125;&#123;&#80;&#40;&#66;&#41;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#50;&#47;&#49;&#48;&#125;&#123;&#51;&#47;&#49;&#48;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#50;&#125;&#123;&#51;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"278\" style=\"vertical-align: -10px;\" \/><\/div>\n<div class=\"textbox__content\">In parts <strong>b<\/strong> and <strong>c<\/strong>, the reader should note that the denominator is the sum of all probabilities of all branches of the tree that produce a black marble, while the numerator is the branch that is associated with the particular jar in question.<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>This is a statement of Bayes&#8217; formula.<\/p>\n<div class=\"textbox shaded\">\n<p><strong>Bayes&#8217; Formula:<\/strong>Let <em>S<\/em> be a sample space that is divided into <em>n<\/em> partitions, <em>A<\/em><sub>1<\/sub>, <em>A<\/em><sub>2<\/sub>, . . . <em>A<sub>n<\/sub><\/em>. If <em>E<\/em> is any event in <em>S<\/em>, then:<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-1bbf6885869e94b87e2f11eae0e487e9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#65;&#95;&#105;&#92;&#44;&#124;&#92;&#44;&#32;&#69;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#80;&#40;&#65;&#95;&#105;&#41;&#92;&#44;&#32;&#80;&#40;&#69;&#92;&#44;&#124;&#92;&#44;&#32;&#65;&#95;&#105;&#41;&#125;&#123;&#80;&#40;&#65;&#95;&#49;&#41;&#92;&#44;&#32;&#80;&#40;&#69;&#92;&#44;&#124;&#92;&#44;&#32;&#65;&#95;&#49;&#41;&#43;&#80;&#40;&#65;&#95;&#50;&#41;&#92;&#44;&#32;&#80;&#40;&#69;&#92;&#44;&#124;&#92;&#44;&#32;&#65;&#95;&#50;&#41;&#43;&#92;&#44;&#92;&#99;&#100;&#111;&#116;&#115;&#92;&#44;&#43;&#80;&#40;&#65;&#95;&#110;&#41;&#92;&#44;&#32;&#80;&#40;&#69;&#92;&#44;&#124;&#92;&#44;&#32;&#65;&#95;&#110;&#41;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"470\" style=\"vertical-align: -10px;\" \/><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example 7.2.2<\/p>\n<\/header>\n<div class=\"textbox__content\">A department store buys 50% of its appliances from Manufacturer A, 30% from Manufacturer B, and 20% from Manufacturer C. It is estimated that 6% of Manufacturer A&#8217;s appliances, 5% of Manufacturer B&#8217;s appliances, and 4% of Manufacturer C&#8217;s appliances need repair before the warranty expires. An appliance is chosen at random. If the appliance chosen needed repair before the warranty expired, what is the probability that the appliance was manufactured by Manufacturer A? Manufacturer B? Manufacturer C?<\/div>\n<div class=\"textbox__content\"><strong>Solution<\/strong><\/div>\n<div class=\"textbox__content\">Let events <em>A<\/em>, <em>B<\/em> and <em>C<\/em> be the events that the appliance is manufactured by Manufacturer A, Manufacturer B, and Manufacturer C, respectively. Further, suppose that the event <em>R<\/em> denotes that the appliance needs repair before the warranty expires.<\/div>\n<div class=\"textbox__content\">We need to find <em>P<\/em>(<em>A<\/em> | <em>R<\/em>), <em>P<\/em>(<em>B<\/em> | <em>R<\/em>) and <em>P<\/em>(<em>C<\/em> | <em>R<\/em>).<\/div>\n<div class=\"textbox__content\">We will do this problem both by using a tree diagram and by using Bayes&#8217; formula.<\/div>\n<div class=\"textbox__content\">We draw a tree diagram.<\/div>\n<div class=\"textbox__content\">\n<div class=\"textbox\">\n<p class=\"ql-center-picture\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-b2d5a47580769b8441b5993f00615527_l3.png\" height=\"457\" width=\"503\" class=\"ql-img-picture quicklatex-auto-format\" alt=\"Rendered by QuickLaTeX.com\" title=\"Rendered by QuickLaTeX.com\" \/><\/p>\n<\/div>\n<\/div>\n<div class=\"textbox__content\">\n<p style=\"text-align: left\"><span style=\"font-size: 1rem;text-align: left\">The probability <\/span><em style=\"font-size: 1rem;text-align: left\">P<\/em><span style=\"font-size: 1rem;text-align: left\">(<\/span><em style=\"font-size: 1rem;text-align: left\">A<\/em><span style=\"font-size: 1rem;text-align: left\"> | <\/span><em style=\"font-size: 1rem;text-align: left\">R<\/em><span style=\"font-size: 1rem;text-align: left\">), for example, is a fraction whose denominator is the sum of all probabilities of all branches of the tree that result in an appliance that needs repair before the warranty expires, and the numerator is the branch that is associated with Manufacturer A. <\/span><em style=\"font-size: 1rem;text-align: left\">P<\/em><span style=\"font-size: 1rem;text-align: left\">(<\/span><em style=\"font-size: 1rem;text-align: left\">B<\/em><span style=\"font-size: 1rem;text-align: left\"> | <\/span><em style=\"font-size: 1rem;text-align: left\">R<\/em><span style=\"font-size: 1rem;text-align: left\">) and <\/span><em style=\"font-size: 1rem;text-align: left\">P<\/em><span style=\"font-size: 1rem;text-align: left\">(<\/span><em style=\"font-size: 1rem;text-align: left\">C<\/em><span style=\"font-size: 1rem;text-align: left\"> | <\/span><em style=\"font-size: 1rem;text-align: left\">R<\/em><span style=\"font-size: 1rem;text-align: left\">) are found in the same way. We list both as follows:<\/span><\/p>\n<\/div>\n<div class=\"textbox__content\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-ddb80fc3fa26881e967023fd32a8c04f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#65;&#92;&#44;&#124;&#92;&#44;&#32;&#82;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#48;&#51;&#48;&#125;&#123;&#40;&#48;&#46;&#48;&#51;&#48;&#41;&#43;&#40;&#48;&#46;&#48;&#49;&#53;&#41;&#43;&#40;&#48;&#46;&#48;&#48;&#56;&#41;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#48;&#51;&#48;&#125;&#123;&#48;&#46;&#48;&#53;&#51;&#125;&#32;&#61;&#32;&#48;&#46;&#53;&#54;&#54;\" title=\"Rendered by QuickLaTeX.com\" height=\"26\" width=\"384\" style=\"vertical-align: -10px;\" \/><\/div>\n<div class=\"textbox__content\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-6c041e4e64a2c06bc58d09f57c955991_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#66;&#92;&#44;&#124;&#92;&#44;&#32;&#82;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#48;&#49;&#53;&#125;&#123;&#48;&#46;&#48;&#53;&#51;&#125;&#32;&#61;&#32;&#48;&#46;&#50;&#56;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"199\" style=\"vertical-align: -6px;\" \/>\u00a0 \u00a0and\u00a0 \u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-dbb3d77e439da468b89b9c79955870bb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#67;&#92;&#44;&#124;&#92;&#44;&#32;&#82;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#48;&#48;&#56;&#125;&#123;&#48;&#46;&#48;&#53;&#51;&#125;&#32;&#61;&#32;&#48;&#46;&#49;&#53;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"198\" style=\"vertical-align: -6px;\" \/>.<\/div>\n<div class=\"textbox__content\">Alternatively, using Bayes&#8217; formula:<\/div>\n<div class=\"textbox__content\" style=\"text-align: left\"><span style=\"font-size: 1rem\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-112273336c398a23f2d702af95e7463e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#65;&#92;&#44;&#124;&#92;&#44;&#32;&#82;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#80;&#40;&#65;&#41;&#92;&#44;&#32;&#80;&#40;&#82;&#92;&#44;&#124;&#92;&#44;&#32;&#65;&#41;&#125;&#123;&#80;&#40;&#65;&#41;&#92;&#44;&#32;&#80;&#40;&#82;&#92;&#44;&#124;&#92;&#44;&#32;&#65;&#41;&#43;&#80;&#40;&#66;&#41;&#92;&#44;&#32;&#80;&#40;&#82;&#92;&#44;&#124;&#92;&#44;&#32;&#66;&#41;&#43;&#80;&#40;&#67;&#41;&#92;&#44;&#32;&#80;&#40;&#82;&#92;&#44;&#124;&#92;&#44;&#32;&#67;&#41;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#48;&#51;&#48;&#125;&#123;&#40;&#48;&#46;&#48;&#51;&#48;&#41;&#43;&#40;&#48;&#46;&#48;&#49;&#53;&#41;&#43;&#40;&#48;&#46;&#48;&#48;&#56;&#41;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#48;&#51;&#48;&#125;&#123;&#48;&#46;&#48;&#53;&#51;&#125;&#32;&#61;&#32;&#48;&#46;&#53;&#54;&#54;\" title=\"Rendered by QuickLaTeX.com\" height=\"54\" width=\"617\" style=\"vertical-align: -6px;\" \/><\/span><\/div>\n<div class=\"textbox__content\"><em style=\"font-size: 1rem\">P<\/em><span style=\"font-size: 1rem\">(<\/span><em style=\"font-size: 1rem\">B<\/em><span style=\"font-size: 1rem\"> | <\/span><em style=\"font-size: 1rem\">R<\/em><span style=\"font-size: 1rem\">) and <\/span><em style=\"font-size: 1rem\">P<\/em><span style=\"font-size: 1rem\">(<\/span><em style=\"font-size: 1rem\">C<\/em><span style=\"font-size: 1rem\"> | <\/span><em style=\"font-size: 1rem\">R<\/em><span style=\"font-size: 1rem\">) can be determined in the same manner.<\/span><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example 7.2.3<\/p>\n<\/header>\n<div class=\"textbox__content\">There are five Jacy&#8217;s department stores in San Jose. The distribution of number of employees by gender is given in the table below.<\/div>\n<div class=\"textbox__content\">\n<table style=\"border-collapse: collapse;width: 100%;height: 113px\">\n<tbody>\n<tr style=\"height: 29px\">\n<td class=\"border\" style=\"width: 23.0987%;text-align: center;height: 29px\">Store Number<\/td>\n<td class=\"border\" style=\"width: 33.973%;text-align: center;height: 29px\">Number of Employees<\/td>\n<td class=\"border\" style=\"width: 42.9282%;text-align: center;height: 29px\">Proportion of Women Employees<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">1<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">300<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.40<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">2<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">150<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.65<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">3<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">200<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.60<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">4<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">250<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.50<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">5<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">100<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.70<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\"><\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">Total = 1000<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"textbox__content\">If an employee chosen at random is a woman, what is the probability that the employee works at store III?<\/div>\n<div class=\"textbox__content\"><strong>Solution<\/strong><\/div>\n<div class=\"textbox__content\">Let <em>k<\/em> = 1, 2, &#8230;, 5 be the event that the employee worked at store <em>k<\/em>, and <em>W<\/em> be the event that the employee is a woman. Since there are a total of 1000 employees at the five stores,<\/div>\n<div class=\"textbox__content\"><em>P<\/em>(1) = 0.30\u00a0 \u00a0 \u00a0<em>P<\/em>(2) = 0.15\u00a0 \u00a0 \u00a0<em>P<\/em>(3) = 0.20\u00a0 \u00a0 \u00a0<em>P<\/em>(4) = 0.25\u00a0 \u00a0 \u00a0<em>P<\/em>(5) = 0.10<\/div>\n<div class=\"textbox__content\">Using Bayes&#8217; formula,<\/div>\n<div class=\"textbox__content\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-177fe73f1c89306890247681b2dc0a77_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#51;&#92;&#44;&#124;&#92;&#44;&#32;&#87;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#80;&#40;&#51;&#41;&#92;&#44;&#32;&#80;&#40;&#87;&#124;&#51;&#41;&#125;&#123;&#80;&#40;&#49;&#41;&#92;&#44;&#32;&#80;&#40;&#87;&#124;&#49;&#41;&#43;&#80;&#40;&#50;&#41;&#92;&#44;&#32;&#80;&#40;&#87;&#124;&#50;&#41;&#43;&#80;&#40;&#51;&#41;&#92;&#44;&#32;&#80;&#40;&#87;&#124;&#51;&#41;&#43;&#80;&#40;&#52;&#41;&#92;&#44;&#80;&#40;&#87;&#124;&#52;&#41;&#43;&#80;&#40;&#53;&#41;&#92;&#44;&#80;&#40;&#87;&#124;&#53;&#41;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#40;&#48;&#46;&#50;&#48;&#41;&#40;&#48;&#46;&#54;&#48;&#41;&#125;&#123;&#40;&#48;&#46;&#51;&#48;&#41;&#40;&#48;&#46;&#52;&#48;&#41;&#43;&#40;&#48;&#46;&#49;&#53;&#41;&#40;&#48;&#46;&#54;&#53;&#41;&#43;&#40;&#48;&#46;&#50;&#48;&#41;&#40;&#48;&#46;&#54;&#48;&#41;&#43;&#40;&#48;&#46;&#50;&#53;&#41;&#40;&#48;&#46;&#53;&#48;&#41;&#43;&#40;&#48;&#46;&#49;&#48;&#41;&#40;&#48;&#46;&#55;&#48;&#41;&#125;&#32;&#61;&#32;&#48;&#46;&#50;&#50;&#53;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"62\" width=\"617\" style=\"vertical-align: -10px;\" \/><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>For certain problems, we can use a much more intuitive approach than Bayes&#8217; Formula.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example 7.2.4<\/p>\n<\/header>\n<div class=\"textbox__content\">A certain disease has an incidence rate of 2%. A test is available to test for the disease, but it is not perfect. The <strong>false negative rate<\/strong> is 10% (that is, about 10% of people who take the test will test negative, even though they actually have the disease). The <strong>false positive rate<\/strong> is 1% (that is, about 1% of people who take the test will test positive, even though they do not actually have the disease). Compute the probability that a person who tests positive actually has the disease: <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-688d9f9c00dd2e9cd31c1811590f9e6d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#100;&#105;&#115;&#101;&#97;&#115;&#101;&#92;&#44;&#124;&#92;&#44;&#32;&#112;&#111;&#115;&#105;&#116;&#105;&#118;&#101;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"167\" style=\"vertical-align: -5px;\" \/><\/div>\n<div class=\"textbox__content\">Imagine 10,000 people are tested. Of these 10,000, 200 will have the disease; 10% of them, or 20, will test negative and the remaining 180 will test positive. Of the 9800 who do not have the disease, 1% of them, or 98, will test positive. These data can be summarized in a table as follows:<\/div>\n<div style=\"text-align: left;padding-left: 40px\">\n<table style=\"border-collapse: collapse;width: 91.1765%;height: 56px\">\n<tbody>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\"><\/td>\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">Positive test<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">Negative test<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">Total<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\">Have disease<\/td>\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">180<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">20<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">200<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\">Do not have disease<\/td>\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">98<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">9,702<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">9,800<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 30.5795%;height: 14px\">Total<\/td>\n<td class=\"border\" style=\"width: 19.4205%;height: 14px;text-align: right\">278<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">9,822<\/td>\n<td class=\"border\" style=\"width: 25%;height: 14px;text-align: right\">10,000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"textbox__content\"><strong>Solution<\/strong><\/div>\n<div class=\"textbox__content\">So of the 278 people who test positive, 180 will have the disease. Thus:<\/div>\n<div class=\"textbox__content\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-ad0e52628b140f7a1272871fbc9b41ab_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#100;&#105;&#115;&#101;&#97;&#115;&#101;&#92;&#44;&#124;&#92;&#44;&#32;&#112;&#111;&#115;&#105;&#116;&#105;&#118;&#101;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#56;&#48;&#125;&#123;&#50;&#55;&#56;&#125;&#32;&#92;&#97;&#112;&#112;&#114;&#111;&#120;&#32;&#48;&#46;&#54;&#52;&#55;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"286\" style=\"vertical-align: -6px;\" \/><\/div>\n<div>\n<div class=\"textbox__content\">So about 65% of the people who test positive will have the disease.<\/div>\n<div class=\"textbox__content\"><span style=\"font-size: 1rem\">Using Bayes&#8217; formula directly would give the same result:<\/span><\/div>\n<\/div>\n<div class=\"textbox__content\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-content\/ql-cache\/quicklatex.com-dd3468ecbc38661d2d5d5c84778668ae_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#100;&#105;&#115;&#101;&#97;&#115;&#101;&#92;&#44;&#124;&#92;&#44;&#32;&#112;&#111;&#115;&#105;&#116;&#105;&#118;&#101;&#41;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#40;&#48;&#46;&#48;&#50;&#41;&#40;&#48;&#46;&#57;&#48;&#41;&#125;&#123;&#40;&#48;&#46;&#48;&#50;&#41;&#40;&#48;&#46;&#57;&#48;&#41;&#43;&#40;&#48;&#46;&#57;&#56;&#41;&#40;&#48;&#46;&#48;&#49;&#41;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#48;&#46;&#48;&#49;&#56;&#125;&#123;&#48;&#46;&#48;&#50;&#55;&#56;&#125;&#32;&#92;&#97;&#112;&#112;&#114;&#111;&#120;&#32;&#48;&#46;&#54;&#52;&#55;\" title=\"Rendered by QuickLaTeX.com\" height=\"30\" width=\"494\" style=\"vertical-align: -10px;\" \/><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<header class=\"textbox__header\"><\/header>\n<h1 class=\"textbox__content\">Practice questions<\/h1>\n<p><strong>1.<\/strong> Jar I contains five red and three white marbles, and Jar II contains four red and two white marbles. A jar is picked at random and a marble is drawn. Draw a tree diagram and find the following probabilities:<\/p>\n<p style=\"padding-left: 40px\"><strong>a.\u00a0<\/strong><em>P\u00a0<\/em>(Marble is red)<\/p>\n<p style=\"padding-left: 40px\"><strong>b.\u00a0<\/strong>P\u00a0(The marble\u00a0came from Jar II given that a white marble is\u00a0drawn)<\/p>\n<p style=\"padding-left: 40px\"><strong>c.<\/strong>\u00a0<em>P\u00a0<\/em>(Red marble | Jar I)<\/p>\n<p><strong>2.<\/strong> The table below summarizes the results of a diagnostic test:<\/p>\n<table style=\"border-collapse: collapse;width: 80.6921%;height: 56px\">\n<tbody>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\"><\/td>\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">Positive test<\/td>\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">Negative test<\/td>\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">Total<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\">Have disease<\/td>\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">105<\/td>\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">15<\/td>\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">120<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\">Do not have disease<\/td>\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">40<\/td>\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">640<\/td>\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">680<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 22.3659%;height: 14px\">Total<\/td>\n<td class=\"border\" style=\"width: 24.3915%;height: 14px;text-align: right\">145<\/td>\n<td class=\"border\" style=\"width: 25.8829%;height: 14px;text-align: right\">655<\/td>\n<td class=\"border\" style=\"width: 19.8512%;height: 14px;text-align: right\">800<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Using the table, compute the following:<\/p>\n<p style=\"padding-left: 40px\"><strong>a.<\/strong> P\u00a0(Negative test | disease positive)<\/p>\n<p style=\"padding-left: 40px\"><strong>b.<\/strong> P (Disease positive | test positive)<\/p>\n<p><strong>3<\/strong><strong>.<\/strong> A computer company buys its chips from three different manufacturers. Manufacturer I provides 60% of the chips, of which 5% are known to be defective; Manufacturer II supplies 30% of the chips, of which 4% are defective; while the rest are supplied by Manufacturer III, of which 3% are defective. If a chip is chosen at random, find the following probabilities:<\/p>\n<p style=\"padding-left: 40px\"><strong>a.\u00a0<\/strong><em>P\u00a0<\/em>(The chip is defective)<\/p>\n<p style=\"padding-left: 40px\"><strong>b.\u00a0<\/strong>P\u00a0(The chip came from Manufacturer II | it is defective)<\/p>\n<p style=\"padding-left: 40px\"><strong>c.<\/strong>\u00a0<em>P\u00a0<\/em>(The chip is defective | it came from manufacturer III)<\/p>\n<p><strong>4.\u00a0<\/strong>The following table shows the percent of &#8220;Conditional Passes&#8221; that different types of food premises received in a city during their last public health inspection.<\/p>\n<div class=\"textbox__content\">\n<table style=\"border-collapse: collapse;width: 100%;height: 110px\">\n<tbody>\n<tr style=\"height: 29px\">\n<td class=\"border\" style=\"width: 23.0987%;text-align: center;height: 29px\">Premise Type<\/td>\n<td class=\"border\" style=\"width: 33.973%;text-align: center;height: 29px\">Number of Premises<\/td>\n<td class=\"border\" style=\"width: 42.9282%;text-align: center;height: 29px\">Proportion that Received Conditional Pass<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Restaurant<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">2000<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.07<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Grocery Store<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">425<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.03<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 11px;text-align: center\">Cafe\/Bar<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 11px;text-align: center\">1865<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 11px;text-align: center\">0.05<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Food Truck\/Cart<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">150<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.08<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\">Other<\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">560<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\">0.05<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td class=\"border\" style=\"width: 23.0987%;height: 14px;text-align: center\"><\/td>\n<td class=\"border\" style=\"width: 33.973%;height: 14px;text-align: center\">Total = 5000<\/td>\n<td class=\"border\" style=\"width: 42.9282%;height: 14px;text-align: center\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"textbox__content\">If a premise is selected at random, find the following probabilities:<\/div>\n<p style=\"padding-left: 40px\"><strong>a. <\/strong><em>P\u00a0<\/em>(Received Conditional Pass)<\/p>\n<p style=\"padding-left: 40px\"><strong>b. <\/strong><em>P\u00a0<\/em>(Received Conditional Pass | Restaurant)<\/p>\n<p style=\"padding-left: 40px\"><strong>c. <\/strong><em>P\u00a0<\/em>(Grocery Store | Received Conditional Pass)<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":130,"menu_order":2,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[48],"contributor":[],"license":[],"class_list":["post-2690","chapter","type-chapter","status-publish","hentry","chapter-type-numberless"],"part":966,"_links":{"self":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/pressbooks\/v2\/chapters\/2690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/wp\/v2\/users\/130"}],"version-history":[{"count":23,"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/pressbooks\/v2\/chapters\/2690\/revisions"}],"predecessor-version":[{"id":3346,"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/pressbooks\/v2\/chapters\/2690\/revisions\/3346"}],"part":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/pressbooks\/v2\/parts\/966"}],"metadata":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/pressbooks\/v2\/chapters\/2690\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/wp\/v2\/media?parent=2690"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/pressbooks\/v2\/chapter-type?post=2690"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/wp\/v2\/contributor?post=2690"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/ohsmath\/wp-json\/wp\/v2\/license?post=2690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}