Example 24: Machine set-up: correct, given 2 acceptable items,
If a machine is correctly set up, it produces 90% acceptable items. If it is incorrectly set up, it produces only 40% acceptable items. Past experience shows that 80% of the set ups are correctly done. If after a certain set up, the machine produces 2 acceptable items, find the probability that the machine is correctly setup.
Let : the machine produces 2 acceptable items, : the set-up is correct, and : the set-up is incorrect.
and form a partition of the sample space (a set-up is either correct or incorrect).
An item is acceptable with probability after a correct set-up and after an incorrect one. Taking the two items as independent,
By the theorem of total probability,
By Bayes' theorem,
The probability that the machine is correctly set up is .
Want the reason behind every step, the basics and the checks?
Two good items are strong evidence of a good set-up. A correct set-up gives two acceptable items with probability ; an incorrect one only . Combined with the prior 80% for a correct set-up, Bayes' theorem raises the chance of a correct set-up to about 95%.
- Given
- Correct set-up: 90% of items acceptable. Incorrect set-up: 40%. 80% of set-ups are correct. After a set-up, 2 items are produced and both are acceptable.
- To find
- The probability that the set-up is correct, given the 2 acceptable items: .
- Plan
- (1) Name the events. (2) Percentages as fractions; by the product rule for the two items. (3) Total probability for . (4) Bayes' theorem.
Basics you need
, , . Basics: working with fractions
For independent items, P(both acceptable) = P(first acceptable) × P(second acceptable). Lesson: independent events
Solution
Name the events
Let
- : the machine produces 2 acceptable items;
- : the set-up is correct;
- : the set-up is incorrect.
is the complement of , so and form a partition of the sample space.
The set-up is the hidden cause; the two acceptable items are what we observe. We want the probability of the cause "correct set-up" after seeing them.is a partition. Lesson: Bayes' theoremThe probabilities of the causes
"80% of the set ups are correctly done" is the chance of a correct set-up before we see any items. The book writes these as 0.8 and 0.2.The chance of 2 acceptable items for each set-up
After a correct set-up each item is acceptable with probability ; after an incorrect one with probability . Taking the two items as independent of each other (given the set-up),
The question gives the rate for one item; we need both items acceptable. The book multiplies the rates ( and ), which assumes that, once the set-up is fixed, whether one item is acceptable does not affect the other. The question does not say this in words, but it is the natural reading and the book's.Independent: . Lesson: independent eventsThe chance of 2 acceptable items: total probability
By the theorem of total probability,
The tree for Example 24. Two acceptable items come after a correct set-up (rose path, ) or after an incorrect one (green path, ). The two paths cannot both happen, so they add. In decimals they are the book's and , with sum 0.68.Multiply along a path, add the paths. Basics: tree diagramsCorrect set-up, given 2 acceptable items: Bayes' theorem
By Bayes' theorem,
The top is the correct-set-up path; the bottom is all ways of getting 2 acceptable items. The 500 cancels, and , . and share no factor. The book writes : is the same fraction (, ); its exact value is , and 0.95 is that value rounded to two decimal places.Simplify by the highest common factor. Basics: working with fractionsWhat the answer means
Before any items were seen, a correct set-up had probability . Two acceptable items raise it to . An incorrect set-up keeps , and .
Two acceptable items are about 5 times as likely after a correct set-up as after an incorrect one ( against ), so they shift the odds strongly towards a correct set-up.For a partition, . Lesson: Bayes' theorem
The probability that the machine is correctly set up is .
(Textbook answer: . The fraction equals , whose exact value is about 0.9529; the book's 0.95 is this value rounded to two decimal places.)
Picture 1000 set-ups. 800 are correct, and both items are acceptable after 81% of them, 648 set-ups. 200 are incorrect, and both items are acceptable after 16% of them, 32 set-ups. So 2 acceptable items appear after set-ups, and 648 of those were correct: , the same as .
- Using 0.9 instead of . The machine produced 2 acceptable items; one acceptable item would have probability 0.9, two have (and for an incorrect set-up).
- Answering 0.8. That is the probability of a correct set-up before the items are seen; the question gives new information.
- Calling 0.95 exact. The exact answer is ; 0.95 is a rounded value.
- When the evidence is several independent observations, is a product, and Bayes' theorem uses it as usual.
- More evidence moves the probability further: with one acceptable item the answer would be ; with two it is .
- For another two-cause question with percentages, see Exercise 13.3, Question 8.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| An event and its complement form a partition | Step 1 | Section 13.5.1 (Lesson: Bayes' theorem) |
| ; | Step 2 | Class XI (Basics: rules of probability) |
| Product rule for independent events | Step 3 | Section 13.4 (Lesson: independent events) |
| Theorem of total probability | Step 4 | Section 13.5.2 (Lesson: total probability) |
| Bayes' theorem | Steps 5, 6 | Section 13.5 (Examples 22 to 24) |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →