The next topic in probability and statistics that I want to discuss. Is permutations and combinations. And here we'll first look at basic definitions and then do some examples. Now, the section on permutations and combinations from the reference handbook, is shown here. And the definitions are that, first of all, a permutation is any ordered subset of size or length r of a set of n distinct objects. And the number of different permutations is given by this equation. Which we write as PNR is equal to n factorial divided by n minus r factorial. And this is sometimes written as NPR, like this. On the other hand a combination is an unordered subset of size or length r. Of a set of indistinct objects. And, the number of different possible combinations is given by C, N of R. Which is the number of permutations, divided by R factorial,or N factorial. Divided by R factorial, N minus R factorial. And this is sometimes written as either nCr or nr in this fashion here. To show this, let's do an example. Let's suppose that we have eight surveyors who are eligible for promotion. However, there are only three available promotion slots. How many different combinations of promoted surveyors are possible? Which of these alternatives? So, lets go through this logically. And lets suppose that the eight surveyors are labeled A B C D E F G H. So, we can start thinking of the number of ways that we can arrange any three of those in groups. So, they would be for example, A B C would be a combination. A B D etc. All the way up to the last one which is F G H. And overall, the number of combinations is given by a basic expression here. C(n, r) is n factorial, divided by r factorial, n minus r factorial. So, in this case we have n, the number of people is eight. And we're rearranging those into groups of three. So, r is equal to three. So that's equal to eight factorial, divided by three factorial, times five factorial. Which is, writing it out in all its detail, equal to that. Which is equal to 56. So, the answer is C. There are 56 possible combinations for promotion. Now to see how this arises, let's do a simpler case. Where we can count up all the individual possibilities. What if there were only three surveyors, and there were two possible slots? Or two possible ways to arrange them. Then, in that case, our three surveyors are labeled A, B, C. And you see there are only three different combinations of those that we can make. Either AB, AC or BC. So the answer is going to be three. Now, note that BA is not a separate combination. Because in this case there's a combination, the order doesn't matter. So AB and BA are not separate combinations. And there are only, in this case, three available, as here. Well, does the equation agree with that? So in this case, again the same general equation applies here for C and R. But now N is equal to three, and R is equal to two. So that is equal to the expression here. Which expanding it out is equal to that. And the answer is three. So indeed we can see that this is correct. What about though if we wanted to get the number of permutations? So now, the number of permutations, the order does matter. So AB and BA are now separate different permutations. And there are more possibilities available. So, in this case, you see we're going to have six possible permutations. And those are them right there. Does that agree with our equation? Well, now we have P(3,2) is 3 factorial divided by (3- 2) factorial is equal to that. which is equal to six. So, indeed, again that does work. This problem concerns a combination lock like this. And the combination lock consists of four numbers or digits, which range from zero to nine. They're integer numbers. And we're given that the numbers in the combination must increase from first to last. And each number can be used only once. How many different possible combinations are there out of these four alternatives? So, again, let's think about this logically. These are the ten digits, zero, one, two, three, up to nine. So, if we start thinking of the possible combinations, they look like this. The first one is zero, one, two, three, zero, one, two, four, etc. Up to the last one, which is going to be six, seven, eight, nine. And in this case then, zero, one, three, two, is not a possible combination. Because it doesn't increase in order. And zero one two two for example, is also not a possible combination. Because that uses the digit two twice. And we can only use them once. So again, this is a combination problem. The answer is C(n,r) is usual equation. And in this case we have N is equal to 10, there are 10 digits. And R is equal to four. There are four combinations in the final set. So, expanding that out, we have this number. And computing that, the answer is 210. So the answer is B. What if we had different rules though for this? Let's for example, say that the order doesn't matter. But again, the numbers can be used only once. So now the number possibilities is much more. Now we can have 0123 and now we can include 0132 in that, because we're using the numbers only once. But now the order doesn't matter. So we can rearrange the order of those numbers, and we have more possible permutations. So in this case, this is given by our permutation equation. PN of R, is N factorial over N minus R factorial. substituting in the numbers. Theen that's equal to ten factorial, divided by ten minus four factorial, or six factorial. Which is equal to this. And computing out the number. The answer is that there are 5,040 possible combinations, according to those rules. The normal way of setting up combination luck, of course. Would be that the order doesn't matter. And the numbers can be used more than once. That gives us a number, many more possibilities, starting from 00000 up to 001, etc. All the way up to the last one, which is 9,999. You can see then, that obviously the total number of combinations in that case Is equal to 10,000. And this concludes our discussion of permutations, and combinations.