17. In a batch of $N$ parts, there are $n$ standard ones. $m$ parts are randomly selected. Find the probability that among the selected parts, exactly $k$ are standard.
Solution. The total number of possible elementary outcomes of the trial is equal to the number of ways to extract $m$ parts from $N$ parts, i.e., $C_{N}^{m}$ - the number of combinations of $N$ elements taken $m$ at a time.

Let's calculate the number of outcomes favorable to the event of interest (exactly $k$ standard parts among $m$ parts): $k$ standard parts can be taken from $n$ standard parts in $C_{n}^{k}$ ways; meanwhile, the remaining $m-k$ parts must be non-standard; taking $m-k$ non-standard parts from $N-n$ non-standard parts can be done in $C_{N-n}^{m-k}$ ways. Therefore, the number of favorable outcomes is $C_{n}^{k} C_{N-n}^{m-k}$.

The desired probability is the ratio of the number of outcomes favorable to the event to the total number of elementary outcomes:

$$
P=C_{n}^{k} \cdot C_{N-n}^{m-k} / C_{N}^{m}
$$