 Hi, I'm Zor. Welcome to Unizor Education. We continue talking about distributions of random variables. This lecture is part of the Advanced Mathematics course for teenagers, for high school students primarily, which is presented on Unizor.com, and that's where I suggest you to watch this particular lecture because the site contains notes to this lecture, which basically is like a textbook. You can read it in parallel or just independently from listening to this lecture. And then there are certain exercises and exams actually on this website. So this is the source of all this entire course. Alright, so let's get back to distributions. We are talking about binary distributions in this lecture. And I will just devote some time defining what exactly we mean when we are talking about binary distributions. So this lecture is like an introduction, primarily the definitions of binary distributions. Now, as the name implies, binary distributions are related to certain things which have only two different possible values. Imagine the experiment which has only two results, like you toss the coin for instance, and it can be either heads or tails. So you have some experiment where the result is success or failure, or yes or no, or any other binary kind of an experiment. So all these binary distributions are related to experiments with just two different possible results. Now, the experiment can be a single experiment, or we can consider multiple experiments, each of them having these binary characteristics. So the single ones, the single experiment is usually called Bernoulli experiment, or Bernoulli trial. Bernoulli was a Swiss mathematician of 17th century, and he was the first actually who researched this type of probabilities and random distributions. So, we are talking about single experiment with two results, which we can conditionally call success or failure, and the results have certain probabilities. For instance, the results of success is p, and the probability of failure is equal to q, which is 1 minus p. So there are only two possibilities, and that's why this particular probability should be 1 minus p, so the sum of them is equal to 1, where p obviously is greater or equal to 0. Now, if it's let's say a coin tossing, then usually if it's an ideal coin, the probability p is equal to 1 half, and the probability q is 1 half. So 1 half is the probability of tails, and 1 half is the probability of heads. Now, what does it mean actually that the probability of success is equal to p of that particular experiment? Well, it means that if you will repeat this experiment again and again under exactly the same condition, and all our sequential experiments are exactly identical to each other and independent to each other, then if you have let's say n experiments conducted, then approximately the number of successes will be p times n, approximately. And the more experiments we conduct, so the larger the number n is, the closer let's say the number of successes divided by the number of experiments will be closer to p. And as the number of experiments goes to infinity, this ratio will be closer and closer to p. So the limit of this as the number of experiments goes to infinity should be equal to p. So that's what it means basically, that the probability is equal to p. Okay, so we are talking about Bernoulli experiment. Well, at the same time we can define a Bernoulli random variable, which basically is probably the simplest random variable, let's call it c. Now, the random variable you know is a numerical function defined on elementary events. We have two elementary events, success and failure, and we define the value of this random variable on one elementary event to be equal to one, and the probability is equal to p. And obviously the value of random variable on the failure, we define as being equal to zero. And the probability of our random variable to be equal to zero is q, which is equal to one minus p. So we can talk about Bernoulli trials or experiments, or we can talk about Bernoulli random variables, which has two different values with probabilities of p and q. Okay, now, as an example I was saying you can consider for instance coin tossing. What else? Well, if you will consider that the result of Bernoulli trial is trial number k is event k, which is either success or failure, right? Then we can have that c of this ek is equal to either one or zero, depending on what actually this elementary event is. If it's success it's one, if it's failure it's zero. But then if we conduct n experiments one after another under exactly the same conditions, what can we actually say about the probability? Well, let's do it this way. We will have the result of the first is one or zero. If I will add the result of the second, et cetera, and result of the ends is n. So these are either zeros or ones, right? So number of ones is number of successes. Now, that's why if you will have this sum and divide it by n, this would be a ratio of successes. And that's supposed to go to p as n goes to infinity, because that's the definition of the probability, right? So the sum of these values of our Bernoulli random variable on the elementary events, which are results of our experiments, is actually number of successes, because in success it's equal to one, in failure it's equal to zero. So forget about zeros, we don't really count them, and number of ones is exactly number of successes. So, and we know that number of successes divided by the number of experiments should go to p as the number of experiments goes to infinity. So that's another way to view, basically, the Bernoulli experiments and Bernoulli trials and this probability, which is actually the probability of success. Well, we will devote some time in the future to basically have some characteristics of this distribution, like its expectation, its standard deviation, et cetera. But that's not part of this lecture. In this lecture, I just wanted to define certain concepts. And the first concept which I wanted to define was a Bernoulli trial, Bernoulli random experiment and random variable, which has a Bernoulli distribution, which means it's equal to one or zero with probabilities of p and q correspondingly. OK, that's all about Bernoulli distribution as far as I wanted, basically, to define something about it. Now let's consider another one, which is very much related to this. Also binary, which means it's related to experiments with only two results. But in this case, instead of making one experiment, we are making certain number of experiments simultaneously. Or sequential, it doesn't really matter. Now, and what we are interested is how many, if we conduct, let's say, n experiments and Bernoulli experiments and Bernoulli trials. Now, some of the results are successes, some of them are failures. And let's say we have k successes. What are possible values of k? Well, it can be zero, for instance, if all n trials resulted in failure. Or it can be one or two or three. And the maximum is obviously n, when all n experiments ended up in success. So k can be considered as a random variable. So whenever we throw, let's say, n coins and we count how many heads are as a result of this experiment. It's one experiment with n coins simultaneously. So the number of heads is a random variable because it depends on the result of this experiment. Now, there are different elementary events which are the result of our n coins throwing. For instance, all of them are success or heads or all of them are tails or half of them tails and half of them are heads, etc. So these are all different elementary events. And on each elementary event, each result of the n Bernoulli trials, I can have a numerical function which is number of successes. This is exactly something which we called binomial distribution. So k is a random variable with binomial distribution. So that's the definition. So we have defined a combined experiment which consists of n different Bernoulli experiments, Bernoulli trials. And the number of successes among them is our new random variable which we defined in this particular way and its distribution we call binomial. Now what's interesting is what exactly is this distribution. So what is the probability of this random variable, which again I'm using the letter c, to have the value of k. So what is the probability of random variable which is equal to the number of successes to have a concrete value k which can be 0 or 1 or 2 or n. There are no more different values. So that's our task right now because to define the distribution of the random variable means that we have to know which value it takes and what's the probabilities of these values, right? In case of Bernoulli experiment and the random variable being basically the result of this experiment, success or failure and its value 1 or 0, we know actually from the definition of the Bernoulli experiment that the probability of it's equal to 1 is p and the probability of it's equal to 0 q which is 1 minus p. In this case if we have exactly the same Bernoulli trials but we simultaneously arrange n different trials which each of them is exactly the same as anything else as all others. They all are independent and they all have exactly the same probability of success but we conduct instead of one experiment n experiments simultaneously. And now we define our random variable as number of successes, right? So what is the distribution of this particular random variable? So for each k we have to calculate the probability. Now let's think about it. The easiest way is to calculate for instance the value of our random variable to be equal to 0. Now what does it mean? It means that we have result of all these n Bernoulli trials, failure, failure, failure, failure, right? Now they're all independent and we know that the probability of combination of the probabilities of n different events is the product of their corresponding probabilities. So the probability of our random variable which is the number of successes to be equal to 0 is the probability of the first experiment out of these n to be equal to, sorry, failure which is q and then the second one etc. and the nth one. So we have n different q's multiplied by each other and this is q to the n degree. Now what is the probability of our random variable to be equal to n? That means n successes and this is p and p etc. and p which is p to the n degree, right? So we have already calculated in simple cases. Now how about general case? Well this is actually a very easy combinatorial problem which we have already solved before when we were addressing all these combinatorics problems. Okay, so here is what it is. So we are trying to calculate the probability of number of successes to be equal to k. Well we have n experiments, right? Now some of them are successes and some of them are failures. So let's say these are successes, these are failures. Now if I know that the number of successes is equal to k, first of all I have to find out which experiments out of these n are successes and which are failures. Well obviously you have to have the number of combinations from n by k and this is basically the number of different ways our k successes are positioned within n experiments. It can be the first k or it can be the last k or it can be the first and then the third and the fourth and etc. So all the different combinations, how many times, how many different combinations of k elements we can extract from the group of n, this how many, which is actually n factorial divided by k factorial and a minus k factorial, right? This is the formula. So I hope you do remember the combinatorics because that was actually immediately before we started probabilities. Okay, so we know that this is the number of different choices of k successes to be chosen from n experiments. Now once any particular choice is made, so we marked k successes out of n experiments, concrete k successes. Now what's the probability of this one? Well, if there are k successes on the particular places, their probability is p to the power of k, right? Because they have to success, success, success. And all others, all other n minus k supposed to be failures, right? And again it's a combination so we have to multiply it. This is the probability of a concrete k successes and n minus k failures to be somehow, you know, after it's already positioned in this particular thing. So what's the probability of our random variable to be equal to exactly k number of successes? Well, that's this number, which shows how many times we can pick a concrete k successes out of n experiments, times this. So once we have chosen, that's what it is. So first, number of combinations of k successes out of n. And then for each particular combination, this is the probability of k successes and this is the probability of n minus k failures, which is exactly the same as 1 minus p and minus k, since q is 1 minus p. So this is the formula and as you understand, it depends on two parameters. So our distribution depends on two parameters. Number one, how many trials participate in the whole thing? This is n. And what's the probability p of a success in one particular trial? So when we are talking about binomial distribution, and that's exactly what is the definition of the binomial distribution, we are talking about the distribution which depends on the number of trials and the probability of success in each individual trial. So I just wanted to define these two different probabilistic distributions. Bernoulli for a single experiment with two results and binomial distribution, which is basically the combination. Now, what's interesting is that if you will define, now we have n Bernoulli trials, right? With each Bernoulli trial, we can associate a Bernoulli random variable, which is equal to 1 or 0. This probability is p or q is equal to 1 minus p. And i is an index of my experiment, i is 1, 2, etc., n. Now, we are talking about binomial distribution. Now, what is binomial distribution in this case? Let me use a different letter, see for binomial distribution. It's actually sum of all these Bernoulli distribution. So, binomial distribution with n different trials is the sum of Bernoulli distribution of each individual trial added together. Because this is actually the number of successes, right? Since xi is equal to either 1 for success or 0 for failure, then the total number of successes, which is actually how binomial distribution defined, right? This is this sum. So, this is a very important relationship between binomial distribution and Bernoulli distribution. So, binomial is basically a sum of Bernoulli distributions. And that's kind of obvious, because Bernoulli distribution is one trial. And binomial distribution is the number of successes in n trials. And obviously, the sum of 1s and 0s when success is 1 and failure is 0 represents exactly what we wanted. Alright, so this is something which I would consider to be a nice definition of these two binary distributions, Bernoulli and binomial. Again, obvious example is the coin tossing for Bernoulli distribution and n coins tossing simultaneously or sequentially. It doesn't matter tossing n coins and then count how many heads or how many tails we have. This is an example of binomial distribution. Now, next lectures will be devoted to basically some numerical characteristics like expectations, deviations, etc. Alright, so that's it for today. Thanks very much. Don't forget that Unisor.com contains all the comments, notes for this and all other lectures. And well, try to read it and I think it would be very beneficial actually if you would read it after you watched the lecture. That's it for today and thanks very much. Good luck!