# Combinatorics Homework Problem: The Probability that $l$ items in a batch are defective

A batch of $n$ items contains $k$ defective items. Suppose $m$ items are selected at random. What is the probability that $l$ of these items are defective?

$$\frac{{m \choose k}{k \choose l}}{n \choose m}$$

because there are ${m \choose k}$ ways to choose a defective item from m items and ${k \choose l}$ ways to choose l items from k. This seems right to me, but I'm not sure.

-

No, $\binom{m}k$ is the number of ways to choose $k$ items from a set of $m$ items. That’s not what you’re doing here. Indeed, $m$ might be much smaller than $k$, in which case $\binom{m}k=0$, but as long as $\ell\le m$ it’s certainly possible to choose a set of $m$ objects that includes $\ell$ defective items.
You want to know how many ways there are to choose $m$ items in such a way that $\ell$ of them are defective, given that there are $k$ defective items altogether. To do this, you must choose $\ell$ of the $k$ defective items, which you can do in $\binom{k}\ell$ ways, and $m-\ell$ of the non-defective items. There are $n-k$ non-defective items, so you can choose $m-\ell$ of them in $\binom{n-k}{m-\ell}$ ways. Thus, the numerator of your fraction should be
$$\binom{n-k}{m-\ell}\binom{k}\ell\;.$$