# Probability that hard drive is defective

Suppose a manufacturer produces batches of 100 hard drives. In a given batch, there are 20 defective ones. Quality control selects two hard drives to test at random, without replacement, from the batch.

1. What is the probability that the first hard drive selected is defective?

2. What is the probability that the second hard drive selected is defective, given that the first hard drive was defective?

3. What is the probability that both hard drives are defective?

Number 1. would just be $\displaystyle \frac{20}{100} = \frac{1}{5}$.

For number 2., we're looking for $P(b|a)$ where $b$ means that the second hard drive is defective and $a$ means the first one is. I know $\displaystyle P(b|a) = \frac{P(b\wedge a)}{P(b)}$.

$\displaystyle P(b\wedge a) = \frac{20}{100}\cdot \frac{19}{100}$

But how do we calculate $P(b)$? Doesn't this dependent on whether $a$ was defective or not?

I'm having similar issues with 3.

You're slightlty mistaken: $$P(b|a)=\frac{P(ba)}{P(a)}\ne\frac{P(ba)}{P(b)}$$ and you have already calculated $P(a)$ For 3 its: $$P=\frac{\binom{20}2}{\binom{100}2}$$

• Oh, OK. That makes more sense. Is 3. just $P(b\wedge a)$ I calculated in 2.? – Carley Dec 15 '14 at 11:21
• @Carley edited. – RE60K Dec 15 '14 at 11:28
• I wouldn't use that "$\neq$" there, because it is not necessarily true. – barak manos Dec 15 '14 at 13:06

$$P(b\wedge a)=\frac{20}{100}\cdot\frac{19}{99}$$

• $P({b}|{a})=\dfrac{P({b}\cap{a})}{P(\color{red}{b})}$
• $P({b}\cap{a})=\dfrac{20}{100}\cdot\dfrac{19}{\color{red}{100}}$
• $P({b}|{a})=\dfrac{P({b}\cap{a})}{P(\color{green}{a})}$
• $P({b}\cap{a})=\dfrac{20}{100}\cdot\dfrac{19}{\color{green}{99}}$