# Probability of defective items, and the probability the first chosen items come from Group A

I'm still trying to work out how to answer this question.

If Group $A$ has $\frac{1}{100}$ items defective, and Group $B$ has $\frac{1}{200}$ items defective. Overall probability of item being defective is therefore $\frac{3}{200} = 0.015$.

If the first item chosen works (is not defective) what is the probability it came from group $A$?

My thinking on this was just $1 - \frac{1}{100}$. Is that correct?

Secondly, what is the probability the second item works given the first one also works. Should I be applying conditional probability here?

• How did you get $3/200$ as overall probability of being defective? If it is by adding the probabilities $1/100$ and $1/200$ then you are wrong. – drhab Mar 27 '18 at 11:39
• @drhab I should have multiplied them instead? – kitkat1224 Mar 27 '18 at 12:05
• No. If $p$ is the probability that the item comes from group $A$ and $1-p$ is the probability that the item comes from group $B$ then the probability of being defective is $p\cdot1/100+(1-p)\cdot1/200$ – drhab Mar 27 '18 at 12:16
• so (p *1/100) + (1-p) * (1/200) ? – kitkat1224 Mar 27 '18 at 12:30
• If "random" stands for fifty-fifty where it concerns the groups then the probability of being defective is $\frac12\frac1{100}+\frac12\frac1{200}$ – drhab Mar 27 '18 at 12:32

Assuming both groups are equally large, the a priori probabilities are $P(A) = P(B) = \frac{1}{2}$ .Given is (the event $d$ is for defective) $P(d|A) = \frac{1}{100}$ and so $P(\lnot d| A) = \frac{99}{100}$.
$$P(A| \lnot d) = \frac{P(\lnot d|A)P(A)}{P(\lnot d|A)P(A) + P(\lnot d|B)P(B)}$$
which equals $\frac{2\cdot 99}{2\cdot 99+199}$ after simplification (a little less than a half).
• @kitkat1224 further conditioning. You know $P(A|\lnot d)$ and $P(B |\lnot d)$. Now condition P(\lnot d_2)$in$A$etc. – Henno Brandsma Mar 27 '18 at 13:11 • @kitkat1224 so$P(\lnot d_2)= P(\lnot d_2|A)P(A|\lnot d_1) + P(\lnot d_2|B)P(B| \lnot d_1)\$ – Henno Brandsma Mar 27 '18 at 13:14