• ## Summary

Search form
• 00:00

[MUSIC PLAYING][Business Mathematics][Module 9: Probability, Part 8: Covariance and Portfolios]

• 00:09

RICHARD WATERMAN: The measure that weuse for dependence between two random variables--let's call them x and y-- is called covariance. [RichardWaterman, Adjunct Professor of Statistics]And here is its definition.The covariance of x and y-- we writethat as cov, short for covariance--is equal to the expected value of x times yminus the expected value of x times the expected value of y.

• 00:34

RICHARD WATERMAN [continued]: [Covariance]And in this expression, the expected value of x times yis the probability weighted sum of xtimes y, where those probability weights comefrom the joint probability distribution of x and y.So we'll be able to calculate the expected value of x times yin the same manner we had done before.

• 00:56

RICHARD WATERMAN [continued]: We'll just find all the different possible valuesof x and y, add them up in a weighted fashionwhere the weights come from the joint probability distribution.So once again, the covariance of x and yis defined as the expected value of x times y,minus the expected value of x times the expected value of y.

• 01:20

RICHARD WATERMAN [continued]: If the two random variables are independent,then it turns out that the expected value of xyis just the expected value of x times the expected value of y.And so the covariance becomes 0 when x and y are independent.But in general, when x and y are dependent,then the expected value of x times y

• 01:41

RICHARD WATERMAN [continued]: is not the same as the expected value of xtimes the expected value of y.So this covariance won't in general be 0.But you have to be careful because it doesn't alwaysfollow that all because the covariance of xy equals 0,that x and y are independent.So it's one of these implications thatgo one way but not the other.

• 02:03

RICHARD WATERMAN [continued]: If x and y are independent, then their covariance is 0.But all because the covariance is 0does not prove that they are independent.So they say, an implication that only goes in one direction.[Example]So we're going to do a covariance calculation now.And in order to do that, I'm going

• 02:25

RICHARD WATERMAN [continued]: to introduce a couple of financial instruments.Let's call their returns x and y.And these instruments can only have some very specificcriteria.I mean, this is an example to show youhow to do the calculations and learnsome of the implications of what's going on here.So in this worldview, x can either

• 02:50

RICHARD WATERMAN [continued]: have a return of minus 1%, goes down a bit, 0, stays the same,or goes up by 1%.And y, likewise, can go down by 1%, it can stay the same,or go up by 1%.So x and y here are the returns on these two instruments.

• 03:11

RICHARD WATERMAN [continued]: And the return is being given as a percentage.So the joint probability table lays outall the possible outcomes-- thoseare the nine cells inside the table--and assigns probabilities to each cell.Remember, I told you, where these probabilities come from

• 03:31

RICHARD WATERMAN [continued]: is not for this class.All right, that's the other classesthat you can do that will talk about making these probabilitymodels.Here, I'm just presenting you with a model and saying, now,there's some stuff we can do with it.So there's our joint probability model.The row and the column totals-- those are oftencalled the margins and give you the marginal distributions

• 03:53

RICHARD WATERMAN [continued]: of the returns on x.Those are the 0.45, 0.25, 0.3-- the probabilitiesalong the bottom row.And the marginal distribution of y-- 0.3, 0.3,0.4-- the probabilities under the column labeled total.So this is our summary of the joint distribution

• 04:16

RICHARD WATERMAN [continued]: of these variables x and y.[Calculating the covariance]In order to calculate the covariance,we simply have to go through the definition.And there is no easy shortcut for that here.But it's a reasonably straightforward example.So just bear with it and make sure you can see where

• 04:37

RICHARD WATERMAN [continued]: the numbers are coming from.And then you can trust me to make sure I put theminto the calculator correctly.So the definition of covariance was the expected value of xyminus the expected value of x times the expected value of y.So I need to calculate these pieces.The expected value of x is pretty straightforward.You take the values that x can take on--

• 04:57

RICHARD WATERMAN [continued]: minus 1, 0, or 1-- and you weightby the probabilities-- 0.45, 0.25, and 0.3--and you add them up.And you'll find that the expected return on xis minus 0.15.If you perform the same calculation on y,you'll find that the expected value of y is 0.1.

• 05:19

