Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I a set with $n$ items, $k$ of which have a certain property($k\leq n$), and I choose $m$ items randomly from that set($m\leq n$), what is the distribution of the number of chosen items having that property? An item can only be chosen once.

I expect an answer in the form $\left( \begin{array}{c} f(k,n,m) \\ g(k,n,m) \end{array} \right)$, but I don't know $f(k,n,m)$ and $g(k,n,m)$.

share|cite|improve this question
up vote 2 down vote accepted

Begin by counting all samples of $m$ elements from the population of $n$; this can be done $n \choose m$ ways. Suppose exactly $l$ of the $k$ special items are chosen; let us enumerate the possibilities. There are $k\choose l$ ways to choose the special items and then $n-k\choose m -l$ ways to choose the non-special ones. Now divide; here we assume all samples are equiprobable. We get

$$P(\hbox{exactly $l$ special elements}) = {{k \choose l}{n - k\choose m -l}\over{n\choose m}}\qquad 1\le k \le m$$ This is called a hypergeometric distribution.

share|cite|improve this answer
Perfect, thanks! – JBSnorro Jul 2 '11 at 21:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.