Question
A quality officer receives a box of five parts. Before opening it, she knows two equally likely possibilities for its contents: either exactly one part is defective, or exactly three parts are defective. Conditional on either composition, every arrangement of defective parts in the box is equally likely.
She randomly samples two parts without replacement. A test machine reports only ALARM if at least one of those two parts is defective, or CLEAR otherwise; it does not reveal how many were defective. The two tested parts are discarded. After seeing ALARM, she randomly takes one of the three remaining parts for a second test.
What is the probability that this later part is defective, conditional on the first ALARM? Account for both what the alarm tells her about the original box and which parts the first test removed.
Get hint
Hint 1
Separate the cases of one defect and three defects initially. For each, list how many defective items might have been removed in the first two draws.
Check your answer
Solution
Let K be the original defect count, equally likely to be 1 or 3; let J be the number of defects in the two discarded test parts. Conditional on \(K\), \(J\) is hypergeometric: \(P(J=j\mid K)=\frac{\binom{K}{j}\binom{5-K}{2-j}}{\binom{5}{2}}\), with \(\binom{5}{2}=10\). The alarm is the event \(J\ge1\).
For \(K=1\), \(J=1\) has probability \(\frac{\binom{1}{1}\binom{4}{1}}{10}=\frac{4}{10}\), and \(J=0\) has probability 6/10. Thus \(P(\mathrm{ALARM}\mid K=1)=\frac{2}{5}\). Whenever the alarm occurs in this case, the only defect has already been discarded, so the later part is certainly sound.
For \(K=3\), the first sample has \(J=0,1,2\) with probabilities 1/10, 6/10, 3/10 respectively. Consequently \(P(\mathrm{ALARM}\mid K=3)=\frac{9}{10}\). If \(J=1\), two of the three remaining parts are defective, so the next-draw defect probability is 2/3; if \(J=2\), only one of the three remains defective, giving probability 1/3.
The joint probability of an alarm and a defective later part is
\[\begin{aligned}P(\mathrm{ALARM}\cap\text{later defect})&=(\frac{1}{2})[(\frac{4}{10})\times0]+(\frac{1}{2})[(\frac{6}{10})(\frac{2}{3})+(\frac{3}{10})(\frac{1}{3})]\\&=(\frac{1}{2})(\frac{4}{10}+\frac{1}{10})=\frac{1}{4}\end{aligned}\].
The unconditional alarm probability is \(P(\mathrm{ALARM})=(\frac{1}{2})(\frac{2}{5})+(\frac{1}{2})(\frac{9}{10})=\frac{13}{20}\). Therefore
\[P(\text{later defect}\mid\mathrm{ALARM})=\frac{\frac{1}{4}}{\frac{13}{20}}=\frac{5}{13}\approx0.384615\].
As a direct verification, enumerate the two possible compositions, the ten equally likely unordered first samples in each, and the three equally likely remaining choices. Counting alarm-and-defect outcomes by these exact weights reproduces 1/4 and 13/20. Simply applying the alarm-updated original defect fraction would be wrong: the first test not only reveals aggregate information but removes the parts most likely to have caused that alarm.
Assumptions
The two original compositions have prior probabilities 1/2 each, and locations of defects are exchangeable within a composition.
The first two parts are sampled uniformly without replacement, discarded after testing, and the machine reveals only whether \(J\ge1\).
The later part is uniformly sampled from the three remaining parts, without replacing any discarded part.
Final Answer
\(P(\text{later defective}\mid\mathrm{ALARM})=\frac{5}{13}\approx38.46\%\).