0
$\begingroup$

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?

  • 0
    I've changed it now.2017-01-31
  • 0
    Does order matter?2017-01-31
  • 0
    I don't think you need the first term - try it with pencil and paper with small values of n and m2017-01-31
  • 0
    In what sense of order?2017-01-31
  • 0
    I've just changed it slightly also.2017-01-31

1 Answers 1

0

Your answer is correct if order matters (i.e. if N=10, n=3, M=5 and m=1 you count 4,8,7 and 8,4,7 as different choices). If the final order doesn't matter (which I think would be more usual), you have to divide by $n!$.

Another way of seeing this is that it is $\binom Mm$ to choose the small numbers (unordered), times $\binom{N-M}{n-m}$ to choose the big numbers (still unordered), times $n!$ for the different orders if you want order to matter. This simplifies (using $\binom ab=\frac{a!}{b!(a-b)!}$) to the same as your answer.

  • 0
    The order does matter in the sense that $(1,2,1,1,1)$ for instance would not be classed as the same as $(2,1,1,1,1)$, it's like picking balls out of a hat with numbers on them, so it's picking distinct sequences really. So it's correct then?2017-01-31
  • 0
    @Ben yes, it's correct. You get the same final answer as me, the only difference is that you choose the ordering in three stages (first choose the small numbers in a particular order, then the large numbers in a particular order, then multiply by the number of ways to combine those orders), whereas I do that all at once at the end. Either approach works equally well.2017-01-31