Login
📚 Online Statistics Education
Chapters ▾
⇩ Download ▾

5.5 Permutations and Combinations

This section covers basic formulas for determining the number of various possible types of outcomes. The topics covered are: (1) counting the number of possible orders, (2) counting using the multiplication rule, (3) counting the number of permutations, and (4) counting the number of combinations.

Possible Orders

Photograph of three wrapped hard candies on a white plate — one red, one green, one yellow — the three pieces whose six possible pick-up orders the section enumerates.Suppose you had a plate with three pieces of candy on it: one green, one yellow, and one red. You are going to pick up these three pieces one at a time. The question is: In how many different orders can you pick up the pieces? Table 1 lists all the possible orders. There are two orders in which red is first: red, yellow, green and red, green, yellow. Similarly, there are two orders in which yellow is first and two orders in which green is first. This makes six possible orders in which the pieces can be picked up.

Table 1. Six Possible Orders.

Number First Second Third
1 red yellow green
2redgreenyellow
3yellowredgreen
4yellowgreenred
5greenredyellow
6greenyellowred

The formula for the number of orders is shown below.

Number of orders = n!

where n is the number of pieces to be picked up. The symbol "!" stands for factorial. Some examples are:

3! = 3 x 2 x 1 = 6
4! = 4 x 3 x 2 x 1 = 24
5! = 5 x 4 x 3 x 2 x 1 = 120

This means that if there were 5 pieces of candy to be picked up, they could be picked up in any of 5! = 120 orders.

Multiplication Rule

Imagine a small restaurant whose menu has 3 soups, 6 entrées, and 4 desserts. How many possible meals are there? The answer is calculated by multiplying the numbers to get 3 x 6 x 4 = 72. You can think of it as first there is a choice among 3 soups. Then, for each of these choices there is a choice among 6 entrées resulting in 3 x 6 = 18 possibilities. Then, for each of these 18 possibilities there are 4 possible desserts yielding 18 x 4 = 72 total possibilities.

Permutations

Suppose that there were four pieces of candy (red, yellow, green, and brown) and you were only going to pick up exactly two pieces. How many ways are there of picking up two pieces? Table 2 lists all the possibilities. The first choice can be any of the four colors. For each of these 4 first choices there are 3 second choices. Therefore there are 4 x 3 = 12 possibilities.

Table 2. Twelve Possible Orders.

Number First Second
1 red yellow
2redgreen
3redbrown
4yellowred
5yellowgreen
6yellowbrown
7greenred
8greenyellow
9greenbrown
10brownred
11brownyellow
12browngreen

More formally, this question is asking for the number of permutations of four things taken two at a time. The general formula is:

n P r = n ! ( n r ) !

where nPr is the number of permutations of n things taken r at a time. In other words, it is the number of ways r things can be selected from a group of n things. In this case,

4 P 2 = 4 ! ( 4 2 ) ! = 4 × 3 × 2 × 1 2 × 1 = 12

It is important to note that order counts in permutations. That is, choosing red and then yellow is counted separately from choosing yellow and then red. Therefore permutations refer to the number of ways of choosing rather than the number of possible outcomes. When order of choice is not considered, the formula for combinations is used.

Combinations

Now suppose that you were not concerned with the way the pieces of candy were chosen but only in the final choices. In other words, how many different combinations of two pieces could you end up with? In counting combinations, choosing red and then yellow is the same as choosing yellow and then red because in both cases you end up with one red piece and one yellow piece. Unlike permutations, order does not count. Table 3 is based on Table 2 but is modified so that repeated combinations are given an "x" instead of a number. For example, "yellow then red" has an "x" because the combination of red and yellow was already included as choice number 1. As you can see, there are six combinations of the three colors.

Table 3. Six Combinations.

Number First Second
1 red yellow
2redgreen
3redbrown
xyellowred
4yellowgreen
5yellowbrown
xgreenred
xgreenyellow
6greenbrown
xbrownred
xbrownyellow
xbrowngreen

where nCr is the number

of combinations for n things taken r at a time.

n C r = n ! ( n r ) ! r !

For our example,

4 C 2 = 4 ! ( 4 2 ) ! 2 ! = 4 × 3 × 2 × 1 ( 2 × 1 ) ( 2 × 1 ) = 6

which is consistent with Table 3.

As an example application, suppose there were six kinds of toppings that one could order for a pizza. How many combinations of exactly 3 toppings could be ordered? Here n = 6 since there are 6 toppings and r = 3 since we are taking 3 at a time. The formula is then:

6 C 3 = 6 ! ( 6 3 ) ! 3 ! = 6 × 5 × 4 × 3 × 2 × 1 ( 3 × 2 × 1 ) ( 3 × 2 × 1 ) = 20

Adapted from Online Statistics Education: A Multimedia Course of Study (onlinestatbook.com), Project Leader: David M. Lane, Rice University. Developed with NSF support. The original work is in the public domain; it is cited here at the authors' request. Changes were made: reformatted as an accessible XYZ web edition with native MathML. License: Public-Domain.