 Hi, I'm Zor. Welcome to Unisor Education. This is lecture number 6 in a group of lectures dedicated to easy probability problems. It's presented as part of the Advanced Mathematics Course for Teenagers on Unisor.com. I do suggest you to watch this lecture from this website because there are comments, notes actually, which state more or less the same thing which I'm talking about, but you can use it as a textbook, actually. And what's more important is the notes basically present you the problems, as I have listed here, and allow you to basically do it yourself. That's the purpose of the whole course, quite frankly. The theoretical concepts which I am explaining have only one purpose in this particular case, just to introduce you to mathematical concepts and language which are supposed to be used in solving problems. So solving problems is the goal. And that's why it's very important for you to try to do it yourself before listening to my lecture, and you might come up with a different solution, but in any case, that's the most important part of the whole course, not the theory which I'm explaining. The theory is just the language and the real purpose is to solve problems. So a couple of problems, not very difficult problems, but still kind of educational. And I told you before that probability actually, especially the probability in discrete cases, is very much based on combinatorics, which I definitely encourage you to be familiar with on a very good level. You can use the lectures in this course, which are preceding the probability, or from any other source. So I'm assuming that combinatorics is something which you know. Now, the problem number one. Okay, you have n balls in a box. They're all the same weight and the same size, so you cannot distinguish them by weight and size. And they are of n different colors, lowercase n. We have a1 of the color number one. We have a2 balls of color number two. And we have a n balls of color number n. So they're all in this box. Now, let's consider they're mixed together and we are randomly picking up m of these n balls. Now, when I'm talking about randomly, it means basically that every set of m balls out of n has exactly the same probability as any other set. So equal probabilities assumed is if the word random is used without any kind of explanation how random it is. I mean, random can be different obviously, but if I'm just saying random without anything, it means equal probabilities for all the outcomes. All right, so we pick m of them. Now, what I'm interested is what's the probability of having among these m number of balls of the color one equal to b1, number of balls of color number two to b2, etc., and number of balls of a color number n to be bn. So numbers b1, b2, bn are given. And obviously, their sum is supposed to be equal to number of balls, which I have picked from this box. And obviously, sum of these also equal to the number of balls. And so this is what's given in the box of different colors and sum of the numbers is supposed to be the total number of balls. Now, this is what we would like to have. We would like to know the probability of having exactly this. And obviously, they should be equal to number of balls I'm choosing. And obviously, again, any bi should be not greater than ai, because I cannot pick more balls of any color than it's given to me, right? So these are conditions. Now I have to determine this probability. All right, so let's assume, as usually, a very theoretical approach to this. If I would like to know the probability of certain event, first of all, I have to think about my sample space. So what kind of elementary events exist? Now, if I know the number of these events, I can assign the probability of each one of them since we're talking about random distribution without any specification, it means that every outcome has the same probability as any other outcome. And then all I have to know, basically, is to count how many elementary events comprise this event, which I'm talking about. Let's start from the beginning. What are elementary events? Basically, any group of m balls which I pick from the n is an elementary event, right? So the total number of elementary event is number of combinations from n by n. Now that's where your knowledge of combinatorics comes handy. So number of combinations, which is n factorial divided by m factorial and n minus m factorial, that's the number of different combinations of m balls out of n if we are choosing completely randomly these m balls. So this is supposed to be the denominator in my probability because 1 over this number is the probability of every elementary event. So if e is my elementary event, which is a certain number of balls, number is equal to m, but certain composition of balls, if this is the elementary event, its probability is equal to 1 over this, which is m factorial and n minus m factorial divided by m factorial. So that's basically the denominator. This is the denominator of this and the probability is 1 over it. That's the probability of each elementary event. Now let's talk about which elementary events are comprising the event which we are interested in. This is our event. So how many different combinations of m out of n balls satisfy this condition? Well, I have to pick exactly b1 combinations of the first color and how many times I can do this. How many different ways of doing this? Well, that's obviously number of combinations from a1 by b1. From the a1 balls of this color number 1, I have to pick b1. So this is number of choices which I can make. Now with each of them I have this number of choices for the second color. And with each of them I have for any other color up to the n's. And with each of these I can choose each of these, each of these and each of these which means I can put the multiplication. So this is the total number of different elementary events or if you wish different sets of m balls when b1 balls are of color 1, b2 balls of color 2 and bn balls of color n. So this is the number of events and I have to divide it by the total number of elementary events which is as we were talking about before, is this one. And that's the answer. And of course you can convert it into factorials if you want etc. But that's not the interesting part of it. What's interesting is this is number of all events and that's why 1 over this is the probability of one event. This is the number of elementary events which comprise our event which we are interested in. And that's why this is basically the probability which we are adding together all the different probabilities for all the different events, elementary events which comprise our event. Alright, that's it. Now the second problem, well it looks very much the same but it's actually a completely different problem. So I actually would like to model this as a pinball machine. Remember, in a good old childhood we had a board like this and you have some kind of a spring loaded launcher here. And there are pins here and there are different holes or whatever you call here. Now you launch the ball from here, it goes all the way and then goes randomly and falls in one of the holes. So that's the game I'm talking about. Now there is no other controls just by this particular spring loaded launcher. So you just load the ball, shoot it and then it falls in one of these holes. Now let's assume that there are M holes here. And let's assume you have M balls which you launch one after another. Now what I'm interested in is assuming that the probability to hit any one of these holes is the same. So all these pins are really very randomly distributing the balls among these holes. Again, very randomly what I mean is that the probability of any ball to hit one of these is exactly the same as to hit another. So they have M different results of our outcome and the probability of each is 1 over M. Now the question is considering I have a certain random variable which can take the values, actually it's a set of random variables. Each random variable is the number of balls which appear in each of these holes. Now if I have M balls, then either all of them can go into one particular hole. I mean there is a non equal to zero probability of that, right? Or another, or they can be distributed evenly or not evenly or whatever it is. So I'm interested in the distribution of balls of M balls among M holes. Now how can I basically mathematically express what I want? Well, very easily. I want the probability of half K1 balls in hole number one, K2 balls in hole number two, etc. and KM balls in hole number M. That's what I'm interested in. I want this probability. Now if I know this probability for any K1, K2, KM, I'm happy. That's exactly what I need. I can then calculate what's the probability for instance of all the balls going into one particular hole and nothing into another. Yeah, I can calculate it. I put this is equal to N and this is 0, 0, 0, 0, right? Or if I'm interested for instance in 2, 2, 2, 2 and the rest, whatever the very last one is, M minus 1 times 2 and then everything else goes to the last one. Again, I can basically calculate this, assigning this as 2, 2, 2, 2, 2 and the KM to be N minus sum of these, right? So I can always do that. Now what's my conditions? Now obviously each one of them is from 0 to N and also their sum should be equal to N. If these are number of balls in each of these holes, then their sum supposed to be equal to the number of balls which I have, right? From 1 to N. Well, that's the condition. That's the problem and let's just think about how to solve it. So we don't need this picture anymore. And let's again introduce the logic of theory of probabilities. What's my elementary events? What's my sample space? Well, let's just think about it. Obviously any particular distribution of balls among holes is an elementary event. Now the question is how many of these distributions are? And since I'm talking about completely random distribution, all of them have the same probability. All right? Well, that's actually very easy. I have N balls, right? N balls and I have M holes. Now how many different outcomes I can get for ball number one? Well, it can go into the first hole, second hole, etc., the M hole. So we have M different outcomes for the first ball. Now, how about the second? Well, exactly the same thing. And with each of the first, I can get each of the second. So I have M for the first ball, M for the second ball, etc., and M for the N's ball, which is M to the power of N. So M to the power of N is my overall number of outcomes of the distribution, actually, of the N balls among M holes, right? Change. Okay. So this is denominator, basically, in all the probabilities which I'm talking about, because one over M to the power of N is the probability of every elementary event. Okay. Now, that's the event which we are interested in. Question is, how many elementary events, how many individual distributions are comprising this event I'm interested in? Okay. Let's just think about it. I know that K1 balls are supposed to be in the first hole. Now, what kind of balls? Well, any K1 balls out of N can go there. So basically, I would like to know how many different choices of K1 balls can go into the first hole. Well, if my total is N, then it's a number of combinations from N to K1. That's the number of choices for the group of the balls which are in the first hole. Now, how about the second hole? Well, obviously, all other balls and how many of those other balls, N minus K1, right, can go into the all other holes. And I'm interested in the second hole to be K2 balls. So that's number of combinations from whatever is left after I have selected for the first hole, whatever is left. And I'm supposed to choose any K2 balls to go into the second hole. Now, what's the third one? N minus K1 minus K2 to K3, etc. And the last one would be N minus K1 minus K2 minus, etc. minus KN minus first. And this is KN. That's the product of different numbers of combinations. And that's what makes the number of elementary events, number of individual distributions of N balls among N holes. I'm sorry that's not supposed to be, I think it's supposed to be N, not N. We have only M holes, okay? So this is the total number of different distributions of N balls among M holes with K1 going into first hole, K2 to the second, etc., and KM to the M hole. That's the total number. And as I was talking before, that should be divided by the total number of all the different distributions, which is M to the power of N and as we were just talking about. So this is the answer. The only thing is it can actually be simplified, and let me just do it very quickly. I mean, this is the answer. You can leave it as this if you want to. But in theory, it can be simplified. And here is how. Now, N should be here, K1 should be here, and N-K1 should be here. That's the first member, right? The second member is N-K factorial divided by K2 factorial and N-K1-K2 factorial. Next one. N-K1-K2 factorial divided by K3 factorial and N-K1-K2-K3 factorial, etc. Now, look at this. This is cancelling out. This is cancelling out. So what's my last member? My last member would be N-K1-K2, etc.-KM-1 factorial divided by KM factorial and N-K1-K2, etc.-KM-1 minus KM factorial. That's my last member. And again, the top is cancelling with the previous member. So this is cancelling with the previous member. So what's left? I have this. I have this, this, this, and this, and this one. Now, what is this one? Remember, the sum of these K1, 2, 3, etc. M is exactly equal to M, because that's the distribution of N-members and both among M-holes. So this is zero. So zero factorial is one. So the total, the answer is N factorial divided by K1 factorial, K2 factorial, etc. KM factorial. That's the number of elementary events. And I have to divide it by M to the power of N if I want to get the probability. So this is the probability. It's a little bit easier formula than this one. And that's the end of this particular lecture. Well, first of all, I do suggest you to go to the website. The notes contain these problems with answers and with solutions. Again, if you didn't do it before, do it now. Solve these problems just by yourself. Don't look at the solutions and forget what I was just talking about during this lecture. Try to do it yourself in writing on a piece of paper and see if you get the correct answer. And in general, again, remember that my purpose, the purpose of this whole course actually is for you to solve all the different problems. Mathematics presents huge field of different problems. And forget about practical usefulness or non-usefulness of mathematics. That's not the purpose right now. This course, the purpose is to introduce you to this process of thinking creatively, to approach problems. Because if you know how to solve all these problems, it will be easier for you to solve practical problems, even absolutely not related to the math. Because your mind will be tuned to really like, okay, what if I do this? What if I do that? You have to look for a solution. You have to look for the way from point A to point B if there is no way. You don't know how to get from A to B. There is no formula. You have to really invent something. And this creativity is the most important part of all these lectures which I'm trying to introduce to you too. That's it. Thank you very much and good luck.