What is the probability of choosing r objects from c different groups when there are m groups of n objects?

135 Views Asked by At

Suppose I have m groups of n objects each for a total of nm objects. I am going to choose r of these nm objects. I want to know what the probability is that my r objects come from c different groups. Currently, I am using the formula:

$$ P(c) = { { n \choose c} \over { nm \choose r} } F(r, c) $$

where:

$$ F(l, c) = \begin{cases} { n \choose l } & c = 1 \\ \sum \limits_{i = 1} ^{l - c + 1} { { n \choose i } F(r - i, c - 1) } \end{cases} $$

It seems to me that this works because it works when m = 7, n = 10, amd r = 20, since the probabilities add up to 1, but does it work in general and is there a simpler way?

1

There are 1 best solutions below

4
On BEST ANSWER

Edit: Due to Brian's comment, I corrected my answer.

Suppose we select $c$ groups, and index them $1$ throught $c$. Let $A_i$ be the collection of sets taken from these groups, of size $r$ not containing an element from the $i$-th group. Then we want to find: $$|A_1^C\cap\cdots\cap A_c^C|=|(A_1\cup\cdots\cup A_c)^C|=\binom{cn}{r}-|A_1\cup\cdots\cup A_c|$$ Next we note that for each $\emptyset\neq T\subseteq \{1,...,c\}$: $$ \left|\,\underset{i\in T}{{\bigcap}}\,A_i\right|=\binom{(c-|T|)n}{r} $$ (setting $\binom{s}{p}=0$ when $s<p$). Thus, using the inclusion-exclusion principle, and the fact that there are $\binom{c}{t}$ subsets of $\{1,...,c\}$ with $t$ elements: $$ |A_1\cup\cdots\cup A_c|=\sum_{\emptyset\neq T\subseteq \{1,...,c\}}{(-1)^{|T|-1}\left|\,\underset{i\in T}{{\bigcap}}\,A_i\right|}=\sum_{t=1}^c{(-1)^{t-1}\binom{c}{t}\binom{(c-t)n}{r}} $$ Plugging this result into our previous equation, we see that once we select $c$ groups, we have: $$ \binom{cn}{r}-\sum_{t=1}^c{(-1)^{t-1}\binom{c}{t}\binom{(c-t)n}{r}}=\sum_{t=0}^c{(-1)^{t}\binom{c}{t}\binom{(c-t)n}{r}} $$ ways to select $r$ elements so that an element is selected from each group. Thus, the probability is: $$ \frac{\binom{m}{c}}{\binom{mn}{r}}\sum_{t=0}^c{\left((-1)^{t}\binom{c}{t}\binom{(c-t)n}{r}\right)} $$