 Hi, I'm Zor. Welcome to Unisor Education. We'll talk today about binomial distribution of probabilities. This lecture, as all others, is part of the advanced mathematics course for teenagers, which is presented on Unisor.com website. I do suggest you to watch this lecture from the website, because on the right side, from the video, there is a relatively detailed description of this lecture with notes, basically, comments, etc., etc. So it would be much, much better if you, basically, not only listen to the lecture, but also read the notes to this lecture, which are accompanying it on the website. Alright, so, back to probabilities, binomial distribution of probabilities. In one of the previous lectures, I have already described, basically, what binomial distribution of probabilities is. So let me just describe. Let's consider you have a certain number of Bernoulli trials, simultaneous Bernoulli trials. Bernoulli trial is the trial which has only two different results, success or failure. And there is a probability of success p, and the probability of failure is q, which is 1 minus phi. So this is Bernoulli trial, okay? This is Bernoulli. Now, if you imagine n simultaneously happening Bernoulli trials, out of this n, there are certain number of successes and certain number of failures, right? So we can always talk about the number of successes. So the number of successes is a random variable, which depends on two parameters, the number of Bernoulli experiments, and the probability of success of each. So if you consider this set of n simultaneously happening Bernoulli trials, which are completely independent of each other, then the number of successes is actually a random variable. So this random variable is actually defined as the binomial random variable. Now, let's just talk about what is our elementary events in this particular case, and then we will talk a little bit more about the binomial random variable. So if I conduct n Bernoulli experiments, what might be our elementary events? Well, it means that I have n success or failures, right? So you can describe the result of n Bernoulli experiments as a string, for instance, which contains letters s or f, s for success and f for failure. And each string of n characters, each character which is basically either s or f, s means success and f means failure, basically can represent an elementary event. This is the result of n Bernoulli experiments simultaneously conducted, all right? So this is the elementary event. Now, random variable, as we know, is a function on elementary events, right? So every elementary event is supposed to be corresponding to some numerical value. Now, what is numerical value in this particular case if strings of n characters s or f are our elementary events? Well, if I'm talking about a certain number of successes, then the number of letters s in this particular string is the value of the random variable which is binomially distributed, all right? That's basically the definition. We also can talk about a Bernoulli variable, let's call it beta, with a parameter p, all right? So this is a Bernoulli variable which is a random variable which takes either the value 1 in case of success or 0 in case of failure. This is just one Bernoulli variable. Now, this binomial variable which is the number of successes, I will use the letter c with two parameters again, n which is the length of the string and p which is the probability of each. What I would like to say is that the number of successes, number of s in each string actually is equal to beta i p sigma i n to n. Now, beta with the top index i is basically the result of my i's experiment out of n. Now, the p is the same p, it's probability of success. Each beta is either 1 or 0. It's 1 if the first experiment is the beta 1 p is 1 is the first experiment is successful or 0 if it's failure. Beta 2 p is again 1 or 0, etc. So if I will summarize these values, now the beta for the first experiments in this particular string would be 1, 0, 1, 0, 0, etc. So if I will add them up, I will get exactly the number of successes. So you can always say that the random variable which is distributed by binomial law of distribution of probabilities is a sum of n independent random variables. Each of them is a Bernoulli variable. So that's just another basically representation of binomial variable as the sum of n independent Bernoulli variables, random variables of course. So let's just remember the definition of the binomial distribution, the way how it's described as a string for instance, or any other set of successes and failures, and also that each binomial distribution which involves n experiments and Bernoulli trials with the probability of success p, sorry, it can be always represented as a sum of n independent Bernoulli variables with the same probability of success p. We will use this at the very end of the lecture. Alright, so we remember that. Now let's just describe, let's just consider a couple of examples actually. I think it's very good to exemplify. Now what if n is equal to 1? So I have only one Bernoulli trial and the number of successes which is c1p, right? p is the probability of success, 1 represents that we have only one Bernoulli trial. Now what is this? Well, it's either 1 or 0, right? Because we have only one experiment, either it's successful, in which case we have one success, or it's failure, in which case we have 0 successes. So this variable takes the value 1 and 0, with what probabilities? Now the probability is the probability of success, which is p. And the probability of this particular binomial variable to be equal to 0 is the probability that my experiment, one and only Bernoulli experiment will end up in failure, which is 1 minus p, which is q. So basically what I'm saying is that this variable is exactly the same as Bernoulli variable with the probability p. And it's obvious from the representation of the binomial variable as a sum of certain number of Bernoulli variables, where the number of Bernoulli variables in this sum is exactly the same as this parameter, which it depends on, which our binomial variable depends on, the number of Bernoulli experiments. So if it's 1, then this is 1. So they are obviously equal. So there is no distinguish, there is no difference basically between the binomial variable, which is defined for one and only Bernoulli trial with certain probability of success p. And the Bernoulli trial itself. I mean that's kind of obvious. Now a little bit more complexities. Just a little bit. Let's consider the case of n equals to 2. Now what kind of elementary events we can really think about if we are considering a pair of Bernoulli experiments? Well, it's either two successes or failure and success or success and failure on failure and failure. So we have now instead of two different results, we have four. Two different for n is equal to one, failure or success. But for n is equal to two, when we have two experiments, Bernoulli trials, we have four different versions, right? So what would be the value of, no this is 2 now, 2 comma p of this. Well if I have two successes in a row, that means that my number of successes is equal to 2, right? Now the value of, in this case I have only one success. And in this case I have only one success. And in this case I have zero successes. So my binomial random variable with the first parameter 2, which means it's for two different independent Bernoulli experiments, has three different values. Two, one and zero. Now what's the probabilities? Okay, the probability of success and success. Now we are talking about two independent random experiments. I know that the probability of success in the first one is p, and the probability of the second is also p, and they are independent. And as you remember the probability of simultaneously happening two different independent events, independence is very important. If you don't remember this, I would suggest you to go to the lecture about independent events, which is in this course. Then the probability is equal to the product of their probabilities. Now the probability of success and success is equal to the probability of success times probability of success, which is p squared. The probability of success is p, so it's p squared. So the probability is equal to p squared. Probability of this, I have one failure and one success. This is with the probability q, and this is with probability p, so it's qp. And again, experiments are independent, and that's why the probability of the combination of two events is the product of their probabilities. Now in this case, I have first success and then the failure. The probability of success is p, probability of failure is q, of course. And finally I have two failures. Now these are probabilities associated with elementary events. Now just in case, let's just check out that the sum of all probabilities is equal to one, right? p squared plus pq, it's 2pq, plus q squared, which is p plus q squared, which is one, right? So everything is fine. Now we know how our probabilities are distributed among elementary events. Now let's talk about our random variable. What's the probability of our random variable to take different values? There are only three values, 2, 1 and 0. So the probability of our random variable to take the value of 2 is equal to p squared. Probability of our random variable to take the value of 1 is this one and this one. So in two different elementary events, the probability is equal to pq. So if I would like to know what's the probability of my random variable to take the value of 1, that's sum of this probability and this is like measure, right? This is, well, it weighs actually a certain amount and this weighs a certain amount, so the combination weighs the sum of these two. So it's 2pq. And finally, the probability of random variable to take value of 0 is only one q squared. Now let's think about graphical representation of the distribution of probabilities. It's really very educational. The way we usually do it is if I have a certain number of values our random variable takes, not necessarily it's the values 1, 2, 3, 4, it may be x1, x2, x3, x4, etc. I symbolically put them into this particular. So this represents the value of x1, this represents x2, x3, etc. So the different values our random variable can take. Now here I will have a rectangle which has the height equal to the probability of the corresponding number. So if n is equal to 1, I have only two values, 0 and 1, right? And 0 is q and 1 is p, right? So let's assume that we are talking about variable this, where probability of success and failure are the same. This is actually a perfect coin tossing, right? One experiment and the probability of success is one half. So if I would like to graphically represent the distribution of probabilities for this particular variable, well it takes either value of 0 or 1 and each one is the probability of one half. So I have one rectangle and the same another rectangle. Now if I'm talking about two one half, so I have two different Bernoulli trials and again each one for instance has a probability of success of one half. How would that be described graphically? Well p is one half, so p square is one quarter, right? So my first probability is one quarter. The probability of having one is 2pq, p is one half, q is one half, so 2 times one half times one half is one half, so it's somewhere here. And finally this one is one quarter as well. So I have three different variables, 0, 1 and 2, and the graphical representation is this, right? Okay, one more example, n is equal to 3. Well here we have a little bit more elementary events. Now what are they? Well s, s, s, 3 successes, right? s, f, s, s, f, s, f, f. So that's all 4 with the first success and now with the first failure would be the same. 8. So 8 different elements, 8 different elementary events are possible when we are dealing with 3 Bernoulli trials. Now what's their probabilities? Okay, the probability of this is p cube. Probability of this is p square q, right? p times p times p, p times q times p, p square q, p q square q, p square q, p, q square p and q cube, right? So since the probability of failure is q and probability of success is p is p and the probability of 3 of them one after another is basically the corresponding, the product of corresponding p's or q's depending on what letter this is. p for s and q for f. So these are possible elementary values. Now, okay, now what are the possible values of our random variable c3p, which is a binomial variable with 3 Bernoulli trials and probability of success p? Yeah, go remember this. Okay, in this case our random variable is equal to success, success, success. So number of successes is 3. 2, 2, 1, 2, 2, no, sorry, 1, 1, 1, 0. Right? Right. Okay, now let's talk about distribution of probabilities of the values of this random variable. So what's the probability of it to take the value 3? Well, we have only one elementary event and this probability is p cube, so the probability is equal to p cube. Now, what's the probability to take the value of 2? We have this, this and this. We have three different tools, right? p square q, p square q and p square q. So it's 3 p square q. What's the probability of taking the value of 1? It's this one, this one and this one. Also, three of them and each one is p cube square. So it's 3 p cube square. And finally, what's the probability to take the value of 0? Only one of them is q cube. Again, let's check it out. Some of these probabilities must be equal to 1, right? So p cube plus 3 p square q plus 3 p cube square and q cube. Well, as everybody knows, some of these is this. Well, some of us remember it, like I do remember it. If you don't remember, just do exact calculation, just multiply p plus q by itself three times and you will have these members. And this is obviously is equal to 1. So our sum of probability is equal to 1. That's just for checking. So everything seems to be fine. Now let's talk about graphical distribution of this. Graphical representation of the distribution. And let's think about, again, p is equal to 1 half. So we are tossing three coins simultaneously, right? Now, what are the values? So the values are these. So let me just 1, 2, 3. Actually, we don't need any more. So this represents one way or another and the third one. Let's start from zero. It's q cube. Now q is also equal to 1 half, right? So it's 1 eighths. So this is 1. This is 1 half. This is 1 quarter. This is 1 eighths. So I have 1 eighth. This one is 3 times 1 eighth. So it's 3 eighths. It's somewhere here. This is the same. And this is q. 1 eighths again. Okay. I think we are completely prepared for general formula. So what's the general formula for any number of, any number n? So if I have this variable, which is representing the number of successes in n Bernoulli trials with the probability of success q, let's take the probability of this to be equal to k. What is this? Well, remember back to string representation of elementary events, right? So we are talking about all elementary events which have k letters s and n minus k, k of s and n minus k of f, right? So that's how we get s successes. Now each elementary event of this kind, so each set of n trials with n successes, with k successes and n minus k failures has the probability of p to the power of k and q to the power of n minus k, right? k successes, each one has a probability of p. They're all independent so it's multiplication and q failures and n minus k failures, which of them has the probability of q. So that's the probability of each elementary event of this kind, right? Now, question is now how many elementary events? Well, that's very easy to calculate. That's how many different strings of n characters s or f exist with exactly k letters s. Well, that's very simple. We already learned this and we solved this problem many times in combinatorics. It's number of combinations of n by k. So my total probability is number of combinations from n by k times p to the k times q to the n minus k. So that's the general formula of the probability of our random variable to take value of k, where k is anything, obviously, from 0 to n. Okay, now, let me remind you something. A long, long time ago, one of the first lectures dedicated to foundations of mathematics, I was talking about mathematical induction and I also proved the formula. This is called a Newton's binomial formula. And you recognize exactly the same expression here. And that's why this distribution is called binomial, because the probability of this random variable to take any particular value is actually part of the binomial formula of Newton. So this Newton's binomial formula is very much related to probabilities of this particular random variable, and that's why it's called binomial. Now, we have very little else to talk about as far as binomial distribution is. Basically, we know about the distribution. We know the probability of the binomial random variable to take any value. Now, obviously, we have to talk about numerical characteristics of this distribution, because the formula is kind of complex. It doesn't really very clearly tell you about this particular distribution. But we can always resort to numerical characteristics of any random variable like mean and variance and standard deviation, right? So what's the mean and variance and standard deviation of this particular variable? Well, here we have to remember the following. Remember in the beginning of this lecture, I actually indicated this, that any binomial random variable with parameters np is a sum of Bernoulli random variables with the same parameter p, as long as all these n Bernoulli variables are independent. Okay, that helps actually, because we know again from one of the theorems, which we already learned, that the mean variable of sum of two different variables is equal to sum of their means. Now, expected value or expectation or mean of the sum of two random variables equals to sum of their expectations and their means. Use this here. We know what is the expected value of any Bernoulli random variable with the parameter p. It's p. That's the previous lecture. The expectation of our binomial variable is equal to each one of them is p, so it's n times p. That's it. This is the expectation of our binomial variable. How about variance? Well, again, there was a theorem that variance of the sum of two random variable is equal to sum of their variables, of their variances, but only if they are independent. With expectation, it's always, but with variance, it's only if they are independent. We proved that. That's one of the previous lectures. Now, we know what is the variance of the Bernoulli variable. The variance is p times q. So, the variance of c and p is equal to n times p times q. Well, the q is 1 minus p. And obviously, the standard deviation, sigma of c and p is equal to square root of npq. Just by definition of the standard deviation. And that completes this lecture. I suggest you to read again the notes for this lecture on unizor.com. And well, basically that's it about binomial random variables. Thanks very much and good luck.