Solution (source code)

= Solution

Count unordered sets of distinct labelled fish: there are $\binom NM$ possible hauls. To obtain exactly $j$ trout, choose $j$ labels from the $K$ trout and $M-j$ from the $N-K$ carp, giving $\binom Kj\binom{N-K}{M-j}$ possibilities. Uniform <sampling without replacement> therefore gives the <hypergeometric distribution>
$$
\boxed{p_j=\frac{\binom Kj\binom{N-K}{M-j}}{\binom NM},
\quad\max(0,M-N+K)\leq j\leq\min(M,K).}
$$
Outside this integer range the <probability> is zero. If ordered catches were counted instead, every haul would have $M!$ orders and that factor would cancel from the <probability> ratio.

Here equal catchability means equal selection <probability> for each individual remaining fish. It does not <mean> that the two species have <probability> $1/2$ on each draw regardless of their populations. This interpretation is the one that yields the stated hypergeometric law.