Bayes’ Formula
In 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 P(F | E) from P(E | F). 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.
Example 7.2.1
Let JI be the event that Jar I is chosen, JII be the event that Jar II is chosen, B be the event that a black marble is chosen and W the event that a white marble is chosen. We illustrate using a tree diagram.
(a) |
(b) |
![Rendered by QuickLaTeX.com P(JI\,|\, B) = \frac{P(JI\cap B)}{P(B)} = \frac{1/10}{3/10} = \frac{1}{3}](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-240c270d406d8e569259e600c7889b29_l3.png)
![Rendered by QuickLaTeX.com P(JII\,|\, B) = \frac{P(JII\cap B)}{P(B)} = \frac{2/10}{3/10} = \frac{2}{3}](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-00b9651226cf6b9a0e0397d1fa4acc3c_l3.png)
This is a statement of Bayes’ formula.
Bayes’ Formula:Let S be a sample space that is divided into n partitions, A1, A2, . . . An. If E is any event in S, then:
Example 7.2.2
The probability P(A | R), 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. P(B | R) and P(C | R) are found in the same way. We list both as follows:
![Rendered by QuickLaTeX.com P(A\,|\, R) = \frac{0.030}{(0.030)+(0.015)+(0.008)} = \frac{0.030}{0.053} = 0.566](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-d00ea0ac9c74d844b33e9fcc497af2a8_l3.png)
![Rendered by QuickLaTeX.com P(B\,|\, R) = \frac{0.015}{0.053} = 0.283](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-d9998f1daaf0cfcb0054dd20cac1b230_l3.png)
![Rendered by QuickLaTeX.com P(C\,|\, R) = \frac{0.008}{0.053} = 0.151](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-aa6cec90fc348fb57e08d44d61c52085_l3.png)
![Rendered by QuickLaTeX.com 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](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-9c885421ceb86e953feeeb3f0c312bf4_l3.png)
Example 7.2.3
Store Number | Number of Employees | Proportion of Women Employees |
1 | 300 | 0.40 |
2 | 150 | 0.65 |
3 | 200 | 0.60 |
4 | 250 | 0.50 |
5 | 100 | 0.70 |
Total = 1000 |
![Rendered by QuickLaTeX.com 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](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-ea8359ded19d560bd1101ba13dee950b_l3.png)
For certain problems, we can use a much more intuitive approach than Bayes’ Formula.
Example 7.2.4
![Rendered by QuickLaTeX.com P(disease\,|\, positive)](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-a6f69c6b9cc412dba415e39665d0d757_l3.png)
Positive test | Negative test | Total | |
Have disease | 180 | 20 | 200 |
Do not have disease | 98 | 9,702 | 9,800 |
Total | 278 | 9,822 | 10,000 |
![Rendered by QuickLaTeX.com P(disease\,|\, positive) = \frac{180}{278} \approx 0.647](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-282e6047d81949f3448c33fe60c8dc9c_l3.png)
![Rendered by QuickLaTeX.com P(disease\,|\, positive) = \frac{(0.02)(0.90)}{(0.02)(0.90)+(0.98)(0.01)} = \frac{0.018}{0.0278} \approx 0.647](https://pressbooks.library.torontomu.ca/pohmath/wp-content/ql-cache/quicklatex.com-1e41013b3365f9bfc658fedc31ffe55a_l3.png)
Practice questions
1. 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:
a. P (Marble is red)
b. P (The marble came from Jar II given that a white marble is drawn)
c. P (Red marble | Jar I)
2. The table below summarizes the results of a diagnostic test:
Positive test | Negative test | Total | |
Have disease | 105 | 15 | 120 |
Do not have disease | 40 | 640 | 680 |
Total | 145 | 655 | 800 |
Using the table, compute the following:
a. P (Negative test | disease positive)
b. P (Disease positive | test positive)
3. 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:
a. P (The chip is defective)
b. P (The chip came from Manufacturer II | it is defective)
c. P (The chip is defective | it came from manufacturer III)
4. 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.
Premise Type | Number of Premises | Proportion that Received Conditional Pass |
Restaurant | 2000 | 0.07 |
Grocery Store | 425 | 0.03 |
Cafe/Bar | 1865 | 0.05 |
Food Truck/Cart | 150 | 0.08 |
Other | 560 | 0.05 |
Total = 5000 |
a. P (Received Conditional Pass)
b. P (Received Conditional Pass | Restaurant)
c. P (Grocery Store | Received Conditional Pass)