In this explainer, we will learn how to find the probability of an event by calculating the number of outcomes using permutation.
You should already know how to count the number of ordered arrangements of items and how to count the number of ordered arrangements of items chosen from a group of . We will briefly recap each of these situations with two examples.
As an example, consider a group of 5 friends: Anna, Billy, Charlie, Danny, and Emma. They belong to a club and want to choose a captain and a vice-captain. To do this fairly, they have put each of their names into a hat and will pull out one name to be the captain and then (without replacing the first name) will select a second name to be the vice-captain. How many possible outcomes are their for the choice of captain and vice-captain?
We know there are 5 possibilities for the first name which is drawn from the hat and 4 possibilities for the second name.
To find the total number of choices for the captain and vice-captain, we multiply these numbers together. To see why this works, you could represent each of the 5 friends by the first letter of their names (so A stands for Anna and B stands for Billy) and draw a tree diagram of the outcomes.
Hence, the number of outcomes is .
Notice that each outcome can be represented by a permutation.
A permutation is an ordering of items in a set.
Two permutations of the numbers 1, 2, 3, 4, 5, 6, 7, 8, and 9 are
Two 4-letter permutations of the letters A, B, C, D, E, and F are
In the example about choosing captains, each outcome is a 2-letter permutation of the letters A, B, C, D, and E. The permutation AB, which is also shown in the tree diagram, represents choosing Anna to be captain and Billy to be vice-captain. What we have shown is that the number of permutations of 2 letters chosen from a group of 5 letters is equal to .
For a second example, suppose there are 3 levels of prizes in a raffle: gold, silver, and bronze, but only one of each type of prize. The three prize winners are Mr. Sameh, Mr. Adam, and Mr. Maged and they will randomly choose which of the three prizes they will get. How many ways are there for the prizes to be assigned?
Note that each assignment of prizes can be represented as a permutation of the letters G, S, and B, where G stands for the gold prize, S for the silver, and B for the bronze. So, the permutation GSB means that Mr. Sameh gets the gold, Mr. Adam gets the silver, and Mr. Maged gets the bronze.
The total number of ways to assign the prizes is then the product of the number of choices for the first, second, and third letters, which is
In both these examples, our answer was a product of consecutive, decreasing integers. One way to record products like this is to use the factorial symbol.
Given a nonnegative integer , the factorial of is the product of and all the nonnegative integers less than . This can be written as .
We define .
We will briefly return to the first example: choosing a captain and a vice-captain from a group of 5 people. We found that the number of ordered choices of 2 people from a group of 5 was which we can write with the factorial notation as
Counting the Number of Ordered Arrangements of 𝑘 Items Chosen from a Group of 𝑛 Items
The number of ways to choose an ordered arrangement of objects from a group of objects is
In both of the above examples, we found that each outcome could be described by a permutation. This is because the order in which we selected the items mattered. In the first example, the outcome AB (Anna for captain and Billy for vice-captain) is different from the outcome BA. However, if we instead wanted to choose two vice-captains, then the outcome AB would be the same as the outcome BA because both outcomes result in Anna and Billy becoming vice-captains. Counting orderings of this type involves counting combinations, which we do not discuss further here.
Recall that when calculating the probability of an event, we need to calculate the total number of outcomes. Counting the number of outcomes often requires finding the number of permutations or combinations of a set of objects. We will look at some examples where the order of the objects matters, so we have to count permutations.
Example 1: Counting Outcomes When Order Matters and Repetition Is Not Allowed
A student ID number consists of 7 digits where each digit is a number from 0 to 9. Given that no digit can be repeated, find the probability that a randomly generated ID number is 7 651 932.
The probability that the ID number is 7 651 932 is because each ID number is a unique arrangement of 7 distinct digits from 0 to 9.
So, we have to count how many 7-digit ID numbers can be generated from the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 with no repeated digits.
There are 10 choices for the 1st digit, and each time we use a digit we cannot use it again, so the number of choices for each subsequent digit is reduced by 1 until there are only 4 choices for the 7th digit. The total number of ways of choosing a 7-digit ID in this way is obtained by finding the product of the number of choices for each digit, which is
Alternatively, we could observe that each student ID is a permutation of 7 digits chosen from a group of 10 digits. Since the number of permutations of objects chosen from a group of objects is equal to we can substitute the values for and to get that the number of ID numbers is
Finally, obtaining the ID 7 651 932 is one of 604 800 outcomes, so the probability is
Often, there is more than one arrangement that belongs to the event we are trying to calculate the probability of. So, we have to count more than one type of arrangement. The next two examples demonstrate this.
Example 2: Counting Outcomes
Eleven members of a marching band, two girls and nine boys, always line up in a row when they march. What is the probability that a girl will be at each end of the row if they line up in random order?
We need to find the probability that when the students line up in a random order the two girls are at either end of the line. Each of the possible orders that they line up in can be described as a permutation of the 11 students.
So, the probability is
First, we find the number of permutations starting and ending with a girl.
There are ways to order the girls (2 choices for the girl at the front and then 1 choice for the girl at the back). The number of ways to order the 9 boys in the middle is equal to (9 choices for the boy in the second position, 8 choices for the boy in the third position, and so on).
Hence, the total number of permutations starting and ending with a girl is
Next, we must count the total number of permutations of the 11 students. This is equal to .
Finally, we can state the probability of a random ordering having the girls at either end. This is
By expanding out the factorials and cancelling terms, we can simplify this expression as follows:
Example 3: Counting Outcomes
The letters E, R, R, R, and O are placed in a bag. Determine the probability of randomly selecting letters from the bag in an order that spells the word “ERROR”.
Since there are three copies of the letter R, we will denote them by , , and . Then, we have to find the probability that a permutation of the letters E, , , , and O spells the word ERROR.
There is more than one permutation that would achieve this, for example,
Notice that in each of these permutations there is exactly one position in which E can appear and exactly one position in which O can appear. So, there is only one choice for the positions of E and O and, therefore, to count the number of outcomes spelling ERROR, we have to count the number of ways that the s can be chosen.
To find the total number of permutations spelling ERROR, we have to find the total number of orders in which the three s can appear. This is equal to the number of permutations of , , and which is
Therefore, the probability of a random permutation being one of these is
The total number of permutations of these 5 letters is equal to
Hence, the probability of a random permutation spelling ERROR is
Once you are familiar with recognizing the situations where the number of outcomes is a permutation, you can simply state the formula to calculate the number of outcomes.
Example 4: Counting Outcomes
A number is formed at random using 2 distinct digits from the set . What is the probability that both the digits are odd?
The probability of forming two two-digit numbers from both odd digits is equal to
First, we calculate the total number of two-digit numbers that can be formed from the set of 4 numbers, without repeating digits.
Observe that the order in which we choose the digit matters; 29 is different from 92. Hence, each two-digit number is a permutation.
Since the number of permutations of numbers chosen from a group of numbers is equal to we can substitute the values for and to get that the number of distinct two-digit numbers is
Next, we note that there are two of these numbers which will have both digits odd: 59 and 95.
Hence, the probability that a random number chosen in this way has two odd digits is