Use Bayes theorem with two sources
Two machines A and B make all the items. If D means defective, the theorem gives P(A | D) = P(A)P(D | A) / (P(A)P(D | A) + P(B)P(D | B)).
This is original written practice with invented rates. Each answer is checked by also finding P(B | D), because the two must add to 1. Counts are expected values.
Find P(D), then each posterior
- Find P(D) = P(A)P(D | A) + P(B)P(D | B).
- Find P(A | D) = P(A)P(D | A) / P(D).
- Check: P(B | D) found the same way must make the total 1.
A makes 30 percent with 2 percent defective, B makes 70 percent with 5 percent defective
P(D) = 0.006 + 0.035 = 0.041. P(A | D) = 0.006 / 0.041 = 0.146.
Check: P(B | D) = 0.035 / 0.041 = 0.854, and 0.146 + 0.854 = 1.
A and B each make 50 percent, with 10 percent and 30 percent defective
P(D) = 0.05 + 0.15 = 0.2. P(A | D) = 0.05 / 0.2 = 0.25.
Check: P(B | D) = 0.15 / 0.2 = 0.75, and the total is 1.
A makes 20 percent with 90 percent defective, B makes 80 percent with 10 percent defective
P(D) = 0.18 + 0.08 = 0.26. P(A | D) = 0.18 / 0.26 = 0.692.
Check: P(B | D) = 0.08 / 0.26 = 0.308, and the total is 1.
Counterexample: answering with P(D | A)
A student says that in the first case the chance a defective item is from A is 2 percent.
The check fails. 2 percent is P(D | A), the defect rate of A. The probability that a defective item came from A is 14.6 percent.
Try one yourself
A makes 60 percent with 1 percent defective, B makes 40 percent with 4 percent defective. Find P(A | D) and check.
Show the worked self-check
P(D) = 0.006 + 0.016 = 0.022. P(A | D) = 0.006 / 0.022 = 0.273. Check: P(B | D) = 0.016 / 0.022 = 0.727, and the total is 1.
Scope and limits
- The page covers Bayes theorem with two sources.
- It does not cover three or more sources or tree diagrams.
- The rates are invented, and the questions are practice, not an exam key.
- Every answer is checked by the posteriors adding to 1.
Common questions
What is the difference between P(D | A) and P(A | D)?
The first is the defect rate of A. The second is the chance a defective item came from A.
Why can machine A have a small share of the defects with a lower rate?
It makes fewer items overall.
What is P(D) in a two-machine problem?
The total probability of a defective item, from both machines.
Where does the name Bayes come from?
From the mathematician Thomas Bayes.
Sources and scope
Sources checked . They support Bayes theorem. The numbers, worked examples and self-check above are original EZT practice.
- NCERT Class 12 Mathematics: Probability, for the theorem statement.
- Wikipedia: Bayes theorem, for the posterior formula.
Read the Class 10 probability chapterBrowse tuition and practice pages