 Hi, I'm Zor. Welcome to Unizor Education. Today we will continue talking about different distributions of probabilities. In particular, we will talk about geometric distribution. This lecture is part of the Advanced Mathematics course for teenagers, which you can find on unizor.com, all the lectures. I do suggest you to watch this lecture from this side, because it contains notes for each lecture, including this one, which basically serves as a textbook. You actually have both, the live presentation of the lecture and the textbook, which basically tells more or less the same thing, but it would be just very beneficial for you to use both sources. Alright, back to geometric distribution of probabilities. Now, we did discuss Bernoulli trials many times. These are the random experiments that have only two different results, success and failure. And the probability of success was p and probability of failure was q equals 1 minus p. Alright, in this particular lecture, we will talk about certain way of conducting these experiments. Let's assume that you are trying and trying and trying until the first time you succeed. Basically, that's the gods of the geometric distribution. So your experiment is a sequence of trials, at least, not at least, the very last one of these trials is a success, and all the previous are failures. So you are making an experiment again and again, the Bernoulli trial, until you succeed. So basically you can model this particular random experiment of trials until the first success as strings of characters which start with certain number of f's, which are signifying the failure, obviously, and end in success. So this is an elementary event which has the first success on the fourth place. Now, this is an elementary event which has a success on the first place. And this is an elementary event which contains K. Bernoulli trial until the first success comes in. Now, question is what is the geometric distribution? Well, geometric distribution of probabilities is basically a distribution of probabilities between these elementary events, or if you wish, you can connect with each elementary event a random variable which is equal to the length of the string. And that's actually a more customary way to do it. So basically the random variable is equal to 4 on this string, 1 on this string, and K on this string, and it has different values with different probabilities. So distribution of probabilities between the different values of this random variable, or if you wish, distribution of probabilities between these elementary events is called geometric. Okay, now, let's use the symbolics. Gamma with an index P is basically a random variable which is equal to length of a string, which we are talking about. So this is a random variable. It can have values of 1 if success comes from the first place, or any other integer number. Basically, it can have the value of any integer number. There is no upper boundary of this. Can it be a million? Well, it means that the previous, whatever, 999,999 trials were failures. And on the millions trial, we had a success. So that's possible. The probability of this probably is low, but it depends on the probabilities. So in any case, it is possible. All right, so that's basically an explanation of what the geometric distribution of probabilities is. It's either distribution between the probabilities of these events or distribution of the random variable defined on each of these elementary events as the lengths of the corresponding string. All right, let's get to some examples. Well, the first obvious example is a lottery. Well, everybody knows that on average, people lose in lottery. There are certain individuals who win, but most of the people are losing, and that's the purpose why our government actually arranges this lottery. It just earns money, basically, right? So that's something which statistically earns money. Is it possible for all people to win? Well, yes, but statistically considering the number of people playing, it's very, very low probability. So that's why we have this lottery. I mean, your inner voice actually tells you, hey, this is the losing game. And the more you win, the more you play, the more you lose, actually, right? So you kind of resist the temptation to play, but hey, I mean, you might win, right? So let's say you have made an agreement with your inner voice that you will play a certain number of times, and if you lose, you play a game until you win. The first time you win, you stop. That's it. So this is a typical example of this geometric distribution. So you are basically making a Bernoulli trials, which is participating in any single game, until you have the first success, the winning, right? Now, another example. Let's say a family wants to have a daughter. So they try and, well, all of a sudden it's a son. Well, they say, okay, we do want a daughter, so let's just try again. So they try again. Well, if it's a son, they try again until they have a daughter. So if the probability of having a daughter is greater than zero, then, well, eventually the daughter will be born, and that would be the end of this trial, this experiment. All right? So again, the Bernoulli trial is giving the birth of a child and that considered to be a success if it's a daughter and a failure if it's a son. So they are failing and failing and failing to give birth to a daughter until they succeed. That's also the geometric distribution. And the third example I wanted to actually talk about is, let's consider a student is supposed to pass certain tests. Now, the test contains certain number of questions and any random question is supposed to be picked by a student and answered. If he answers, fine. If he doesn't, he fails the test. Now, let's consider that student doesn't know all the answers to some of them only, which means that if he will get the lucky question, which he basically started before that and knew, he would pass the exam, he would win. And if the question is unknown to him, then he will fail the test. Now, what if we will assume for a second that the student between the tests doesn't study anymore? So his knowledge is fixed. So certain number of questions he knows, certain number he doesn't know, let's say it's 100 questions and he knows like 75 of them and 25 he doesn't know. So there is a certain probability of success, right? In this case, it's three quarters and he basically participates in this Bernoulli trials of passing the tests until the moment he passes. So he might have certain number of failures in the beginning and then there will be a success. So that's also an example of this particular geometric distribution. Alright, so let's talk about concrete mathematics right now. We have this case, the probability of success is p and probability of failure is q, which is 1 minus p. And we are talking about random variable gamma with an index p, which signifies the probability. And we know it can take values 1, 2, 3, 4, whatever. So what is the probability of this particular random variable to take the value k? Well, this random variable, as you remember, it's the length of an elementary event. So there is only one elementary event, which is f, f, f, s, k minus 1 f's and 1 s. This is elementary event, which has the length of k, which the length of this is number of experiments. It has fixed results in the first k minus 1 experiments, which are failures. And the case Bernoulli trial gives a success. So the probability of this elementary event is the probability of our random variable gamma to take the value of k. So what is this probability associated with this particular elementary event? Well, the probability of this is a combination of probabilities of the first event, first Bernoulli trial, let's call it beta 1, is equal to failure. And the second one equals to failure and etc. And the k minus 1 equals to failure. And the case Bernoulli trial equals a success. This is the probability we are looking for. Now, what's very important is all these Bernoulli experiments must be independent. Now, I probably didn't mention it before, didn't emphasize it before. It's very important. So we are talking about only independent trials. And whatever examples I gave before, like lottery or giving birth to a daughter or a test being taken by a student, these are examples of a sequence of Bernoulli experiments independent of each other. And in this particular case, we know that the probability of this combination of events is connected with n. So it's this event, and this event, and this event, and this event. If these events are independent and these beta are independent because each one of them is the result of a Bernoulli experiment, right? Then the probability of the combination of these is equal to the product of probabilities times probability of the second being f, et cetera, times the probability of k minus 1 equals f and probability of k is equals to s. And what is this? Well, the probability of Bernoulli experiment to be equal to f is q minus 1 minus p. And the probability of success is p. So the probability of our random variable gamma in index p equal to k is q, q, q, q or 1 minus p if you wish, 1 minus p to the power k minus 1 times p. So that's the probability of gamma taking a particular value k. So let's return to our example. Let's say the first example of the lottery when the winning is, let's say, 0.4. So what's the probability of our gamma p equals to 1? So on the first step we get a success. Well, obviously it must be 0.4, right? Because this is the first and only experiment which we are conducting and it's supposed to end up in success and the probability of success is 0.4. So you might have 0.4, right? Well, let's check it out, this formula. k is equal to 1, so k minus 1 is 0. 1 minus p to the power of 0 is 1 times p, which is 0.4, which is 0.4. So 1 minus 0.4, 1 minus 1 times 0.4. So that's indeed 0.4, right? Well, out of interest let's calculate the probability of winning on the third trial. So if we buy one ticket, failed, second ticket, failed, and the third ticket which we buy is a success. By the way, it's very important not three tickets together are bought simultaneously and we check some of them being a winning ticket. No, it's a sequence, really. The first should be failing, the second should be failing, and the third one is a success, the winning number. Well, according to this formula, that will be 1 minus 0.4, 3 minus 1 squared times 0.4, which is 0.6 squared, which is 0.36 times 0.4, it's 0.144. Alright, so with the probability of 1.44, your game will finish on the third trial. Okay, not at least on the third trial, but exactly on the third trial. You understand that? Because if we want to at least third trial, then we have to combine the first and the second and the third together. But we're talking about only on the third. Alright, now the only thing which is actually remaining is you know there is a necessary condition for any distribution of probabilities that the sum of all probabilities should be equal to 1, right? This is a necessary condition and let's just check it out, that in our case, this formula, that the probability of our random variable to be equal to k equals to 1 minus p to the power of k minus 1 times p. So this particular distribution of probabilities among all integer numbers k from 1 to infinity is indeed the sum of this, it is indeed equal to 1. Well, let's think about it. If we are summarizing this by k, now what is actually this? Well, you obviously recognize this as a sum of geometric progression, which is a geometric series. Now, you know the geometric series is a plus a r plus a r squared plus etcetera plus a r k plus etcetera. If r is less than 1, then this limit is not an infinity, it's a concrete limit and it's equal to something, s. Now, what is this s? I never remember the formulas, you know, so I would like to calculate it somehow, very simply. Well, very simply as this, s times r is equal to, I multiply each of them by r, right? So a times r is a r, a r times r is a r squared and you understand it goes to infinity and if I will subtract one from another, guess what? This will negate each other and I will have that s times 1 minus r equals a. So s is equal to a divided by 1 minus r. Alright, so very simply, we derived this formula, now let's use it. What's our first member, a? That's where the k is equal to 1, so this is equal to 1 minus p to the power of 0, which is 1, so my a is equal to p. And what's the multiplier? Well, multiplier is obviously 1 minus p. Multiplier or denominator sometimes it's called. Alright, so I'll substitute it here, s is equal to p divided by 1 minus 1 minus p, which is 1 minus 1 minus p is p, so it's p over p1. For p not equal to 0, obviously, we are not talking about the probabilities of equal to 0. Alright, so basically the sum of these probability distributions is equal to 1, this is a necessary condition, I just checked it just to verify the validity of our definition. I mean, we did some logical transformations, thinking, etc. and we derived this formula from some considerations. It's a very good idea to check it, and this is a necessary condition, it must be observed, and it is. Alright, anyway. Now, as I was saying, this is a geometric series, and well, obviously you understand now that the main geometric distribution of probabilities is exactly related to the fact that these probabilities represent the geometric progression. Obviously. Well, that's it. This is just the definition of this particular distribution of probabilities. Certain properties, like what's the expectation, mean value, what's the variance, we will discuss in the next lecture. And meanwhile, thank you very much and good luck.