# Find the probability distribution of X?

Suppose Nokia store places 20 of its cell phones on a clearance sale, unknown to anyone 5 of these cell phones are defective. A customer selects 3 cell phones at random for inspection. Let X be the number of defective cell phones in the sample. Find the probability distribution of X?

My attempt:

$$\begin{matrix} x & 0 & 1 & 2 & 3 \\ P(X=x) & 0.015625 & 0.140625 & 0.421875 & 0.421875 \\ \\ \end{matrix}$$

I calculated the values using the binomial distribution: $$P(X = x) = nCx \ p^{n-x} (1-p)^x$$

Where, $n$=5, $x$=0,1,2,3 and $p$=(.25) [from 5/20]

Is this the correct way to do this?

-
IF $p$ is the probability of detecting a faulty item ('success'), then it should be $\binom{n}{x}p^{x}(1-p)^{n-x}$ –  Alex Nov 25 '12 at 8:17
@Alex for sampling with replacement –  Henry Nov 25 '12 at 8:34
Still, important to point out that even though Binomial is inappropriate, Binomial was mishandled. –  André Nicolas Nov 25 '12 at 10:03

No it is not correct.

In particular with only a quarter of the phones defective, getting three defectives out of three in the sample should have a low probability.

A second point is that the customer is presumably looking at three different phones (sampling without replacement), so you not be using the binomial distribution.

As an example, the probability of three phones defective, sampling without replacement, is $${3 \choose 3} \times \frac{5}{20} \times \frac{4}{19} \times \frac{3}{18} \approx 0.00877$$ rather than your ${3 \choose 3}0.25^0 0.75^3 = 0.421875.$

-

This experiment is described by a hypergeometric distribution. For every $0\leqslant k\leqslant 3$, $$\mathbb P(X=k)=\frac{\color{red}{{5\choose k}}\color{green}{{15\choose 3-k}}}{{20\choose 3}}$$ hence $$\mathbb P(X=3)=\frac{\color{red}{5\cdot4\cdot3}}{20\cdot19\cdot18}, \qquad \mathbb P(X=2)=\frac{\color{red}{5\cdot4}\cdot3\cdot\color{green}{15}}{20\cdot19\cdot18},$$ $$\mathbb P(X=1)=\frac{\color{red}{5}\cdot3\cdot\color{green}{14\cdot15}}{20\cdot19\cdot18}, \qquad \mathbb P(X=0)=\frac{\color{green}{13\cdot14\cdot15}}{20\cdot19\cdot18}.$$

-
(a) I thought you preferred hints rather than the full answer. (b) Your four probabilities do not add up to 1. –  Henry Nov 25 '12 at 9:04
@Henry (a) Maybe so. A naked link to the WP page might have been more educational here. (b) Thanks, misprint corrected. –  Did Nov 25 '12 at 9:25
OK - I will delete those comments –  Henry Nov 25 '12 at 12:09