RICHARD WATERMAN [continued]: So the expected value of y is higher than that of x.Now in order to do the more complicated expected valueof x times y calculation, what you have to dois calculate xy for all of the possibilities in the table.And then for each possibility, multiply through

• 05:39

RICHARD WATERMAN [continued]: by its probability weight and add them up.And so in this somewhat complicated expression here,you're really looking at nine items.And the nine items are corresponding to the nine cellswithin the table, the product of x times y.So let's just take the very first element here,where it says minus 1 times minus 1.

• 06:01

RICHARD WATERMAN [continued]: That's where the return on x is minus 1% and the return on yis minus 1%.So we get minus 1 times minus 1, which gives us 1.And then we multiply through by the probability weight,which is 0.2.And the 0.2 is coming from the joint probability function

• 06:21

RICHARD WATERMAN [continued]: that you can see on the previous slide, the top left-hand cell,the 0.2, when x equals minus 1 and y equals minus 1.That happens with probability 0.2.And when it does, their product xy is minus 1 times minus 1,which gives you plus 1.So you repeat that process for each cell in the table,figure out what xy equals, and then

• 06:42

RICHARD WATERMAN [continued]: multiply through by the probability weightand add them up.And each of the elements-- and againthere are essentially nine term seriesbeing read out of the table.So you should convince yourself that you can understand whereall of these numbers come from.And I have added them up to get the expected value of x times y

• 07:07

RICHARD WATERMAN [continued]: is just 0.1.So now I have identified the piecesto calculate the covariance.The covariance between x and y isdefined as the expected value of xyminus the expected value of x times the expected value of y.So in this particular case, it's 0.1

• 07:29

RICHARD WATERMAN [continued]: for the expected value of xy.And then minus-- the expected value of x was minus 0.15.Find The expected value of y was 0.1.So I have to multiply those two together.Subtract them from expected value of x times y.And I get 0.115.So that's purely putting the individual components

• 07:49

RICHARD WATERMAN [continued]: into the equation for the covariance between the twovariables.So there's the covariance calculation.And I've just added in here, I won't force you to do it.But you could if you were interestedbecause I'm going to need these terms in just a second.I've also found that the varianceof x is 0.7275 and the variance of y is 0.69.

• 08:12

RICHARD WATERMAN [continued]: And I did that by using the formula for variancethat I had introduced earlier on in today's class.So the focus of this slide, though,was to calculate the covariance between x and y.And I presented the variances, as well.But I'm going to need them in just a second.So there's a covariance calculation.And that 0.115 gives us a measure

• 08:35

RICHARD WATERMAN [continued]: of how the two terms covary.[And why is this useful?Because of portfolio math]Now you might be looking at that, thinking,that looks like a mess.And anyway, why on earth am I ever going to want to do this?What is it by me, calculating this covariance?And the answer to that question, whyis the covariance so important, the essential answer

• 08:59

RICHARD WATERMAN [continued]: is that-- at least in business school--you're going to be interested in portfolios of entities.That could be a portfolio of stocks,it could be a portfolio of mortgages,it could be a portfolio of projectsthat your company is working on.

• 09:19

RICHARD WATERMAN [continued]: And what you want to do is think about the risk associatedwith that portfolio.Remember, risk is synonymous with variance.And so what we want to be able to dois calculate the variance of the portfolio.And it turns out that in order to calculatethe variance of the portfolio, you need the covariance.

• 09:42

RICHARD WATERMAN [continued]: So that's why covariance is so critical.This slide presents to you in two equations, equations 1and 2, what I sometimes call portfolio math.These are just facts about expectations and variancesthat are important when you look at the return and the riskassociated with a portfolio.

• 10:04

RICHARD WATERMAN [continued]: So let's look at the first equation.In the first equation, you can seeI'm finding the expected value of--and there's x and y there related with a plus.So that's a linear combination of x and y.But I'm allowing the x and y to be weighted.And the weights are arbitrary in this equation, w1 and w2.

• 10:26

RICHARD WATERMAN [continued]: And I am presenting in equation 1--I am not deriving, I'm just telling youthe answer-- that the expected valueof that weighted combination w1x plus w2yis the same as w1 times the expectedvalue of x plus w2 times the expected value of y.So equation 1 tells you how to take

