📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Properties of the Expected Value

Steve Brunton10:18

Transcription

Welcome back. Okay, so we introduced this notion of the expected value of a random variable X, or the expectation value, and gave some formulas and some intuition for what it meant. Now I'm going to tell you three of the most important properties of this expected value. This is a function of my random variable x. Three of the most important properties of the expected value. We're going to use these when we derive the variance and standard deviation. We're going to use this all over the place in the next, the next few lectures.

Now, if you want an example of how to actually compute this expected value for an actual probability density function, I think one of the next couple of videos will give you an example. So you can just kind of fast forward to that if you want to see an example first and then come back to this one. But I want to start here for now. Okay, so the properties I'm going to show you—and I'm going to state two of them and I'm going to prove the third one—the first property, and this is maybe the most important property, is that if I have random variables X and Y, then the expected value of x plus the expected value of—sorry, the expected value of x + y, this new random variable X + Y, is simply the expected value of x plus the expected value of y. And this is true for any random variables X and Y. They don't have to have the same distribution; they can be different. The expected value of x + y is going to be the expected value of x plus the expected value of y. And this works for larger sums: the expected value of x + y + z is the sum of those three expectation values. Okay, super, super useful property. And in fact, this is a good one for you to just verify yourself. You can like pause the video and use these formulas to convince yourself that this is true for a discrete random variable or for a continuous random variable. That's pretty, pretty helpful.

That's one property. The second property is—and this one again is super, super useful—if X and Y are independent—are independent, and we know what independent means; it means that the probability of X, Y equals probability of X times probability of Y. The joint density function is the product of the two individual density functions. If X and Y are independent, then the expectation value of x * y is equal to the expected value of x times the expected value of y. And I'll, I'll actually prove this one in a minute. This one, we will, we'll just kind of write down a proof for this. And this expectation is not equal to the product if they are jointly dependent. This is only true if these are independent variables. Okay, really important.

And three, this one, we're going to use in the derivation of the variance; that's why I wanted to kind of introduce it right now while expectations are fresh and we're about to go to standard deviation and variance. If I have some random variable Y, which is a function of my random variable X, then the expectation of Y, the expected value of y, which of course is the expected value of G(X), is simply equal to—for discrete time—sorry, for discrete random variables X, not discrete time—discrete random variables, we essentially take this formula and we replace x with G(x). X. This equals the sum of G(x) * the probability of X, summed over all of little x. For, let's say, discrete variables, for discrete x. And for continuous random variables, this would equal the integral from negative infinity to infinity of G(x) f(x) dx. This is not obvious. This one is actually not obvious that the expected value of a function of X would—you would just replace X here with G(x) or G(x). That's not at all obvious. You can prove it, but it's a little bit involved, and I'm not going to do it right now. So I want you to just know that this is an important fact. So, for example, the expected value—let's, let's just as an example—example: the expected value of x squared. What I would do is I would say, at least if this is a continuous random variable, this would be the integral from negative infinity to infinity of x squared f(x) dx. And this is the second moment of my random variable X. This is a useful quantity that we're going to use when we derive the variance and the standard deviation. So this is going to be useful; that's why I wanted to show you this. Property 3 is not super duper obvious. You can convince yourself, but just take, you know, if it doesn't look obvious, it's because it's not. This one you can convince yourself of, and Property 2 I'm actually going to derive right now for you.

Okay, so Property 2. Let's say that I have two variables X and Y, and I want this expectation value. So the expected value of x * y—this is a new function—this is going to be—and I'm going to do this for discrete random variables just because it's a little easier, but you could do it for continuous also—this is the sum over X and Y of x * y times the joint probability density that my random variable x equals little x and my random variable y equals little y. Okay, this is just kind of the definition of this new random variable. If I had a joint distribution, it would be this function, which is xy, weighted by the probability of my random variable X equaling x and Y equaling y. And if my system—if X and Y were jointly dependent, they were not independent—then I couldn't split this probability. But because they are independent, I'm going to be able to split this probability. So I'll make a very big caveat: if independent, then we can do this next step, which is now I'm going to break this probability up into—so still summing over x and y—x * y. Now I have the probability of X equaling x times the probability of Y, my random variable y equaling the specific value y. Okay, and now what I'm going to do is I'm just going to move these things around based on what depends on what. So if I'm summing over X, I can move my summation—I can swap the places of my summation of y and x—and I can move things around a little bit. Maybe I'll switch colors here. So this is going to equal a sum over x * probability x = x times my sum over y—and I should probably keep my x out front here to keep my x and my probability of X and my sum—times the sum over y of y probability that y equals y. And you can convince yourself that I can move these things around. This is again because these are independent. This function of X has nothing to do with Y, and this function of Y has nothing to do with X because they're independent. So I can swap these orders. This is just the expected value of y, the expectation value of y, and this is the expectation value of X. So it's literally just—this product here is just expectation value of x times expectation value of y. And you can use similar arguments to prove this first property here if you like.

Okay, so really, really important three properties: linearity—the sum of the—the expectation of sums of variables is the sum of their expectations—probably the most, most useful. Expectation of a function of a variable: you just plug that function into the definition of X in the expect—to the definition of expectation; you, you plug in that function where you see this X. And then for independent variables X and Y, the expectation of the product is the product of the expectations. Really, really straightforward, really simple. I guess you could probably generalize this one also. You could say expected value of G(x) * H(y) woof is the expected value of G(x) times the expected value of H(y) if X and Y are independent. And then you could use this third property in here. So you can kind of mix and match these things, but I want you to be careful and think about when the assumptions are valid and when you can do this and how you would compute these things—things. I also want you to think about a case where X and Y are not independent, and I want you to come up with an intuitive example of why this would not be true for a case where X and Y are not independent. Okay, good. Thank you.