 Assalamu alaikum. Welcome to lecture number 17 of the course on statistics and probability. You will recall that in the last lecture, we started the second part of the course and that is probability theory. In the last lecture, I reviewed with you the basic concepts of set theory and also, I conveyed to you a counting rule called the rule of multiplication which facilitates the solving of probabilistic problems. In today's lecture, we will continue with the counting rules and I will discuss with you permutations and combinations, after which we will proceed to the further concepts. Let us begin the discussion with the concept of permutations. As you now see on the screen, a permutation is any ordered subset from a set of n distinct objects. For example, if we have the set a b, then one permutation is a b and the other permutation is b a. The number of permutations of r objects selected in a definite order out of n distinct objects is denoted by the symbol n p r and it is given by n into n minus 1 into n minus 2 and so on up to n minus r plus 1. In short, we can say that n p r is equal to n factorial over n minus r factorial. Factorials is 7 into 6 into 5 into 4 into 3 into 2 into 1. Similarly, you can define 6 factorial, 5 factorial and so on. 1 factorial will obviously be equal to 1 and also we define 0 factorial as 1. Similarly, you can think of all the higher factorials for integers which are greater than 7. Let us consider an example to illustrate the concept of permutations. Suppose that we have a group of 4 persons and we would like to select out of them three persons in such a way that one is the president, one is the secretary and the third one the treasurer of a club. Now students, if you think about it logically, you can see that the post of the president is different from the post of the treasurer or the secretary and so this is the case of permutations and not of combinations which I will be discussing a short while later. If we go methodically, we see that the first position, the post of the president, we have four options. Of course, we are assuming that there is no personal judgment and we are all possible ways of selecting this committee of three persons. So, as I just said, the first post president, we have four options because we have four people and when we take one person as president, then the next post that is the secretary, we have three options out of the remaining three persons. When we take that too, then for the post of the treasurer, there are only two options. We will take one of the remaining two persons. According to the multiplication rule which I discussed with you last time, if there are four ways of filling the first post and three ways of filling the second and two ways of filling the third, the total number of ways in which this task can be accomplished is four into three into two and that is equal to 24. Students, the rule of permutations gives us exactly the same answer and in a very convenient manner. As I discussed with you a few minutes ago, NPR, the total number of permutations of N objects or N elements taking R at a time is equal to N factorial over N minus R factorial. In this example, N is equal to four and R is equal to three. And if I substitute these values in this formula, then as you now see on the screen, the answer is four factorial over four minus three factorial and that is equal to four into three into two and that is 24. And if we want to see what these 24 possible ways are, a tree diagram is the most convenient way of representing this information. As you now see on the screen, if we have a tree diagram in such a way that the first four branches represent the president, the next 12 represent the secretary and the next 24 for the treasurer, then the possible ways of selecting the committee are A, B, C, A, B, D, A, C, B, A, C, D, A, D, B, A, D, C and so on. The point to note is that a tree diagram gives us a very methodical way of representing the 24 possible situations. And this methodical way students, actually it is very important that you do practice with a number of questions so that you are able to understand the pattern in which this thing goes. So, if you do not do it methodically, then it is quite easy to get confused. But if you look at it carefully or practice a few questions, then you will see that it is not very difficult. It follows a pattern and you can proceed in that manner. The next thing to realize is that the formula that I just gave you, the special case of this formula is when R itself is equal to N. As you now see on the screen, in the formula of NPR putting R equal to N, we obtain NPN is equal to N into N minus 1 into N minus 2 and so on up to 3 into 2 into 1 and that is N factorial. That is the total number of permutations of N distinct objects taking all N at a time is equal to N factorial. Come, let us understand this formula through an interesting example. Suppose that there are three persons, yourself, your sister and your brother and you would like to have a photograph. But you are fighting that I have to sit on the chair of the beach and your brother says that I have to sit. So, if we see this through permutations, then N is equal to 3. You are three and there are three chairs and you want to, we would like to see how many different ways of seating arrangement for this photograph. According to the formula that I just presented to you, the total number of ways of permuting three objects or three individuals all at a time is equal to 3 factorial and 3 factorial is 3 into 2 into 1 and that is 6. So, what are the six photographs that are possible if the three people are Aisha Bashir and Dawood? The six photographs are Aisha Bashir Dawood, Aisha Dawood Bashir, Bashir Aisha Dawood, Bashir Dawood Aisha, Dawood Aisha Bashir and Dawood Bashir Aisha. I hope you follow the earlier point that I made that it is actually very systematic and you just have to go about it methodically. All the discussion that we have done up till now pertained to the case when we have N distinct objects under consideration. If we have a situation where some of the objects are not distinct, then the formula for permutations modifies in the manner that you now see on the screen. The number of permutations of N objects selected all at a time when N objects consist of N 1 of one kind, N 2 of a second kind and so on up to N k of a kth kind. This number is given by N factorial over N 1 factorial into N 2 factorial into so on up to N k factorial. Let us consider an example to illustrate the concept. Consider the word committee. This word spells C O double M I double T double E and you can notice that the three letters M, T and E are repeated. So, if I consider all these letters in this word as members of a set, then I can see easily that all the members of this set are not distinct. M is repeated, T is repeated and same for E. Now, if I would like to permute all these letters in order to form a vast number of words, some of which of course many of which will be meaningless. But if my purpose is such that the meaning does not matter, but I am interested in forming all possible words that I can, students I will be applying the formula that I just presented to you. As you now see on the screen in this example N is equal to 9 because the total number of letters in this word is 9. N 1 is equal to 1 because there is only 1 C and 2 is 1 because there is 1 O. N 3 is 2 because of 2 M's and 4 is 1 because of 1 I and 5 is 2 because of the fact that there are 2 T's and N 6 is equal to 2 because there are 2 E's. And if we substitute all these numbers in our formula for permutations, the total number of meaningless words from the word committee comes out to be 45360. That is 45360. This was the rule of permutations. As you have noted, any permutation is an ordered subset out of a set. The other rule is the rule of combinations or permutations or combinations in the combinations order does not matter. As you now see on the screen, a combination is any subset of R objects out of a set of N distinct objects and the R objects are selected in such a way that the order does not matter. The total number of such combinations is denoted by the symbol NCR or we write N and R in a bracket in such a way that N is written on the top and R is written on the bottom. The formula for the number of combinations of N things taking R at a time is given by N factorial over R factorial into N minus R factorial. It should be noted that NPR is equal to R factorial times NCR. In other words, every combination of R objects out of N objects generates R factorial permutations. This is quite an important point and if you understand it properly, this gives you a better insight regarding the difference between permutations and combinations and also regarding the relationship between the two. Let me explain this point with the help of an example. Suppose we have a group of three persons A, B and C. If we wish to select a group of two persons out of these three, the three possible groups will be A, B, A, C and B, C. In other words, the total number of combinations of size two out of this set of size three is three. If we apply the formula of NCR that is N factorial over R factorial into N minus R factorial, putting N is equal to three and R is equal to two, we get exactly the same result and that is three. It is just a group of two persons and so the order does not matter. But now suppose that we are interested in forming committees in such a way that one is the president and the other is the secretary. As you now see on the screen, if we want to do this kind of a job, then we can have six committees and they are A, B, B, A, A, C, C, A, B, C and C, B. In other words, the total number of permutations of two persons out of three is six. But the point to note is that each of the three combinations mentioned earlier generates two, in other words two factorial permutations. The combination A, B generates the permutations A, B and B, the combination A, C generates the permutations A, C and C, A and similarly the combination B, C generates the permutations B, C and C, B. So, this is the relationship that exists between the total number of combinations that you can have and the total number of permutations that you can have from one particular set and of a particular size that you select out of it. The example that we have just considered was a very small example. If you make it a little bigger and you consider the case where n is equal to 6 and r is equal to 3, then you will see that the number of combinations is 20, 6 factorial over 3 factorial into 6 minus 3 factorial. But if you want to know the number of permutations, then simply multiply this number 20 by r factorial and that is 3 factorial and that is 6 and we find that the number of permutations is 120 that is 6 into 20, 6 into the number of combinations. The quantity n, c, r is also called a binomial coefficient because of the fact that it appears in the binomial expansion of A plus B whole raise to n. As you may be already aware, A plus B whole raise to n can be written as sigma r goes from 0 to n, n, c, r, a raise to n minus r into b raise to r. The binomial coefficient has two important properties number 1, n, c, r is equal to n, c, n minus r and number 2, n, c, n minus r plus n, c, r is equal to n plus 1, c, r. I would like to encourage you to practice with these formulas up n or r for numerical values. Also, there are some other very useful formulas. It is to be noted that n, c, 0 is equal to 1 and so is n, c, n. Also, n, c, 1 is equal to n and n, c, n minus 1 is also equal to n. Let me illustrate the concept of combinations with the help of another example. As you now see on the screen, the question that in how many ways can a person draw a hand of five cards from a well shuffled ordinary deck of 52 cards? The answer to this question is also found by finding the combination, the all possible combinations of five cards out of 52 cards, which is given by 52 factorial over 5 factorial into 52 minus 5 and that is 47 factorial and this comes out to be equal to 2598960. In other words, 2,598,960 ways of drawing five cards out of 52. We have now reviewed the basic concepts of the various kinds of rules that enable us to solve a number of probabilistic problems in a convenient manner. Now that we have done this review, let us proceed to the basic concepts that lead to the formal definitions of probability. The first concept in this regard is that of a random experiment. Experiment ke lab se to haam sab vaakifi hain and if I were to put it formally, I would say that an experiment is a planned activity that generates a set of data. Any single performance of the experiment is called a trial and the result of the experiment is called an outcome. Ye to hua experiment likin main aap se kaha ke hamari liye jo pehla important concept hai that is random experiment. So what do I mean by random experiment? As you now see on the screen, an experiment which produces different results even though it is repeated a large number of times under essentially similar conditions, this is called a random experiment. The tossing of a fair coin, the throwing of a balanced die, the drawing of a card out of a deck of well-chaffled cards, these are all examples of random experiments. Isliye ke jo bunyadi kondition uski definition ki aap ke main present ki that it produces different results even if it is repeated a large number of times under essentially similar conditions. Ye kondition in tino examples mein aap dek saktein ke it is fulfilled. Dai ko aap baar baar phenkein aur ekhi tara set more or less aap phenkein, but sometimes you get a 1 and sometimes you get a 6. Similarly, for the drawing of the card or the tossing of a coin. Technically speaking a random experiment has three properties. Number one, the experiment can be repeated practically or theoretically any number of times. Number two, the experiment always has two or more possible outcomes. An experiment that has only one possible outcome that is not a random experiment and property number three is that the outcome of each repetition is unpredictable. It has some degree of uncertainty. Ye jo example mein aapko thorideh pehle dee, the tossing of a coin or a die or the drawing of a card out of a deck of cards. You know you can argue that these are not the kinds of situations that we are dealing with most of the time. So, let us consider a more realistic example. Consider the process of interviewing a person aap ek shaksko interview kar rahe hain aur aap sirf ekhi question pooch rahe hain and that is are you a smoker? Students aap realize karein ke even this little interview this can also be regarded as a random experiment because it fulfills the three properties that I just presented to you. The first one that it can be repeated any number of times? Well of course, in a large city like Lahore Karachi or Islamabad you can ask this question not twenty times not one hundred times, but thousands and thousands of times. This experiment can be repeated a very large number of times. The second point that the experiment has at least two possible outcomes. Well it is obvious jab aap interview karinge to aapko kamas kam do jab aap to definitely possible hain ke aapko milen. I am a smoker or I am not a smoker. And then of course you can have variations to this answer if he is a smoker, but he smokes only very seldom he can give you that information. But at least you have these two possible answers that I am a smoker or I am not a smoker. And the last point extremely important point that the outcome is unpredictable in advance. Jab tak aap usse interview kar nahi lete usse pehle you do not know what the what the answer is going to be. Is he going to tell you that he is a smoker or is he going to make a statement otherwise. So students this is an example which illustrates the fact that mathematical rigorous definitions like the one that I just presented they can also be applied in real life situations. And this is the crux of the matter and the heart of the subject of statistics as I have been conveying to you numerous times statistics after all is that mathematical size that enables you to draw conclusions about real life phenomena on the basis of evidence and data that you collect on sample basis. Closely related to the concept of the random experiment is the concept of the sample space. As you now see on the screen a set consisting of all possible outcomes that can result from a random experiment this can be defined as the sample space for the experiment and it is denoted by the letter S. Each possible outcome is a member of the sample space and it is called a sample point in that space. Let us consider a few very simple examples. Suppose we toss one single coin the sample space of this experiment will be the set head and tail and we assume that the coin is not going to stand on its edge or to roll away. So if it is going to land either head upward or tail upward then it is obvious that the set of all possible outcomes consist of only these two sample points. Now if we consider the case of tossing two coins simultaneously then of course the sample space will be a bit more complex and as you now see on the screen in this case the sample space will contain four sample points and these are head head, head tail, tail head and tail tail. Clearly S is the Cartesian product A cross A where A is the set head tail. If I toss one single dime the sample space will consist of six elements 1, 2, 3, 4, 5 and 6 but if I toss a pair of dice the sample space will consist of the Cartesian product A cross A where A is the set 1, 2, 3, 4, 5 and 6 and the Cartesian product A cross A will consist of 36 elements that you now see on the screen 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6 and so on. The next concept is that of events any subset of a sample space is an event. Now the subset can consist of just one sample point or it can be a combination of sample points and accordingly we have the distinction between what we call a simple event and the one that is called a compound event. For example, as you now see on the screen the occurrence of a six when a die is thrown is a simple event while the occurrence of a sum of 10 when a pair of dice is thrown is a compound event the reason being that it can be decomposed into three simple events 4, 6, 5, 5 and 6, 4. When we talk about the sum of 10 then these three outcomes form one set 4, 6, 5, 5 and 6, 4 as you can see the sum is 10 for any one of them and since this set consists of these three ordered pairs hence it is a compound event. Hence the next concept and a very important concept is the concept of the occurrence of an event in a real life situation when we are performing a random experiment. As you now see on the screen an event A is said to occur if and only if the outcome of the experiment corresponds to some element of A. For example, if we toss a die and we are interested in the occurrence of an even number if any of the three numbers 2, 4 or 6 occurs we say that the event of our interest has occurred. In this discussion students the point is that if we are talking about an even number then it is obvious that 2 or 4 or 6 if any of these numbers come then the even number occurs and it is obvious that when you toss a die then these three numbers do not occur at all. You will either get a 2 or a 4 or a 6. So, the point to understand is that when we represent an event by means of a set, we will write all the outcomes in that set 2, 4, 6 but when in reality you experiment then only one of the three or all of them will actually occur. If one of the three numbers occurs then we will say that the event of our interest has occurred. The next concept is that of the complementary event. As you now see on the screen the event not A is called the complementary event and it is denoted by A bar or AC. For example, if we toss a coin once then the complement of the event heads is tails and if we toss a coin 4 times then the complement of the event at least one head is the event no heads. The event at least one head of course contains the three ordered pairs head-head, head-tail and tail-head but the complementary event no heads is the fourth outcome of the sample space and that is tail-tail. I hope that it is clear to you that the complementary event and the original event they are disjoint and they do not overlap. Now, the next point to understand is that any set consisting of n elements has two raise to n possible subsets and so in the context of a sample space consisting of n sample points we can say that it produces two raise to n different subsets or in other words events some of which are simple, some are compound and also one of them is the null set. For example, if a sample space consists of three sample points A, B and C then there are two raise to three that is eight possible subsets and they are Phi, A, B, C, AB, AC, BC and ABC. The eight possible subsets him in me say 2 has to see interest the null set Phi represents the impossible event. The reason is that it does not contain any of the elements of the sample space and as I discussed a short while ago, a event to tub occur hotha hai jab uske andar jo sample points hoon me se koi occur kare to null set me jab koi sample point existinai karta to us hawaale se it represents the impossible event. The other set of particular interest is the sample space itself. As you saw in this example one of the subsets of the set ABC is the set ABC and students this set represents the short event. It is called a short event because obviously when we conduct the random experiment it is definitely short that one of the elements of the sample space is going to occur. Now that we have understood the basic concept of events, the next point that I would like to discuss with you at some length is the concept of the various types of events that we may encounter when we conduct a random experiment. These are the mutually exclusive events, exhaustive events and equally likely events. I will discuss them with you at length in the next lecture. At this point in time I will summarize the idea by giving you the very basic definitions of the three concepts. By mutually exclusive events students we mean those events which cannot occur at the same time. In other words they exclude each other. For example if I toss a die I will either get an odd number or an even number. It is not possible that I get an odd number and an even number at the same time. The other concept exhaustive events means that if we have two or more mutually exclusive events and if they are such that when we take their union we obtain the entire sample space these are called exhaustive events. In the example that I just gave you the event odd number and the event even number these are exhaustive because if I take the union of the two I obtain the entire sample space 1 3 5 2 4 6 or in other words 1 2 3 4 5 and 6. The last concept at this point is the concept of equally likely events. For example if I am tossing a coin which is perfect you know it is absolutely symmetric well made then it is obvious that we can say that when I will toss it the chances of getting a head are exactly the same as the chances of getting a tail. In other words head and tail are equally likely to occur. As I said earlier I will be discussing these concepts with you in a little bit of detail in the next lecture. In the meantime I hope that you will enjoy studying the basic concepts of probability and my best wishes to you. Until next time Allah Hafiz.