• 10:48

RICHARD WATERMAN [continued]: the expected value of a linear combinationof random variables.And the linear combination that you are typicallymost interested in here or the linear combinationthat you interpret is a portfolio.And so you can think of a portfolio, the behavior

• 11:08

RICHARD WATERMAN [continued]: of the portfolio, as the behaviorof the weighted linear combination of the elementsinside the portfolio.So think of w1x plus w2y as your portfolio.And then the expected value of that is just the expectedreturn on your portfolio.And equation 1 tells you that your expected return

• 11:30

RICHARD WATERMAN [continued]: on the portfolio is made up of the expected returnson the underlying components appropriately weighted.And as I said, you can choose any numbersyou want for w1 and w2.They're just fixed constants here.So that's how the average or the mean of a portfolio works.

• 11:51

RICHARD WATERMAN [continued]: The action comes in for equation 2, where on the left-hand side,we've got the variance of w1x plus x2y.So again, w1x plus w2y is the portfolio.And the variance that we're interested inis otherwise known as the risk.And so in equation 2, we're figuring out

• 12:12

RICHARD WATERMAN [continued]: what the risk of the portfolio is.Now the equation says-- and again, I'm not deriving,this is just presented to you-- that youget the variance of the portfolio--the left-hand side-- by doing w1 squared times the varianceof x, plus w2 squared times the variance of y,plus w1 w2 times the covariance of xy.

• 12:35

RICHARD WATERMAN [continued]: And that's the whole point of this section of the course,to be honest.Look at equation 2 and notice that the covariance makesan appearance when you want to calculatethe variance of a portfolio.So that's why covariance is so critical.And you will see this covariance appear in your finance classes

• 12:56

RICHARD WATERMAN [continued]: when you talk about portfolios.Interpreting equation 2, I would simplysay that the risk associated with the portfoliodepends not just on the risk of the individual elements.That's the variance of x and the variance of y,but also the covariance between them.

• 13:17

RICHARD WATERMAN [continued]: So if for example you held a portfolio of mortgages,then what this equation tells youis that the risk to the portfoliodepends on the covariance between the performanceof the individual mortgages in the portfolio, not justtheir individual variabilities, but how they move together.

• 13:38

RICHARD WATERMAN [continued]: So it's clear that if you want to measurethe risk of the portfolio, then you need a good measureof the covariance.If you've mismeasured the covariance,then you've mismeasured the risk on the portfolio.And so problems with the covariancein terms of calculation come about when you have measured itor perhaps made bad assumptions on the covariance.

• 14:01

RICHARD WATERMAN [continued]: Perhaps you assume that x and y were independent sothat the covariance was 0, when in reality they were not.But the point of equation 2 says that if you'vegot the covariance wrong, you've gotthe variance or the risk of the portfolio wrong, as well.And if you've got the risk wrong,you're probably going to be mispricing that risk.

• 14:24

RICHARD WATERMAN [continued]: If you've calculated incorrectly,you have mispriced the risk.And part of the problem, then, in the financial crisiswas a misunderstanding of how portfoliosof various financial instruments would behave, particularlyin terms of their risk, their variance.

• 14:45

RICHARD WATERMAN [continued]: Generally, there was an understatingof the covariance, the covariabilitybetween the underlying elements of the portfolio.And as they say, the rest is history.So if you've ever got a portfoliothat you're thinking about, if you

• 15:07

RICHARD WATERMAN [continued]: want to understand the performance, the riskassociated with that portfolio, youhave to understand the covariancebetween the elements.That's what this slide says.[Examining the performance of portfolios]We'll finish this section of today's classoff by doing some calculations on portfolios made up

• 15:29

RICHARD WATERMAN [continued]: of the underlying instruments x and y.So I just want to show you what happensto the risk associated with an investmenthere as I create a portfolio.So I'm going to consider three possible scenarios.And that's what's under the portfolio column in this table.

• 15:51

RICHARD WATERMAN [continued]: Scenario 1 is essentially I put all of my money into x.And so all of my money can be described as w1 equal to 1,all of my money going into x. w1 equals 1 and w2 equals 0.I don't put anything into y.So that's eggs in one basket, the basket being x.

