 Hi, I'm Zor. Welcome to Unizor education. I would like to present a couple of problems dedicated to binary distributions, binomial distributions, and as usually I do encourage you to try to solve these problems just by yourself. Look at the Unizor.com for this lecture and there are problems presented in the notes. With solutions, but don't really pay attention to solutions first. Just try to solve it yourself. And then obviously after that problems are really very simple, and then you can read whatever the note said or listen to this lecture. So a few problems related to binary distributions of probabilities. Okay, the first problem is we have certain binary experiments where the probability of success equals to 0.1. And we conduct 100 different experiments. So my first exercise, it's not really a problem. It's really like exercise related to the lecture which I made on binary distributions. So the first exercise which I would like actually to pay attention to is to evaluate the expectation and standard deviation of the random variable, which is the number of successes out of these 100. So again, we have 100 experiments. The probability of success in each of them is 0.1 and the random variable we are talking about is number of successes out of this 100. Can it be 0? Yes, obviously it can be 0 or it can be 100 or it can be anything. The question is what is the average, the mathematical expectation of this number? Well, as we know from the lecture which was about this binary distribution, the expectation equals to number of experiments times the probability of success in each one of them. So basically this is just an exercise in multiplication of these two numbers and obviously it's 10. Well, I mean, it's kind of reasonable to expect that if one tenth is the probability of success then out of 100 experiments on average you will get 10 successes. Okay. Now, what's the standard deviation? All right, now we know that variance is equal to n times p times 1 minus p and standard deviation is equal to square root of n times p times 1 minus p. Which in this particular case is square root of 100 times 0.1 times 0.9 which is 9 so square root is 3. This is 9 obviously. So that's it. I mean, it's a very simple exercise on the theoretical material which was describing the expectation and standard deviation of this distribution of this binary distribution which basically is at 100 experiments Bernoulli trials as we are saying. All right? Now, the second and the third exercises which I have are basically about the same thing. So I will leave the formulas in tech and now let me formulate the second problem. Let's consider there is a machine which is manufacturing some parts for the car for instance car parts. Now, we basically would like to evaluate the number of parts which we have to take for basically verification for checking how they are made. If we would like to collect out of this group of n parts which we select, we would like to make this n such a number that on average we will have d defective parts. If we know the probability of manufacturing a defective part as p. So again, we know how a machine is working. We know the quality of the machine and the quality of the machine we are measuring by the probability of having a defective part. Now, knowing this probability, I would like to know how many samples, how many parts I should take from the whatever was manufactured to collect on average d defective parts. Well, let's just think about it. Probability in this case. It's also a Bernoulli experiment and the meaning of this Bernoulli experiment is whether the part which we are selecting is defective or not. And defective probability is p. So if we choose n parts for verification, for checking the quality and the probability of defective one is p, then the average number of defective parts out of n will be calculated using this formula, right? But in this case, we know how much on average we would like to have. We would like to have d number of defective parts. And the question is what should n be? Well, again, if n times p is equal to d in this particular case, so we know that on average we would like to get d defective parts. Then obviously all we have to do is solve this for n and n is equal to d divided by p. So if you would like, for instance, in the previous case we have 0.1 percent, 0.1 probability of having a defective part, which is actually a very bad quality. It means 10 percent of the entire parts is going to be defective. So that's very bad actually. But in any case, if I would like to on average get, for instance, 5 defective parts out of group, question is how big is the group, the group should be 50. 5 divided by 0.1. So I have to take 50 parts and on average, out of each 50, I will get 5 defective. So that's the second problem. This is basically the formula which I would like to use in this particular case to determine number of parts which I have to take or if you wish number of experiments, if I would like to have on average d defective part or d events, probability of which we know being SP. But this is rather unusual situation when we know the probability. This is really kind of strange. What is more practical problem is if we would like to evaluate the quality of the machine, what do we do? Well, we choose some kind of a n, a rather big number and we take the n parts as a sample and we verify each one of them. We check the quality of them and we find out that there is a d defective part out, defective parts out of this n. On average, which means we are repeating this group of n again and again and again and then we have different number of defective parts, but we can average it out and we will get that the average is d. And for instance, we do this rather big number of times. So d is a really good variation of our average. Question is what's the p? What's the probability of any particular part to be defective? Well, again, let's just use this formula and solve it for p. And again, that's kind of natural. If out of each group of, let's say, 100 parts you have 3 defective, well, it's a good on average. It's a good estimate that the probability of defective part is 300, 0.03. So that's my, again, third exercise. These are not really the problems. These are exercised in this formula that the number of, the average number or expectation of successes, if you know the number of experiments and you know the probability, then the average is equal to their product. All right. Now, now we have a little problem. It's really a very simple one, but here is how I would like to present it. Let's say you have two dice, normal, fair dice, six different numbers. Now, if I roll two dice, I consider if the sum is not equal to seven, it's a success. And if the sum equals to seven, it's a failure in one roll. Now, I'm a casino and I basically would like to invent a new game. So my new game is I take these rolls and I will roll it 10 times, roll two dice, a pair of dice, 10 times. Question is, how many successes and failures will be? So as a casino, I'm staging the following rule. If the number of failures is less than two, you win. Otherwise, house wins. So let's say the bet is one Bitcoin or whatever, pound sterling, dollar, whatever. So you put this one Bitcoin and then you roll a pair of dice 10 times. If the number of failures, which means number of cases when the sum of two numbers is equal to seven is less than two, which means zero or one, then you win. Otherwise, the house wins. So if you win, the house pays you one Bitcoin. If you lose, the house takes away the Bitcoin that you bet. That's the game. Question is, is it a good game for the house or for you for the same token? Well, basically it boils down to a variation of the probability of winning the game. So the probability of having either less than two or two or greater number of wins. And that would give you basically the base to evaluate whether the game is good for your bet or for a house. So let's evaluate this probability. Now, the first thing which we should determine is, since we are talking about number of failures, what's the probability of failure? So what's the probability of sum of two numbers and two dice to be equal to seven? That's the failure. So if the sum is equal to seven, that's a fail. So what's the probability of this failure? And then we can use whatever the logic we can to evaluate the number of failures out of 10 rolls. Okay. If you have a number seven as a sum, it can be accomplished in the following ways. One dice, one dies and one another is in six, or two and five, or three and four, or four and three, or five and two, or six and one, one two three four five six. So we have six different combinations of the numbers on two dice which result in seven as a sum. Now, how many combinations, if you have two dice, how many combinations of pairs of numbers? Well, six and one, six and another, so you have 36, right? So the probability of sum to be equal to seven, which is a failure actually, is equal to one two three four five six out of 36, which is one six. Okay, fine. So we have determined that the probability of failure is one six, which means that the probability of success is five six, right? Whatever adds it up to one. All right, fine. Now, we have to evaluate the case with 10 different times we roll, we make this experiment 10 times. The probability of failure and success in one particular experiment is one six and five six correspondingly. So question is, what's the probability to have less than two failures? Well, that means it's a probability to have number of failures to be equal to one, and probability of number of failures to be to be equal to zero and to one. So sum of these two is the probability of number of failures to be less than two, and that's the probability of winning, right? So this is the probability of winning. Well, let's count separately this and this. So what's the probability of have zero failures? Well, it means that 10 times in a row I succeed. So 10 times in a row, the probability of success is five six, and it should be multiplying one after another after another because this is the probability of a combined event, and all events are independent. So we're rolling the dice obviously independent to each other. And so the probability of this is equal to five six to the power of 10. 10 times we should succeed. So 10 times the probability of five six should be repeated. That's why we put five six in the tensed power. Now what's the probability of having one failure? Well, one failure can be on the first row, on the second row, on the third row, etc., etc., on the tenth row. These are all independent cases. So we have one out of ten. It can be number one, number two, number three, etc. And the probability of it is equal to one six, right? That's the probability of failure. Now all other nine cases should be success. So that's the probability. So we add them together and we get, I have this calculated, 0.4845. Now what does it mean? It means that the probability of winning is less than one half, which means that you will be more losing money than winning money. So basically it's a good game for the house, and well, and that concludes this particular lecture, these particular problems. That's it. Now back to Unizor.com. What I suggest you to do is to go to the site again, go to the notes for this lecture, examine all the problems, try again, repeat in your memory how to solve these problems, especially the last one. Now they're all very easy. The first three problems are just exercises in knowing the formula for average number of successes by normal distribution. And the fourth problem is just a little bit of combinatorics, if you wish. So again, try to refresh your memory, try to do it yourself. And well, if you sign as a student onto the website, onto Unizor.com, that would allow you to basically do the exams, and you can follow your progress, if you wish. Well, that's it for today. Thank you very much and good luck.