Suppose we have the natural numbers 1 to N and we pick n numbers at random ($n\leq N$) and suppose that we want there to be exactly m of the n numbers picked to be less than or equal to M ($M\leq m$ and $m\leq n$). (Note that we cannot pick the same number more than once - so it's without replacement).
How many ways are there of doing this? I got my answer as $$ \frac{M!}{(M-m)!} \cdot \frac{(N-M)!}{(N-M-n+m)!} \cdot \begin{pmatrix} n \\ m \end{pmatrix} .$$ Is this correct?
I got to this answer by saying that there are M choices for first number, then (M-1) for second number and ... (M-(m-1)) choices for the mth number. Meaning that for the (m+1)th number there are (N-M) choices.
Now there are $M(M-1)\ldots (M-m+1) \cdot (N-M)(N-M-1)\ldots (N-M-(n-m)+1) $ ways of doing this but of course we can distribute these choices in n choose m ways. Is this logic correct?