 Hi, I'm Zor. Welcome to Unizor education. I would like to continue talking about random variables with geometric distribution. The previous lecture was basically about definition. What is the geometric distribution? And this one will be about the properties of this particular distribution. This lecture is part of the course of advanced mathematics for teenagers presented on Unizor.com website. And that's where I suggest you to watch this lecture from because besides the video presentation, the website contains the notes for the lecture, which are very useful. It's like a textbook, basically. So it's good for you to read the notes as well as listen to the lecture. Alright, so first of all, let me start from just reminding you a couple of points about geometric distribution, which I made the previous lecture. First of all, the definition. Now, the definition of the geometric distribution is following. For instance, you are making a Bernoulli trial and then another and then another. They are independent Bernoulli trials. The result of which is either failure or success. And the probability of success is is P. Probability of failure is obviously 1 minus P, which sometimes we are designated with a letter Q. So that's the sequence of independent Bernoulli trials. Now, what I'm interested in is the first time, the number of the Bernoulli trials, when I get the first time success. Well, maybe it's the first one. Immediately on the first trial, with the probability P, I will get success. But at the same time, there is a probability that the first time I will get the failure. And the probability of this will be 1 minus P. And then I will get success on the second time. So this is the probability of getting success in the second time. And on the third, it will be two failures. So this is number two, this is number three. Number one is just P. So these are probabilities of getting success in the first trial, in the second, or in the third, etc. And the geometric distribution is actually the distribution of probabilities among all the different numbers from 1 to infinity, where the probability of my random variable with geometric distribution with the probability of success on each Bernoulli trial, pi P. So the probability of this to be equal to k is equal to 1 minus P to the k minus 1. That's the probability of having k minus 1 failures before I get the first success on the case trial. And that will be the probability P. So these are different values. And the probabilities this random variable takes. So this is the part of the previous lecture. Now, this lecture, I will basically talk about properties of this particular distribution. Now, first of all, I would like to address it graphically. So the distribution can be very conveniently presented. If this is 1, this is 1, 2, 3, 0, 4, 5, etc. So my variable, my random variable takes values of 1, 2, 3, etc., etc. So the value of 1, it takes the probability of P. Well, let's say just for definitiveness, let's P be 1 half for instance. So I will build this rectangle which has the base 1 and has the height, the probability P. Next one would be 1 minus P to the first degree which is 1 half and 1 half it would be 1 quarter. This is 1 quarter. Next would be 1 eighth, then be the 1 sixteenth, etc. So this is the graphical representation of this probability distribution. And obviously you understand this is a geometric progression and that's why the whole distribution is called geometric. Alright, so we finished with graphical representation. Now, how about expectation, mean value of this particular variable? Well, let's just calculate. What is the expected value? What is the mean value of the random variable? Well, if random variable takes values with probabilities, then the expectation is actually a weighted average of its values where the weights are the probabilities. Well, I put, etc., just in case the number of values is not finite. Sometimes we are using the discrete distributions with finite number of values of the random variable. Like for instance, when you roll the dice, what's the number? It's from 1 to 6, right? But in this case, the numbers basically are not limited. So the probabilities are going down and down and down, exponentially down. But the numbers are actually going to infinity. So that's actually our case. So in our case, what can I say about our expected value? Well, expected value of our random variable is equal to weighted average of its values. Values are 1 with the probability of when k is equal to 1, that would be 1 minus p to the power of 0 times p plus. The value can be 2. k is going to be 2 with the probability 1 minus p to the first times p. The value can be 3 with the probability square times p, etc. The value can be k with probability 1 minus p to the k minus 1 p, etc. Well, do we know how to summarize this? It's not just a geometric regression, which we are summarizing, because these coefficients are actually 1, 2, 3. Without these coefficients, it would be geometric, right? Because if all of them would be equal to 1, without these 1, 2, 3, 4, etc. k, then I would have a sum of geometric progression with the geometric series. Now, how can I summarize this? We don't know the formula or anything like that. Okay, here is what I suggest. Let's call it S, all right, for simplicity. And I will use this notation, right? So let me put it this way. S divided by, you see, p is everywhere, is equal to 1, this is 1, plus 2 times q, this is the first time, the first power of 1, plus 3 times q squared, plus 4 times q cubed, plus, etc., plus k times q, k minus 1, plus, etc., right? It just looks better this way, all right? Now, to summarize it, I will do the following trick. I will multiply the whole thing by q. So S cubed divided by p is equal to, this multiplied by q would be cubed, this multiplied by q would be 2q squared, this multiplied by q would be 3q cubed. The previous one, which I multiplied with the power of k minus 2, and the coefficient, it was k minus 1, q k minus 2, right? That was the previous member to this. Now, if I will multiply it by q, I would get k minus 1, q k minus 1, minus, of course, plus, etc. Now, it goes to infinity. Now, what can we do about this? Well, this now is easier, because if I will subtract one from another, what happens? S divided by q times 1 minus 1 over p, right? That's on the left. No, S, sorry, wrong. S over p times 1 minus q. That would be on the left. Now, what would be on the right? I subtract from this, I subtract this. So, 1 is 1. From 2q, I subtract q, I will get q. From 3q square, I get 2q, q square, I get q square. From 4, I get minus 3, I get q cube, etc., etc. From this minus this, I will get q to the k minus 1, etc., up to infinity. And this is a pure geometric series, and we know that some of this, that's 1 over 1 minus q, right? Let me think about it. If x is equal 1 plus q square, sorry, plus q, plus q square, plus, etc., q times x is equal to q times q cube, sorry, square, plus q cube, plus, etc., minus. So, x times 1 minus q is equal to 1, and x is equal to 1 over 1 minus q. Yes, I was right. Okay, so again, I don't remember the formulas, I derived them. So, that's actually 8. I don't need anything more, because now I can find my S. S over p times 1 minus q. You see, if p plus q is equal to 1, q is equal to 1 minus p. So, this 1 minus q is equal to p. So, this is p, and this is p. So, it would be S times p divided by p. And what it's equal? 1 over 1 minus q is p. That's it, such a simple formula for expected value. So, we did have some tricky calculations, I should say. But in the end, it's just a simple formula, and we have found out that the mean value or expectation of the geometric random variable gamma p is equal to 1 over p. Okay. What's next? Next is variance, all right? Now, with variance, we do very similar thing actually. Variance of gamma over p is equal to, again, this is a weighted average of squares of the deviations from the expected value, right? So, my values are 1, 2, 3, 4, 5, etc. So, 1 minus 1 over p times the probability, the weight. Weight is 1 minus p to 0 times p plus. Next value is 2. Again, deviation, oh, square, I got square, deviation from the expected value square by probability plus 3 minus 1 over p square times 1 minus p square times p, etc. k minus 1 over p square 1 minus p, k minus 1 p, etc. Okay. Now, I'm not going to do the manipulations how to add up this thing. But basically, the idea is exactly the same as in this particular case. We just define some kind of a sum, then we put in parentheses. We can multiply it by something, subtract one series from another and eventually we come to a geometric progression. We just have to do it twice because it's square. So, I'm not going to do it. I will actually give you a creative answer. It would be great if you can derive yourself this particular formula and, well, if you can send it to me in an email or something like this, I'll put it on my website. But I do have a result already calculated. So, the variance is equal 1 minus p of, sorry. So, that's the answer. And as you see, it's relatively simple answer, alright, regardless of the fact that the formula is complex. And that's about it. Basically, the only thing which is remaining is the standard deviation. The standard deviation is square root of variance, which is square root of q over p. So, that's basically all the properties I wanted to present to you for this particular geometric distribution. The graphical form, its expectation, mean value, and the variance with the standard deviation. All these characteristics basically give you a sense of what exactly the geometric distribution is. I think very useful is graphical representation when I have this staircase going down geometrically. Now, as far as the calculations of expected value, mean, and standard deviation, well, it's useful to know, but basically I think it's secondary. More importantly is just to understand what exactly your distribution of probability is. By the way, if you will take a look at the expectation and variance, I would like to address these from some intuitive position. Is it intuitively right? Let's put it this way. But think about it. Now, obviously, the p, which is basically the probability of the success. Now, if probability p of the success is equal to 1, which means we always succeed, there are no failures, it means we should succeed in the first try always and the average would be obviously the first try. Success will be on the first try and the average should be equal to 1, right? So, indeed, if p is equal to 1, this is equal to 1, right? Now, if p is close to 0, it means success happens very rarely. Then, obviously, we should expect our first successful result to be further down the line. And the smaller the probability p, the further should be average number of tries until we will get the first success. That's kind of an intuitive understanding that this formula is correct. I mean, obviously, the same intuitive feeling would be 1 over p squared, for instance. It doesn't really matter. What matters is, is this actually corresponding to your intuition? And the answer is yes. There are some other formulas which also correspond to the same intuitive thinking, but the matter is that this corresponds and it does. Now, how about the variance? Well, the variance can be viewed in the following sense. The variance is equal to 1 over p squared minus 1 over p, right? 1 over p squared minus p over p squared, which is 1 over p. Now, don't forget that p is a probability, which means it's from 0 to 1. Now, how graphically these two things look? Well, these are both hyperbolas, right? In the first quadrant, this one is a little higher here and a little lower here. This one is the same, and at the point 1, 1, they coincide. So, if I'm considering only this particular interval from 0 to 1, what do we see as a difference between these two? So, from this graph, we should subtract this one. Well, obviously, this one is significantly higher, so it will be almost like infinity. But basically, it will go to infinity. At this point, the difference is 0, right? So, if I will draw the difference between these two things, the difference should be something like this. So, if p is close to 1, if it's equal to 1, actually, what happens in this case? Well, it means I always have a success. So, there is no deviation from the average. Average will be 1 because I will have a success in the first trial. And obviously, there is no deviation from this because it's always the same value. 1, 1, 1, no matter how many times I try, right? So, that's why my standard deviation, my variance would be equal to 0 if my probability p is equal to 1. Now, if probability is diminishing, if it goes down to 0, then not only my average goes to infinity, but also the distribution among that average also spreads around. This is not as obvious, but well, it is what it is. Basically, you can say that if your average goes to infinity, then the deviations from that average also increasing to infinity. Now, when I'm talking about infinity, you understand it's not a number. It's a tendency, so to speak, right? It's a process. So, if p goes down to 0, then the expected value, the mean, goes to infinity, which means it's increasing, unlimitedly increasing, as well as the variance around this particular average value, also increasing unlimitedly, unlimitedly. Anyway, that's it for today. Thanks very much. I do suggest you to review the notes for this lecture on unison.com. Well, thanks and good luck.