# Confusing conditional probability question

I have a probability question, that's been bugging me for a while now:

We are given that defective items on display occur independently with probability 0.05. A random sample of 100 items is taken. Given that at least 99 of the sampled items are not defective, I want to find the probability that the first item sampled is not defective.

Please, how do I go about solving this question?

Thanks.

-

## 2 Answers

Let $A$ be the event that the first item is not defective. Let $B$ be the event that at least 99 items are not defective. Then we want $$P~(A|B)=\frac{P(A~\text{and}~B)}{P~(B)}.$$

\begin{align*} P~(B)& = P~(99~\text{are not defective}) + P~ (100 ~\text{are not defective})\\ &=100\cdot 0.95^{99}\cdot 0.05 + 0.95^{100}. \end{align*} \begin{align*} P~(A~\text{and}~ B) &= P~(\text{one is defective and the first is not defective})\\ & +~ P~(\text{none is defective and the first is not defective})\\ & = 99\cdot 0.95^{99}\cdot 0.05 + 0.95^{100}. \end{align*}

I hope this helps.

-
The last part doesn't make sense. The event that one is defective and 99 are not includes the case in which the first is defective, and that is not included in $[A\text{ and }B]$. –  Michael Hardy Dec 19 '11 at 1:27
What you need in the last part is the probability that the first is non-defective, times the probability that at least 98 of the others are non-defective. That's $(0.95)(98\cdot0.95^{98}0.05 + 0.95^{99})$ $=98\cdot0.95^{99}0.05+0.95^{100}$. –  Michael Hardy Dec 19 '11 at 1:30
@MichaelHardy: Thanks for the comment. I've fixed it. It should be fine now. –  Nana Dec 19 '11 at 1:52
Shouldn't the last line be $98\cdot 0.95^{98}\cdot 0.05 + 0.95^{100}$? –  Gigili Dec 19 '11 at 1:59
@Gigili: I'm positive it shouldn't. –  jojo Dec 19 '11 at 2:05

This can be solved by a straightforward application of Bayes' Theorem. If $FD$ represents the event that the first sampled item is defective, and $ND$ represents the event that at least ninety-nine of the sampled items are not defective, then we get: $$P(FD|ND)=\frac{P(ND|FD)P(FD)}{P(ND)}$$

With a little thought, you should be able to calculate the conditional probability and the two unconditional probabilities on the right hand side, given the information you have. This looks like it probably needs a (homework) tag, so I'll leave it at that.

-
Thanks Skatche. It's not a homework problem. It's a question I saw on an old exam. –  jojo Dec 18 '11 at 23:37
ok. So I got the denominator to be $$100\cdot (0.95)^{99}\cdot (0.05)+(0.95)^{100}.$$ Could you help with the numerator? –  jojo Dec 18 '11 at 23:48
Well, note that $P(ND|FD)P(FD)=P(ND\cap FD)$, that is, the probability that at least ninety-nine of the sampled items are not defective, and that the first one is defective. That would be $(0.95)^{99}\cdot(0.05)$, right? –  Skatche Dec 18 '11 at 23:56
Shouldn't we rather compute the probability that at least ninety-nine are not defective and the first one is not defective? –  jojo Dec 19 '11 at 0:03
@jojo: The only way for at least 99 of the 100 items to not be defective, and for the first one to be defective, is if all the items except the first are not defective, which occurs with probability $(0.95)^{99}$, and if the first is defective, which occurs with probability $0.05$. By assumption, the event that the first is defective is independent of the event that the other 99 are defective, so to get the final probability we just take the product, $(0.95)^{99}\cdot(0.05)$. –  Skatche Dec 19 '11 at 1:09