 Hi, I'm Zor. Welcome to Unisor Education. I would like to talk today about mathematical expectation of the product of two random variables. Well, this lecture is part of the course of advanced mathematics presented on Unisor.com. I recommend you to watch this lecture from this website because it has notes, basically the same information which I am presenting as a lecture is in the notes, basically as a textbook. Well, besides, if you are on the website, there is a certain educational process, the functionality which you can actually engage in, which includes enrolling into the courses and taking exams, etc. And the site is free, by the way. So, expectation, mathematical expectation of the product of two random variables. Well, let me just upfront state something which we will discuss. Mathematical expectation of the product of two random variables is equal or not equal, that's a question mark, the product of their mathematical expectations. Well, first of all, let me just address this problem intuitively and then analogous to mathematical expectation of the sum of two random variables I will talk about. So, intuitively, what is mathematical expectation? Well, people view it as a point around which old values of the random variable are concentrated. So, if, let's say, mathematical expectation of the temperature of a healthy person is such and such, and then we measure temperature of 100 different people and all of them are healthy individuals, their temperature will be different, obviously, but very much close to this so-called normal temperature, which is actually a mathematical expectation, average, if you wish, of the temperature of a healthy body. Now, if you will take two different populations, let's say, in the United States of America and China, and you will measure the temperature here and there. Well, they are kind of different, right, different group of people, but I'm pretty sure that mathematical expectation of the product of our temperatures, temperature of one person from the United States times temperature one person in China, and we will take the mathematical expectation of these products. It will be the same as if we will just multiply separately the averages. So, that's intuitively. Now, I'm still thinking about this question mark. It's very, very important to understand that intuitive approach is not necessarily correct mathematically. But let's talk about some of two variables, some of two random variables. Now, with some of two random variables, we have already proven that this is true for any pair of random variables. And let me just very, very briefly explain again. I mean, you can always refer to the lecture where it's proven, but I will just repeat this particular proof because I do need it for the product. So, how can we actually prove this thing? Well, let's imagine that we have two different probability spaces. Q1, which is values x1, x2, etc., xm. And we have the random variable xi, which takes these values with corresponding probabilities. And then we have another probability space, which contains values y1, etc., yn. Different number, obviously, of elementary events with different measure allocated to each one, q1, qn. Well, obviously, sum of all p from 1 to n is equal to 1, and sum of all q from 1 to n is also equal to 1. So, we have these two random variables, which are defined on these probabilistic spaces. So, basically, you can just say, forget about probability spaces. You can say that these random variables take these values with these probabilities. Now, let's construct a new variable, which is called c plus zeta. Alright, the variable zeta, what values can it take? Well, it can take value, for instance, x1 plus y1. What will be the probability of this? Well, that's the probability of c taking the value x1 and probability of eta taking the value y1. So, let's call it r11. So, it's the probability of c taking the value xi and eta taking the value yj. And this I call rij. So, plus. Now, my c can take value x1 and eta can take value y2. And what's the probability of this? Well, according to my notation, it's r12, etc. The last value with xi equal to x1, the value will be yn and r1n. Then, my c can take value x2 and eta can take value y1. And probability will be r121. Also, x2y2 would be r22. And the last one in this row would be x2ynr2n+. So, what are we doing right now? We are summarizing values of this variable times the probability of that value. So, this is actually a mathematical expectation of this. That's what we are talking about right now. So, etc., etc., etc., it will be x3 plus whatever. And the last one will be xm plus y1, rm1 plus xm plus y2, rm2 plus etc., plus xmynrmn. So, that's my probability times value. And we add them all together. And that's how we form the expectation. But now, let's regroup this. Now, we will regroup it in this fashion. We will just open the parenthesis, right? And we will add together x1 times r11, r12, plus etc., plus r1n. Okay? Then x2 from here times r21, r22, plus r2n, etc., up to xm. m1, m2, mn. Now, let's think about what is this sum. This summarizes the probabilities of x1 taking value 1 in all these cases. And y and eta taking any basically value from y1 to 1, 2 to 1, n. So, we are summarizing events when x1 is fixed. That's the value of xi. And the value of eta is not really fixed. It's basically any, because we are summarizing throughout all the values of eta, which is basically from y1 to yn. Now, what is this probability? It's a probability of xi taking x1 and eta being any. We don't really care what value eta actually takes, right? Which means it's just the probability of x1 to be equal to p1. And this is correspondingly p2. And this is correspondingly with pm, right? That's what it is. Now, we'll continue. If we will continue, we will take y. y1 times r11 plus r12 plus, etc., plus r1n. No, I'm sorry. With y, we have to go down. Yes, with y, we have to go down. That means r11, r21, etc., plus rm1. Now, y2, y2, y2, y2. It's r12 plus r22 plus, etc., plus r2m2, etc. And finally, yn r1n plus r2n plus, etc., plus rmn. Now, what are these? Well, same thing. What is this probability? It's the probability of xi taking any value, either 1 or 2 or x1 or x2 or xm. Eta would be always equal to y1, which means what? So, we care about only the value of eta, which is equal to y1, and any value of x, and that is q1. This is q2. And the last one is qn. So, what do we have right now? We have this x1 times p1, x2 times p2, and xm times, etc., times, this is, etc., and the last one is xm times pm, which is expectation of, this part is expectation of xi, and this one is expectation of eta. So, as we see, with some of two random variables, we always have that the expectation of their sum is equal to sum of their expectations. So, why do I have some doubts about the product? Well, let's try to do the same thing with the product. So, what does it mean we have to do in this particular case? Well, if we will put product here, we have to put product here, and here, and here, and here, and here, and here, and here, and here, and here, and here. So, now you see it's not easy right now to construct something like this multiplied by this, right? Because in the first place, when it was a plus, we have just summarized basically, we opened the parenthesis and we have multiplied, right? With this, it's not that easy. So, what can we do about this? Well, let me again jump up to the very end of this lecture. This formula is actually correct, but only in case, only in case when our variables c and eta are independent. That's what's very, very important. And to go further, I would like actually to remind you what independence actually mean. Again, you can always refer to the lecture about independent random variables, but in particular, independence means that the probability, the probability, actually, I don't need this anymore. We know what we have to prove. Let's say probability of c is equal to x, i, and eta is equal to y, j, which I have actually suggested to write it as this one, equals to, it's a probability of the combined events. Now, if x, if c and eta take these values, x, i, and y, j independently, then we know that the probability of intersection of two events is actually equal to the product of their probability. So it's the probability of c equals to x, i times probability of eta equals to y, j, which is p, i times p, j, right? p, i is the probability of c is to be equal to x, y, and oh, I'm sorry, it's q, j. So that is a very, very important property of independent variables. It's basically a property of independent events. This being one event and this being another event. And combined events, if events are independent, the probability of the combination is equal to product of two probabilities. It's like probability of one die to fall on number two and another to fall on, let's say, number four. Well, it means the combination of two dies is two-four. And the probability of this is 136, obviously, right? Because there are 36 pairs. But at the same time, this 136 is equal to 16 times 16, which is probability of the first die to fall on the two and the second to fall on the four. So it's always like this for independent events. And that's what we are going to use in this particular case. So let's forget about this. This absolutely not working in case of a product of random variables. But we do have this. All the different X, I and Y, J are different values which our product can take. And R, I, J is the corresponding probability of this. But as we know here, every R, I, J is equal to P I times Q J for independent C and eta, independent random variables. So let's consider what happens if I will do this. Times is equal to X1 times P1 plus X2 times P2, etc. Plus Xm times Pm. That's the expectation, mathematical expectation of C times Y1 Q1 plus Y2 Q2 plus, etc. Yn Qn, right? Now, what if I will open the parenthesis and multiply this times this? Well, I will have X1 P1 times Y1 Q1, right? Plus X1 P1 times Y2 Q2 plus, etc. Then I will take X2 and multiply by each of them, etc., etc. So what will I get? I will basically get this, but instead of R, I will have X1 times Y1 P1 P1, right? This times this plus X1 P1 X1 Y2 P1 Q2, etc. And the last one would be X1 Yn P1 Qn plus. Then I will do the same thing with X2, with X3, etc. And I will finish with Xm times Y1 times Pm Q1 plus Xm Y2 Pm Q2. Plus, etc. Plus Xm Yn Pm Qn. So it's exactly the same as this one, except instead of R11, I have P1 Q1. Instead of R12, I have P1 Q2. But for independent variables, they are equal to each other. That's why I can say that this mathematical expectation of the product of two random variables is equal to the product of their mathematical expectation, in case they are independent and this relationship is true. So if this is true, this is the key, then both expressions are basically the same. Expression for mathematical expectation of the product of two random variables and the product of their mathematical expectations. So this is the key, independence. Well, so you see there is a significant difference between sum and the product of two random variables. In case of a sum, we have this unconditionally that expectation of the sum is equal to sum of expectations. In case of a product of two random variables, we have this only in case variables are independent from each other, which means their combined probability is equal to the product of their individual probabilities independent of each other. Well, that's basically it. I do suggest you to read the notes for this lecture. It's on Unisor.com as I said before. And I would like to encourage to go into the website and engage in the educational process, which means you will just go through the whole course, take all the tests, exams, whatever, and preferably do it under somebody's supervision, your parents or your teacher. That's it for today. Thank you very much and good luck.