I'm reviewing some core statistics. I never had problems understanding this before but now I seem to get confused by questions which have $n$ items of which $n_1$ of of one kind, $n_2$ are of another etc. and we want a permutation or combination of $k$ of $n$.
In other words, a permutation of k of n is $\frac{n!}{(n-k)!}$ and a combination is $\frac{n!}{(n-k)!k!}$. However, how do I also factor in the fact that $n_1$ items are of one kind $n_2$ items are of another kind etc.? Logic tells me to divide by the permutation of the kinds: $\frac{\frac{n!}{(n-k)!}}{n_1!n_2!...n_m!}$ for $m$ groups. This does not work.
Let's say we have 9 books: 5 novels, 3 poems and 1 dictionary. How can we select 3 books.
- It is clear that a combination will be $_9C_3 = 84$.
- A permutation will be $_9P_3 = 504$.
But what about if we want express the idea that the permutation $N_1 N_2 D$ is identical to $N_2 N_1 D$? but not to $N_1 D N_2$? In other words, it's a permutation as far as different items go but a combination for items within the same kind.
Another example. Let's say we have 5 red and 2 blue balls and we want to get all the combinations of 2 balls. They are RR, BB, RB so 3. How do I calculate this using combinations? $_7C_2$ gives 21.
EDIT: Another one - 5 red, 3 blue, 1 green balls. RR, BB, RB, RG, BG so 5 combinations.