 I think we are now on the way to go up. So today we're going to learn the basic skills of how to solve bivariate distribution, where we have X and Y variable. And I call this session 6.1 because it's just an extension of the session we did on Saturday. So some of the things we did on Saturday, we're going to also use them today, but not everything because not all of it, but yeah, most of the concepts we used, we're still going to apply them today. I'm not going to ask you about question and answer. By the end of this session for now, you should be able to know how to calculate the expected value of an X and Y bivariate variable, or be able to calculate the variants, the covariance and how to describe the bivariate distribution. So when we work with bivariate distribution, there are other things that when you're working with univariate, you don't have to worry about. For example, like you need to know about the expected value, the law of expected value, because when you work with one univariate problem, it's easy to calculate the expected value and it's easy to also interpret that. The minute you have a bivariate variable and they ask you to calculate the expected value of X and Y, where they say you need to calculate the expected value of X plus Y, then you need to know how to solve that as well. So if A is a constant number, not a variable, the variable is like your X, Y and Z are your placeholders. So if A is any number, which will be a constant number, let's say a number like two, three, four, five, 20, 100,000, those are constant numbers. And X and Y are any random variables that we can assign. If we need to find the expected value of a constant, it will be the value of a constant. So the expected value of E of two. So if I need to find the expected value of two, it will still remain as two. If I need to find the expected value of two times X, then I must take out the constant and find the expected value of the variable. So that will be two times the expected value of X and you know how to find the expected value of a random variable, right? We know that the expected value of a random variable, we can write it as the sum of your X, your outcome times its corresponding probability. And you can apply that formula and answer the questions. If I have the expected value of a constant plus a variable, the answer will be, we need to split it into two. So this is the same as finding the expected value of a constant plus the expected value of a variable, which we know that the expected value of a constant is C. Therefore it will remain C and the expected value of a variable, you can find that. So it's the same as finding the expected value of three plus X. And that will be the same as three plus the expected value of X. Finding the expected value of a variable X plus variable Y, it will be the same as expected value of variable X plus the expected value of variable Y. I don't even have to explain further. The other rule or law that you also need to know is always remember when you calculate the variance, especially when you get the bivariance as well, the bivariant random variables. So in terms of the variance as well, if, sorry about that, if C is still our constant, so to calculate the variance of a constant, it will be equals to zero because there won't be any variance on that. So that variance will be equals to zero. So the same as if I need to find the variance of 100, it will be zero. If I need to find the variance of two, it will be zero. Finding the variance of a constant plus a variable will be the same as finding the variance of a variable. So if I have the variance of two plus X, and that will be the same as the variance of two plus the variance of X, which is the same as we know that two is a constant, it will be zero, which will just be the same as the variance of X. I need the variance of a constant times a variable. Now this one is little different to the expected value. So we need to take out the constant but square the answer. So for example, if I need to find the variance of three X, therefore is the same as three to the power of two times the variance of X, which will be three to the power of two is nine, variance of X. And that's how you will find the variance. And if you're going to find the variance of a bivariate variable and where we have X plus Y, the variance of X plus Y will be creating the variance of individual variable and adding them together. So the variance of X plus the variance of Y, and this is only applicable if and only if X and Y are independent. If they are not independent, therefore the variance of X plus Y will be the same as the variance of X plus the variance of Y plus two times the covariance of X and Y. So you need to make sure that X and Y are independent in order to use that formula. The variance of X plus the variance of Y plus two times the covariance of X and Y. And we're going to look at how do we calculate the covariance and real estate now. So this comes from one of your study guide. Let's see if we can apply the same knowledge that we just learned now. If X is any random variable, some of the following, some of the following identities are not true. So let's go with number eight. Without looking at the answers, because we need to determine whether the answer is true or false. So what is the expected value of the expected value of E times X plus two? We know from the previous section, the expected value of X plus two, two is a constant. I'm just gonna do one and then you guys do the rest. That will be the expected value of X plus the expected value of two, which is the same as the expected value of X plus two. Right? Remember the expected value of A constant is that constant. Do the variance plus two. What is the variance X plus two? How do you find that? If you want, I can go back one step, I can do this and I must just remove the animation. Just give me a second, go back. So remember, the variance of a constant plus an X is the same as the variance of X. And remember also, let's come back here. The variance of a constant, the expected value of a constant plus X is the same as the constant plus the expected value of a variance of the variable X. Okay, so number B, are you done? Number B is correct. Number B will be correct because yeah, we find in the variance of X plus the variance of a constant and we know that the variance of a constant is zero. So that will be zero variance of X and that is the true one. And the expected value of four X minus six, do you still remember? If it's the expected value of a constant multiplying the variance, the variable and what will be minus the expected value of a constant? I think it's correct. It is correct because when we find the expected value of a constant multiplying by the variance, we multiply with the constant and find the expected value of a variable minus the expected value of a constant and we know that the expected value of a constant is the same as the constant. So that is also correct. Number D, is that correct? And find the variance of four X minus six. Remember with the variance, you will have to multiply with the square of the constant and finding there the variance of a constant. It's equals to zero. The first part is right. I'm not sure about the plus 36. The plus 36 is the incorrect part because you will find the variance will be four square variance of X minus the variance of six and we know that the variance of zero is zero. So that will be 16 variance of X. So this one is incorrect. It's not true. And let's move on to the number E. Find the variance of minus four X plus six. Yes, that's correct. That's correct. Find the variance. That is not correct as well because this is minus four X squared. So we're going to square minus four squared. It's 16. Variance of X. Plus the variance of six which then it will be 16 variance of X and that is zero. So pay attention to that if you want. So D and E are the incorrect ones. Okay. Miss, also Elizabeth, why is E incorrect? Because the variance of a constant becomes a zero. Yeah. The minus. Minus 16. You need to square minus four. Oh, you square it. Oh, yes. Oh, yes. Okay. Yes, I see that. Minus four times minus four is six. It won't be a negative. Okay. You also need to know how to calculate the covariance which is the strength or the measure of strength of the relationship between the two variables, your X and Y, and you can use this formula to calculate. I'm not going to do an example or anything. When we do the example from the marginal probabilities and the joint probabilities, I'm going to show you how to use this formulas. So you will need to use the formula to calculate the strength of the relationship by using this formula as your covariance. So they mean one and the same thing. So this is the covariance. Covariance, you can write it in that manner. The first one is the longest method which says the sum of your observation minus the mean of that observation. So the mean of X, because you will create marginal probabilities and multiply it with Y. The outcome of Y minus its corresponding expected value times the corresponding probability of X and Y. And we're going to look at how do we get the probability how do we get the probability of X and Y which is your joint probabilities as well. And the second one is the more simplified formula which gives you the expected covariance by finding the sum of the sum of your X times Y times the probability of X and Y which is the probability of the joint minus the mean of X times the mean of Y. You can use either one of them. They will still give you the same answer. And this is how you will find the sample covariance which you don't have to worry too much about that formula as well. In terms of the covariance, so because it tells you about the strength of a relationship, if your covariance value is greater than zero, then it means it's got a positive relationship or it's positively correlated. If it's less than zero, which is in the negative, then it is negatively correlated or it has a negative relationship. And if it's equals to zero, therefore there is no relationship. And you can also use the strength in terms of whether is it a weak one or a strong one or a moderate one. But you don't have to worry too much about the rest. Okay, so now let's go into the joint probabilities. In the previous session that you attended, we were working with only one variable, the univariate, which is the X. Now we have X and Y. So in order for us to find the expected value, the joint marginal probabilities, the variance or calculate the probability of X plus Y or the expected value of X plus Y, we need to do certain things. The other thing you need to know and remember that the probabilities are lie between zero and one and the sum of all probabilities should always be equals to one. That is what you have learned from the last time. Let's look at this example. Sharon and Julius are sales reps at Cari dealership. Let's X denote the number of cars Sharon will sell in a month and let Y denote the number of cars Julius will sell in a month. An analysis of their past monthly performance has the following joint probabilities. And this is the joint probabilities that they gave us which is your contingency table which has your X values of Sharon at the top and on the left the Y values of Julius on the left-hand side. And they have zero, one, two cars and the probabilities that correspond to their joint probabilities as well. So in order to answer question relating to bivariate, you need to know one. The step one is to unpack the table and calculate the marginal probabilities. Marginal probabilities are like your totals. Yeah, totals. We call them marginal probabilities. In basic probability, we call them simple probabilities. They are one and the same thing. And to get them, you just add the rows. If it's for the columns, you just add the columns and create the totals. Those are your marginal probabilities. Okay, so we're going to do that. That's step number one and step number two. Then once we have the marginal probabilities, then we can calculate the expected value of X, the expected value of Y and we can also calculate the standard deviation of X and standard deviation of Y. And we can also calculate the covariance of X and Y because we cannot separate them. The covariance of X and Y and we need to find also, we can also move forward and calculate and find the probability distribution of X plus Y, which means recreate the table as an X plus Y table. So let's see how do we do that. So the first thing that we can do on this is to calculate the marginal probabilities. Like I said, marginal probabilities. So this side, we will do the probability of X. On this side, because X is at the top on the rows, we will add all of them and on this side, we're going to calculate the marginal probabilities of Y because we're going to add the rows. So let's add the columns first. 0.12 plus 0.21 plus 0.01 is 0.40, right? 2 plus 4 plus 4 is 10. K1 is 5. That is 0.50, 10, 0.10. And you can do the same with the Y column or Y row. Are we done? Yes. Okay, what is the, for zero? 0.60. 0.60. And for one? 0.30. 0.30. And the last one? 0.10. 0.10. So now we have the marginal probabilities and we can go and create the same discrete table, this discrete variable table that we learned on Saturday. So we can create the X and its corresponding probability on this side. So this is to answer number one, can do this, 0, 1, 2. So this is to answer number one. And we have 0.40, 0.50 and 0.10. And we can answer number two as well because number two says we need to find the marginal probability. So we do the same, 0, 1, 2. And this is our Y and this is the probability of Y. And we found that it's 0.60, 0.30 and 0.10. Can you see how easy it is? Now we do have the marginal probabilities, we can calculate number three says calculate the mean and the standard deviation. I'm gonna go and do one, you can do the Y on your own. So let's do the X. So I'll do X. So number three, right? We need to find the expected value which is the sum of your X times your probability X times the probability of X. Now we do have that which is zero times 0.4 plus one times 0.5 plus two times 0.1 0.1, which is 0 plus 0 plus 0.5 plus 0.20, which then is equals to 0.25. So I do have my expected range. So you can go, that would be your homework, you can do it outside of this. You can go and calculate your expected value. Oh, you can do it now, but we're gonna run out of time. I'm gonna give you, oh, it's still three. I'm gonna give you time to do that. It's fine, we'll end at six. The expected value of Y, you just need to do the sum of Y times the probability of Y. So you just use this table here. I'm gonna give you some time to do that What's the answer? Okay, do you have the answer? I'll just write. So it is, it is zero comma, zero times, zero times zero comma six zero plus one times zero comma three zero plus two times zero point one zero. Okay, and that is zero plus zero point three zero plus zero comma two zero. Which is equals to? Zero comma five zero. Zero comma five five zero. So we have our expected value. We need to calculate the standard deviation. We know that there's standard deviation. Before we do the standard deviation for the mean of X, the answer there is the zero point five plus zero point two would that be zero point seven zero? Yes, I calculated it, drug this. Thanks. It's zero point seven zero. Yes, you're right. Sorry about that. Yes, fixed it. Okay, so now let's do the standard deviation. So we know that the standard deviation for X will be given by the square root of the sum of your X observation minus the expected X squared times the corresponding probability of X. Therefore, that will be the square root of our, it will be zero minus zero point seven squared times zero minus zero point seven squared. Zero point four plus minus zero point seven squared times zero point five plus two minus zero point seven squared times zero point one. And you can see the entire, I'm not gonna do one by one by one by one. I'll use the case here. Are you winning? I am doing everything, including the square root. And let me know what answer do you get. Okay, I've got my answer. And what is your answer? It's point two one four. Oh, but I didn't see the square root. Yeah, take the square root because I don't have enough space to use up all the things. So the square root would be point four six, two six, zero one three four. No, I'm sure you calculated the variance. Doing everything and taking the square root, the answer you should get should be zero comma six four if I run it to two decimal. Double check your numbers. Can we do them again? Did you do them one by one? And you must make sure that if you're using your calculator and you're doing all of them at the same time, make sure that you include the brackets as well or use the multiplication because the answer of everything that is underneath the bracket, underneath the square root should be something like zero point four one. And you should take the square root of that answer. It should give you zero comma six four zero three, one, two, four, two, three, yes. Okay, so we can also do the same with the Y. So we need to find the standard deviation of Y which then it is the square root of the sum of your Y value minus the expected mean of Y squared times it's cross bounding probability which is the square root of zero minus zero point five squared times zero point six. Plus minus zero point five squared times zero point three. Plus two minus zero point five squared zero point one. And we can go and find the value underneath the square root. And you should get zero point four five, zero point four five. And if you take the square root of zero point four five. Zero comma six seven. Zero comma six seven. So you still remember all these values since I ran out of space here and it's going to the next one. Remember that we just covered number one, number two, number three. We need to do number four, which is the covariance. Now with the covariance, I need enough space. So the formula for the covariance, the covariance of X and Y. I'm gonna use the easy one that I can still remember is the sum of your X minus the expected times Y minus the expected times its cross bonding probability of X and Y. Let's see if I'm writing it right. I am writing it right. Okay, what it means, it says, we're going to say, for example, if we take, we start with the X on the side. So it will say zero minus, you still remember what our expected value for X is and our expected value for Y. Do we remember those? It's zero point six, zero point seven and zero point five. Zero point seven and zero point five because we need that one. So we say zero minus X. Minus zero point seven will start first with the X one and then go to the Y, which is zero as well. Minus zero point five. It will be a long calculation. Multiply by its joint probability, which is zero comma one two. Multiply by zero comma one two. Plus, we go to number one. One says, do we do this one now? So we started with this. Now we come here. So this on here, it will have two values. So it's zero and one, right? So that will be one minus zero comma seven times zero minus zero comma five times the corresponding probability, which is zero comma four two. Plus, I'm gonna go to the bottom. We come to two, two with this corresponding probability corresponds to Y of zero and two X of two. So it will be two minus zero point seven times zero minus zero point five times the corresponding probability of zero comma zero six. Plus, then we come to the second row, which corresponds to zero and one. So that will be zero minus zero comma seven times one minus zero comma five times the corresponding probability, am I on the right track? No, I'm on the wrong one. It should be with zero one. Sorry, it's zero and one. Yeah, I'm on the right track, which is zero comma two one, zero comma two one. Plus, now we go to this one, which X is one minus zero comma seven and our Y is one minus zero comma five times the corresponding probability, which is zero comma zero six. Plus, we come this one, two minus zero comma seven times one minus zero comma five times the corresponding probability, which is zero comma three. Plus, it's a long calculation. And we can say on this one, it's zero minus zero comma seven and two minus zero comma five, corresponding probability, zero comma zero seven. Plus, one minus zero comma five, minus zero comma seven times two minus zero comma five and the corresponding will be zero comma zero two. And then the last one. That is two minus zero comma seven and also two minus zero comma five times zero comma zero one. Yes, and then you can just calculate all of them. I'm gonna save you a whole lot of time to tell you what that is. And there is no shortcut to this. No, there's no shortcut. The answer you will get will be minus minus zero comma one five. Or here is the other easy one that you can use. Remember, let's go find that the easy formula. The sum sum of X and Y and the corresponding probability minus mean of X, mean of Y. Okay, this one, it's, it looks easy but it's also a little bit of complexity to it. X and Y, you say is the sum sum of all the X values and all the Y values of X and Y times the joint probability of X and Y minus the expected of X times the expected of Y. So this one, you need to first solve this part first because the summation does not include those two. Expected value of X times the expected value of Y you can just take those two because this is the same as zero comma seven times zero comma five. So that one you can calculate. The only part that is complex is on this side. So now on that side, what you need to do because it says it is X times Y so it means we need to multiply X and Y and its corresponding probability. So we're going to say zero times zero multiplied by the corresponding probability plus zero times one and its corresponding probability plus like that. So let's do it here. Do I wanna write it on here? Let's write it on here. We'll come back to this later on. We'll come back to this patch. So we'll come back to the formula later on. So we know that eventually we need to calculate the covariance of X and Y with the sum sum of X and Y times its corresponding joint probability of X and Y minus the expected of X times the expected of Y. So let's solve this one first here. So the sum sum of X and Y times the joint probabilities will be given by zero times zero, zero times zero times zero point one two plus zero times one times zero point oh two plus zero, zero times two times zero point zero six plus. And we go to the next line. I'm not equal, just the next which is zero. It's one times zero. Since I'm using the Y axis, one times zero, one times zero times the cross-bonding probability, which is zero point two one plus. One times one. Zero point zero six times zero point zero six plus. One times two plus zero point zero three zero three plus. Two times zero zero times zero point zero seven zero seven plus. Two times one. Two times one times zero point zero two plus. Two times two. Two times two times zero point zero one. And you go and find that which will be, which will be zero point three. And that will be, let me write it closer to the numbers. Zero point zero point two. So now let's use our formula because I don't want to rewrite it. So we know what this value is. It is zero point two minus. And did you calculate zero point seven times zero point five? What is the answer? That's zero point three five. Zero point two minus zero point three five, which will be minus zero point one five, right? So that is how you will calculate the values. Maybe let's do one last thing. We can finish it. Godapast, just give me a second while you're still double checking your answers. So you're done with estimates. So you're done with estimates. The only thing that you did today was estimate. Yes. What happened to? Well, I had a whole lot of homework. But if you finished long time ago, that means then you. I had at least nine or 10 pages to do for your estimate. All right. So let's do one last thing relating to duplicate one of this. I'm gonna discard because we do have, and then I'm gonna. So let's create a way is the other one. Find the probability of distribution of X plus Y. X plus Y. So now how you do that, I'm gonna use this site. How you do that, we have all at this table, right? So we go into add because we want to create a table that looks like this. X plus Y because we're creating a distribution table with its corresponding probability of X plus Y. So it means we need to determine what are the variable, the outcomes, the possible outcomes that could be. So in order for you to complete that table like this, you're going to add those two X plus Y. And when you add X plus Y, you must also add the probabilities. So the first one we're going to do is say zero plus zero because it's X plus Y, zero plus zero is zero, right? And the corresponding probability of that is zero comma one two. I'm just gonna write it like that. The next one is one plus zero, which is one and the corresponding probability will be zero comma four two. And the next one, two plus zero is two and the corresponding probability is zero comma six. Osles, if you can't see what you are writing. Oh, I didn't share my screen. No. And now? Yes, we can see now, go. Okay, because I didn't cut the thing here now. Let's do this, get it back here so that you can see. Let's share, sorry about that. I thought I am sharing my screen. Well, let's leave it there. So what I'm saying is if we need to find the probability of X plus Y, so we want to end up with a table that looks like this which is the distribution which it has X plus Y and also the probability that corresponds to X plus Y, that's what we want to do. And we need to identify the values that will form part of the outcomes. So we're going to add X plus Y, X plus Y, but when we do that, we also need to add the probability that corresponds to those things. So the first one is zero plus zero is zero and the corresponding probability of, or the joint probability there is 0.12. The next one is one plus zero is one and the corresponding probability is 0.42. The next one is two plus zero, the corresponding probability of two will be zero comma zero six. Now we move to the second row of Y, zero plus Y and the corresponding probability. So zero plus one is one. I'm not going to write one again because I have already one. So I can write the corresponding probability of zero and one which is zero comma two one, zero comma two one. And then I go to the next one, one plus one is two and the corresponding probability is zero comma zero six, zero comma zero six. And the next one is two plus one, which is equals to three. So I can write three because I don't have a three and the corresponding probability is zero comma zero three. I'm just gonna write it on the same line. Then we go to the next one which is the last one, zero plus two is two and the corresponding probability is zero comma seven. And one plus two is three and the corresponding probability is zero comma zero two. And the last one, two plus two is four. We don't have a four, we can write that outcome. And the corresponding probability is zero comma zero one. Now all I need to do is add all the probabilities underneath there because I know that this one is x, x plus one, x plus y values. And therefore here I'm gonna have my x plus y probabilities. So yeah, we'll have, I just bring it down because there is nothing to add there. And yeah, I must just bring it down which will be three, six, zero comma six, three. And yeah, I must also bring it down. That is 12, nine, that will be 19, zero comma one nine. And yeah, two will be five, zero, zero comma zero. Zero comma zero and zero comma zero one. Therefore I have my probability distribution, zero, one, two, three, four. And my probabilities are zero comma one, two, zero comma six, three, zero comma one, nine, zero comma zero five and zero comma zero one. And you can even do more than what I'm just showing you, but I think this will be enough for you to be able to write your assignments or write your exam and everything in between. And that concludes today's session for us. Thank you for being here and for participating. There is nothing more I can share with you. We've done the expected values, the variance, the covariance, the bivariate distribution, and that's it. Thank you, thank you, thank you. It's your problem, you are welcome. Yeah, we'll be able to tackle the marginal problem which is problems now in the assignment three. Yes, you should be able to. I'm gonna stop the recording.