# Combinations (Unordered Sampling Without Replacement)

An unordered set is a set where the order of the elements does not matter. Without replacement means that you can not pick the same element more than once.

Theory

### Combinations

When you draw $r$ elements from a set of $n$ elements, you call the number of possible distributions the combinations.

 $\left(\genfrac{}{}{0.0pt}{}{n}{r}\right)=nCr=\frac{n!}{r!\cdot \left(n-r\right)!}$

Note! The order does not matter!

Example 1

You’re planning on going to college after high school, and decided to apply to the University of California. The university has 1700 courses, and each student are assigned five courses at random each semester.

1.
In how many ways can you be given five courses in your first semester?
2.
Out of all the courses offered by the university, you’ve found 25 that you really like. What’s the probability that all of the five courses you’re given are among those?

1.
In this case the order does not matter, which means each distribution of courses is a combination. Then the number of ways your first semester can look like is given by $\begin{array}{llll}\hfill \left(\genfrac{}{}{0.0pt}{}{1700}{5}\right)& =1700C5\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\frac{1700!}{5!\cdot \left(1700-5\right)!}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =117\phantom{\rule{0.17em}{0ex}}626\phantom{\rule{0.17em}{0ex}}840\phantom{\rule{0.17em}{0ex}}087\phantom{\rule{0.17em}{0ex}}840.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$
2.
As the probability of getting each course is equal, you can use uniform probability. That gives you
 $25C5=51\phantom{\rule{0.17em}{0ex}}530$

different ways all your courses are among the courses you like. You found the total number of possible outcomes in Exercise 1. Then the probability of all the five courses being ones you like becomes

You could say that it’s a good idea to let the students choose their own courses, and not get an education based on the results of a lottery!

Example 2

In a class of 20 students, you’re picking 5 of them. There are 7 boys and 13 girls in the class.

1.
How many outcomes have three girls and two boys?
2.
What is the probability of the outcome consisting of one girl and four boys?

As we’re talking about the composition of groups, and not how they’re ordered, this is an unordered set.

1.
In this case you’re not interested in specific boys or girls, only that there are three girls and two boys. That means you have a case where the order does not matter, which tells you that each outcome is a combination. That makes the number of outcomes that have three boys and two girls $\begin{array}{llll}\hfill \left(\genfrac{}{}{0.0pt}{}{13}{3}\right)\cdot \left(\genfrac{}{}{0.0pt}{}{7}{2}\right)& =13C3\cdot 7C2\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\frac{13!}{3!\cdot \left(13-3\right)!}\cdot \frac{7!}{2!\cdot \left(7-2\right)!}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =6006.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$
2.
Since there’s an equally large probability of a random girl being chosen as a random boy being chosen, you can use uniform probability. The number of favorable outcomes becomes $\begin{array}{llll}\hfill 13C1\cdot 7C4& =\frac{13!}{1!\cdot \left(13-1\right)!}\cdot \frac{7!}{4!\cdot \left(7-4\right)!}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =13\cdot 35\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =455.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

The number of possible groups of five is

That makes the probability