• 16:11

RICHARD WATERMAN [continued]: That's the first route.I could put everything into y.That would be w1 equal to 0 and w2 equal 1.So all my eggs in the other basket.And I want to contrast what happenswhen we put all our eggs in one basketto when we create a portfolio.And there are many portfolios that one could create.

• 16:33

RICHARD WATERMAN [continued]: I'm just going to have a look at a particularly simple one,the equally weighted portfolio where I put half of my moneyinto each of the possible instruments, half into x, halfinto y.So I've got weights of 0.5 and 0.5.That's the last row of the table.And what I want to do is compare the performanceof these possible portfolios.

• 16:55

RICHARD WATERMAN [continued]: And so in the table under the expected value of p-- hereI'm using p for portfolio, not for probability.So I hope that wasn't confusing-- p for portfolio.If I put all my eggs in the x basket,the expected value is negative 0.15.We had worked that out earlier on.If I put all my eggs in the y basket,the expected value or my expected return

• 17:18

RICHARD WATERMAN [continued]: on that investment is 0.1.And if I had done a 50-50 split using the formulafrom the portfolio math, you'll seethat the expected value of that portfolio is just 0.5 timesthe negative 0.15 plus 0.5 times the 0.1,to give you a negative 0.025 expected return.

• 17:42

RICHARD WATERMAN [continued]: So that's how the expected values work for these threepossible investment strategies-- eggsin one basket x, eggs in one basket y, or a 50/50 split.So the interesting thing comes in thoughwhen we look at the variance of the possible three investment

• 18:02

RICHARD WATERMAN [continued]: strategies.So if you were to calculate the variance of everything goinginto x-- and I had done this earlier on-- itturns out that the variance of x is 0.7275.Remember, variance is synonymous with risk.If you put it all into y, that's using w2 equal to 1,

• 18:23

RICHARD WATERMAN [continued]: you'll have the variance at 0.69.And the interesting thing is that if you had used the 50/50split, then the variance of that portfolio is 0.411875.And the way that I get that 0.411875is to use the portfolio math formula.

• 18:44

RICHARD WATERMAN [continued]: It was formula 2 where I said that the varianceof the portfolio was w1 squared times the variance of xplus w2 squared times the variance of y,plus twice w1 w2 times the covariance of xy.And I have taken the pre-calculated valuesto figure out what the variance of the portfolio is,and it's 0.411875.

• 19:08

RICHARD WATERMAN [continued]: And what you should notice is that the varianceof the portfolio is much lower than the varianceof either individual component.Notice 0.7275, and then 0.69, dropping down--when we're looking at the portfolio-- to 0.411875.So you're observing here how that variance or risk reduces

• 19:32

RICHARD WATERMAN [continued]: when you create the portfolio.Remember, that's pretty much the pointof portfolio construction-- it's risk mitigation, the ideaof diversification of risk.And you'll see it here that idea numerically.The final column of the table, just for completeness,I calculated the standard deviation of the returns.

• 19:55

RICHARD WATERMAN [continued]: And that's simply taking the square rootof the variance column.And so we can again see that on the standard deviation scale,the equally weighted portfolio, the 50/50 split,has a much lower standard deviation of returnthan the eggs in one basket portfolios.

• 20:16

RICHARD WATERMAN [continued]: So a reasonably simple example, but once againgetting into the essence of how these probabilitycalculations can give you some insight into what's going on.And in particular, the performanceof your portfolio when you're interested in measuringthe risk of that portfolio is going

• 20:36

RICHARD WATERMAN [continued]: to be partially driven by the covariancebetween the underlying elements and, hence,the discussion here that we've hadof the concept of covariance.[Music: Repeater by Moby, courtesy of mobygratis.com][Business Mathematics][Richard Waterman]

### Video Info

Episode: 8

Publisher: Wharton

Publication Year: 2014

Video Type:Tutorial

Methods: Covariance, Probability, Random variables

### Segment Info

Segment Num.: 1

Persons Discussed:

Events Discussed:

Keywords:

## Abstract

Richard Waterman discusses covariance and portfolios. Covariance is the measure of dependence between two random variables. Waterman explains how to calculate the covariance and the performance of portfolios.