this is level one of the cfa program the topic on quantitative methods and the reading on organizing visualizing and describing data this is part two a logical extension of part one let me just remind you that we talked about the importance of collecting data and organizing data and maybe coming up with some characteristics of that data and remember that i said to you that the cfa institute wants all of us as good financial analysts to be able to identify data sets and then do something with those data sets and that do something is to make decisions and so that's pretty much what we're going to do here in part two we're going to call this measures of central tendency and please just think of central tendency as i always do as the point in the middle but the second component of that thought is that we have these observation observations around the point in the middle and the dispersion of those observations is going to tell us a lot about that data set so if we look at the learning outcome statements notice that we have a handful of calculate action words so that'll be super fun but that first one is super important calculate and interpret measures of central tendency if we can focus on that one then the other losses pretty much fall into line we'll have an interesting conversation at the end of our slide deck on skewness and kurtosis and then we'll hit another important los describe and interpret covariance and correlation between two variables so let's start with that first one which i think is very important measures of central tendency so this is the point in the middle but there are a handful of ways of arriving at that point in the middle the mean the median and the mode let's go ahead and start with the mean and we need to make sure that we distinguish between a population mean which is a representation of an entire population of a variable versus the sample mean in which we just kind of reach into a population and grab certain points and i'm guessing that you remember how to compute the mean all the way back when you were 10 or 12 years old you simply just sum all the observations and then divide by n although we'll have some adjustments to be made here as we move through the slide deck i want to call your attention to the last arrow point down there the reading makes an interesting statement about the arithmetic mean being an excellent measure of performance in a forward-looking context and i have a couple of thoughts about that but clearly what the reading is trying to convince you is of the following you know let's suppose that you have a data set that includes the last five years of returns for a particular mutual fund and you want to try to predict the future well the most logical starting point is to look at the mean or the average return over that last five years and suggest that that's the most likely outcome over the next five years and if you believe in that what you're tending to believe is that history does repeat itself and that's true for many variables but it's not true for all variables in all cases and i'll show you an example of that here in just a little bit the weighted mean is going to be important especially in the context of portfolio construction let's take a really easy example here let's suppose you have a portfolio that has three assets in it and those three assets are expected to return 10 percent 20 and 30 individually well if you take the arithmetic mean here let me just swing back here quickly if you take that arithmetic mean you're going to get 20 right 10 plus 20 plus 30 divided by 3 that's going to give you 20 however let's suppose in that portfolio construction that 80 of your wealth is invested in that asset number one and only ten percent in each of asset two and three well then twenty percent is probably going to overstate it so weighted mean is going to be important for uh portfolio construction we'll call it the weighted average or the weighted portfolio return geometric mean is a interesting kind of a concept what it does is instead of adding all of the individual observations and dividing by n to get the arithmetic mean it multiplies so notice in the geometric mean equation we have a multiply sign in between x1 and x2 and x3 and so forth well in order to get the mean we're not going to multiply and then divide by just n but we're going to raise it to the 1 over the nth power notice that second diamond point the formula only works when we have non-negative values and so we could apply this to a sports analogy i love giving sports analogies let's suppose that over the last four basketball games lebron james has shot 6 8 10 and 12 foul shots and we want to try to make a prediction over how many foul shots he's going to shoot in an upcoming game well clearly if we do the regular old arithmetic mean what did i say 6 8 10 and 12 well that that mean is going to be 9 right but if we do the geometric mean and we multiply those 6 8 10 and 12 and then raise it to the one over fourth power we're going to get something less than nine you know maybe it's 8.7 or 8.8 but the cool thing about the geometric mean is that it includes the nature of compounding inside of those variables which lends itself perfectly to an analysis of portfolio or individual asset returns the geometric mean is probably fairly useless when trying to predict lebron james's foul shots but if we have a portfolio of returns over the last let's say five years two percent eight percent twelve percent minus six percent and fourteen percent we can compute a geometric mean and that's going to be an excellent measure of past performance so i want to make sure that i call your attention to this look down here at the the very bottom arrow point forward-looking contest for population and sample mean uh past performance for geometric mean that sounds an awful lot to me like an obvious question to ask on the exam but i want to give you just a quick example here bear with me for a minute or two let's suppose that i'm your money manager and you send me a hundred dollars all right and i do all sorts of stuff with your 100 and at the end of that first year i've turned that into 200 that's a that's a 100 return and then during the second year i do a whole bunch of stuff with your hundred dollars and i turn it back into one hundred dollars so you handed me a hundred dollars two years later i hand you back a hundred dollars now let's see the difference between the arithmetic mean and the geometric mean and by the way this is a standard example that's in thousands of textbooks and thousands of professional presentations throughout the world but i'm going to come to you as your money manager and i'm going to say hey i i deserve a bonus watch this the average of a hundred percent in year one and then we lost fifty percent in year two right from two hundred down to one hundred well one hundred minus fifty that's fifty percent divided by two i averaged a twenty five percent return and i'm gonna look at you and say hey i deserve a bonus and you're gonna scratch your head and you're gonna say wait a minute jim you i started with a hundred and and i ended up with a hundred how can how can i pay you a bonus and you're going to whip out your cfa geometric mean book and you're going to say wait a minute let's compute the geometric mean let's take 1 plus that 100 that gives me 2. let's take 1 minus that 50 that gives me 0.5 if i say 2 times 0.5 that gives me 1. if i raise that to the one-half that gets me one and when i subtract out one that gets me zero percent so you wave that book in my face and say wait a minute jim the geometric return was zero percent you're gonna say dude i'm not giving you a bonus you're fired harmonic mean is going to be really important when we have a conversation on ratios this is going to really hit us in level two when we do something like the price earnings ratio or maybe the cash flow to earnings ratio so look at that diamond point it's used to determine average growth rates of economies or assets and so this is a really interesting calculation where you put n in the numerator and then you sum the reciprocal of all of those observations and i'll show you a quick example here in just a few seconds uh trimmed mean a measure of central tendency in which it is calculating using excluding a small percentage of the lowest and the highest values you know for example if we're trying to compute the point of central tendency for touchdown passes thrown by patrick mahomes on any given sunday you know sometimes it's zero sometimes it's five sometimes it's three you know what could we do we could include we could exclude a small percentage of you know the zeros and the fives or this windsorized mean what we could say is something like oh if patrick throws zero or one touchdown passes we'll just say that's one if he if he throws five or six or seven we'll we'll just say that's five so go ahead and read those definitions for the trimmed mean and the windsorized mean and think about what's happening here in the two extremes what we're trying to do with trimmed and windsorized mean is to lower to lower the influence of those outliers calculate and interpret so that'll help you answer that question on trimmed and windsorized mean median of course you learn about the medium median when you learn how to drive my father used to always say it's better to be on the right hand now this of course driving in the united states it's better to be over here closer to the line on the right then closer to the line on the left which is the median stay away from the median because if you crash into a car coming to you it has uh more of a violent reaction than if you just crash into a parked car over here so one interesting kind of a footnote here to this concept of the point of central tendency as the median is that in the academic world you hear this all the time about faculty salaries well the mean can be a little bit inflated especially if you're comparing it against schools where professors make tons and tons of money so it's a you know fairly common standard to look at the median faculty salary and so look at that second diamond point yeah the median is resistant to the effects of extreme observations the mode of course is the one that occurs most frequently some data sets have a mode and some don't have any how about if we take a look at some stock returns over the past six years two percent two percent four six eight and twelve percent let's go ahead and compute all of these points of central tendency and feel free to pause the recording and get out your calculator to make sure that you can confirm that all of these are accurate and that you can calculate this on the exam because the loss does read does read calculate notice the arithmetic and the weighted mean are identical because the weights are equally distributed once again there's the geometric mean where we add one to each of the decimal forms of those interest rates and then divide i'm sorry raise it to the 1 6 power notice that the geometric mean 5.61 is going to be less than the arithmetic mean that's going to be the case notice that the harmonic mean has six in the numerator the mode is two percent because that's the uh that's the most uh commonly observed data point and then the median is just going to be the two midpoints four and six divided by two that gets you five here's a good slide to memorize types of data going down the left hand side and then when is their most likely or most useful type of point of central tendency i think we covered all those points yeah how about quantiles and interpret related visualizations we can divide things into four that's a quartile we can draw divide things into five we can divide things into ten i mean i we could divide things into almost anything right but i'm guessing that we picked those numbers because they are divided equally into a hundred and that gets us down to percentiles split the data into 100 equal parts uh my children will tell you that we live in our family here in a world of percentiles whenever my children are sick or whether they're hurt i ask them what their percentile is and of course uh of course i always get a low bald answer oh i'm sick i'm i'm five percent dad i'm five percent i need to stay in bed and sleep here let's look at that uh box and whisker plot and this is really a huge super related visualization to give us a sense of the data set so let's just go ahead and start at the top and the bottom so there's the maximum and the minimum and then we can throw our points of central tendency in the middle right there's there's the mean and there's the median and then we also in this box and whisker plot are going to put the first and the third quartiles and so all we're going to do is compute that inter quartile range that's shown uh to you up at that slanted arrow point q3 minus q1 range is simply maximum minus the minimum that's an obvious notion there mean absolute deviation so here's where we start our conversation that i hinted at at the beginning of the slide deck so remember i said point of central tendency is just some point in the middle and i've shown you a variety of ways to compute or estimate that point in the middle now we want to know what is the dispersion around that point in the middle and think about it this way if the total dispersion around that point in the middle is just about this much well what we can say is that we have a lot of confidence in our point of central tendency but if can you guys see this if i go out of the screen if our measure of dispersion is that high then we have less confidence so think about that measure of confidence about our point of central tendency as a measure of risk oh man this is going to be so important as we go through quantitative analysis so the first point here to make is to consider this mean absolute deviation and all we're going to do is compute the mean right there's the arithmetic mean that's x bar over there to the right of the minus sign and we're going to subtract from that i'm sorry we're going to subtract that from each value inside of the data set but it's important to remember we're going to subtract each absolute value of each item inside of that data set now here's where we get really interesting and really into the meat of the beginning of statistics variances what we're going to do is we can compute a population variance if if the data set is from the population or we can compute the sample variance if we have reached into a population and extracted a sample data set and so both of these are computed in the same manner notice the population variance which is noted by the greek letter lowercase sigma and it's a squared value always remember that a variance is a squared value and what we're going to do remember back here in the mean absolute deviation we took the absolute value of each observation and subtracted it from the mean value well in variance we're not going to worry about absolute values we're going to take that actual value whether it's positive or negative and subtract that from the mean and then we're going to square it so that we get rid of the negative to be able to make sure that we consider all of the distance between each observation and the mean and that those distances don't cancel each other out that's why we square it now you should be noticing that the population variance and the sample variance they pretty much look like the same equation and and in fact they are however however in the population standard deviation what we're going to do is we are going to we are going to divide by n in the sample standard deviation and variance we're going to divide by n minus 1. those are known as degrees of freedom and i'll give you a good sense of degrees of freedom in the next handful of readings so remember divide by n for population variance divide by n minus 1 for the sample variance and then you take the square root of those two to get the population standard deviation and the sample standard deviation so let's go ahead and compute a handful of these things we have the returns on six different large cap stocks over 2021 so we have the population data we've identified that as the year 2021 6 7 12 2 3 and 11. so here's our arithmetic mean just sum those and divide by six there's the mean absolute deviation take that six percent first observation minus the mean six eight three notice we have the mean bolded in red and then sum those divide by 6 and you get a mean absolute deviation of 3.17 so there's our first sense of a measure of dispersion so what's that point in the middle we computed that point in the middle it's around seven percent but that mean absolute deviation is going to be 3.17 percent the mean deviation above and below that means that means that we don't have 100 confidence that our arithmetic mean is exactly going to be able to describe the entire data set of course what we can do then is we can compute the population variance there's the sigma squared and notice that we do the same things but we're squaring that difference and then we're going to divide by 6. take the square root of that we get 3.72 percent now as we move through these early quantitative methods readings we're going to learn more about the application of standard deviation and mean absolute deviation but what i want you to do for right now is think about it in the following manner remember i said a few moments ago that it is a real helpful measure of risk i want to take it an even more general idea here and make this interpretation right the los calculate and interpret so we believe that the middle value here is six point eight three percent we've calculated the mad we've calculated the population standard deviation and they're you know three percent three point seven percent this is a measure of how wrong you can be relying on that measure of central tendency this should make perfect sense if the mean absolute deviation and the standard deviation for some reason turns out to be zero percent then you have 100 confidence in that estimate of the point of central tendency if it's positive well if it's positive and low then you have lots of confidence if it's positive and high then then you have no confidence a measure of risk or uncertainty and here's a good note if we were working with a sample we would have divided by five here let me go back here divided by five in that population standard deviation we divided by 6 because it was the population if somehow we were given in the question stem that this was a sample then we would have divided by 5. all right how about target downside deviation sorry so semivariance and semi deviation they are average squared deviations below the mean and so i want you to think about this the semi deviation and the target semi deviation these are measures for pessimists and as good financial analysts we need to be pessimists we need to say something like all right what's the worst thing that can happen you know if things go well you know like if we're a portfolio manager and the economy is expanding and we're generating returns of 12 and 17 and 19 and 22 and we're beating our benchmark every year then we're high-fiving and everyone's happy but of course we need to be prepared for that downside deviation how about if i call it downside risk we need to say something like all right if things don't go our way if the worst happens then what is the outcome or the expected outcome and then let's spend some time now preparing for that downside risk and so there's a good equation for the target semi deviation where we have some acceptable level of risk or some acceptable deviation from each observation let's go ahead and do a quick example target downside deviation if the target return is 20 so there we have a bunch of returns and let's go ahead and put this in a matrix i think this is probably the easiest way to do this so there are the returns once again the deviation from the target so our target is 20 but the return was 36 so that deviation is 20 and it was above so we just ignore it right so all we're going to do is focus on those deviations that are below the target that's that what is that the fourth com column there deviation below the target and then we're going to square them just like we did before add those together divide by the degrees of freedom and get target semi deviation of 17.21 percent let me just remind you raising something to the point 5 is the very cool way of taking the square root how about coefficient of variation cv ah this is a measure of the spread that is a ratio of what we just computed versus what we had computed earlier on in the slide deck so for a sample we have the sample standard deviation over the sample mean for a population we have the population standard deviation over the population mean so think about this in the numerator there's a measure of uncertainty a degree of error right and in the denominator there's a measure of that point of central tendency let's go ahead and calculate that with five observations and so feel free to pause the recording here and confirm that 40 and confirm that 5.5227 and by the way the reading takes the candidates through a number of examples throughout this reading in which they show you the steps 40 minus 40 squared 45 minus 40 squared and go through a table now i'm guessing that there are many of you who are saying wait a minute jim show me how to do this in your calculator and i promise that we will go ahead and show you the calculator steps when we get to maybe some more intricate examples but for now for those of you that have this calculator and let me just remind you this is my favorite calculator let me take my glasses also i can see you have a sigma plus button right down here so just enter the all the observations followed by the sigma plus button and then right underneath the zero is an s and right underneath the decimal point is i'm sorry the zero is the x bar and right under the decimal point is the s so you can compute those two means and standard deviations that way if you have this calculator note you have a set look under the seven and the eight you have a data and a stat function just hit the second data and then second stat and that will help you get started if you want to do a little bit of research on yourself on how to use that calculator but again we'll go ahead and do that for you in an upcoming recording and then when you have those two outputs then just divide them and you get a coefficient of variation of 13.8 now what we like to rely on as good financial analyst is this concept of a normal distribution which is right in the middle where the mean and the median and the mode are the same number now let me go ahead and warn you we're gonna we're gonna talk at length about normal distributions here in upcoming readings but for now notice that the reading tells you that this is a symmetrical distribution which means that the stuff that's on the right and the stuff that's on the left are just mirror images of each other and of course the delineation between right and left is the mean the median and the mode now what we say about this normal distribution is that the data set can be described by the first two moments of the distribution mean is the first moment standard deviation is the second moment and there are no third and fourth moments but let's go ahead and look at this los it should read something like this hey candidates skewness is the third moment of the distribution and let's figure out what it means so here are some standard uh ways to memorize this look at those look at those arrow points if the mean exceeds the mode then skewness is positive if the mean is less than the mode then skewness is negative and there's some examples there and there are tons of examples out there that you can find about which data sets are more or less likely to have positive or negative skewness and then down at the bottom illustration we have some good pictures and so the easiest way to remember this is that if you are skiing down the gentle slope to the right that's positive skewness if you're skiing down the gentle slope to the left that's negative skewness there's one of those quick ways to memorize things without really having to know anything about distributions and skewnesses skewnesses or skewn eye what is the plural now also note that the los does not ask us to compute skewness however the formula is in the reading and so we thought we would put it here so that you get a sense of exactly what this is right look at the to the right-hand side of this equation we're taking each observation x sub i and we're subtracting it from the mean and by the way we're not raising it to the two power because we did that with standard deviation that was the second moment of the distribution we're raising it to the third power because skewness is the third moment of the distribution and then to the left of that divided line there we have to adjust it for not n minus 1. remember i refer to that as degrees of freedom but notice we have to make some adjustments to degrees of freedom i tell my students that this is called super degrees of freedom although that's jim's term and not any kind of a statistics term but that gets them some kind of a point of reference to know that we've got to do something other than just n minus 1. so look down at the bottom two arrow points if skewness is positive then the distribution is positively skewed right and if it's negative the distribution is negatively skewed so there's a good answer to interpret skewness los now you're thinking to yourself okay jim there's a first there's a second now there's a third moment is there a fourth of course there's a fourth moment of the distribution this is called kurtosis and this has everything to do with how peaked the distribution is so let me go back here notice that normal distribution that symmetrical distribution there in the middle that looks pretty much like a perfectly symmetric distribution well and it has an average peak all right so let me come here if we have a higher than average peak in other words if that range and we've done this in blue it's more narrow we call that leptokurtotic if it's green if it's wider than we call that platy cartotic and so those are the arrow points there distribution that's more peaked distribution that's less peak so leptokurtotic platycrotic and then uh mesokurtotic and then the reading um cuts off the odds so leptokurtic platykurtic mesokurdic but i use those other terms as well now notice the normal distribution is neither two peaked nor too flat topped and so you're thinking to yourself wait a minute jim let's go ahead and show me that formula so there it is at the top and we're doing the same thing right we're taking each observation and we're subtracting it from the mean but we're not raising it to the second power we're not raising it to the third power we're raising it to the fourth power because it is the fourth moment of the distribution and then we need to make another adjustment to degrees of freedom i tell my students consider the kurtosis degrees of freedom as the super d-duper degrees of freedom because i know that many of them watched barney when they were little kids and i imagine some of you did too so regular degrees of freedom super degrees of freedom and super-de-duper degrees of freedom to visualize those equations for standard deviation kurtosis and skewness now let's interpret those look at the arrow points at the bottom what we need to do is compute that kurtosis and then subtract three so if it subtraction results in a kurtosis that's positive we say that's lepto if it's less than zero we say that's platy and then if it equals zero then we have the normal distribution and let's finalize this slide deck with what i consider to be a really important los we're going to talk about correlations and covariances throughout level one and level two and level three let's go ahead and start with covariance look at that formula what we're doing now remember we have two variables so we're taking the observation every observation for the x variable minus its mean and then we're going to multiply it by every observation of the y variable minus its mean right so we're taking x i minus x bar times y i minus y bar and we'll divide by the n minus 1 our regular degrees of freedom there's the sample covariance between two variables and of course in good financial analysis there are tons and tons of variables out there that lend themselves to the question hey are these two variables related so covariance is a measure of the strength and the magnitude of the relationship between two variables i mean maybe we think maybe we think that changes in gdp are going to have a strong covariance between changes in stock returns ah the economy leads to performance on the new york stock exchange let's go ahead and compute that covariance but notice here we don't have to compute it all we have to do is interpret it and let me go ahead and pause and give you my kind of a sense of covariance when you calculate covariance it can be almost any number i mean it could be a million on the positive side it could be 0.45 it could be zero it could be a minus 0.8 could be a minus 35 and it could be a minus 2 billion so i want you to think about this as i'm widening my hands the term covariance and the statistic covariance can be almost any number and so how do you how do you interpret a co-variance of six million eight hundred and forty-five i mean co-variance is tough to uh it's tough to interpret that's why really smart men and women have said let's standardize the covariance into something that's more manageable so we're going to learn this standardization technique as we move through these slide decks we take a variable that has a covariance that's this wide can you guys even see my hands and we put it in a vice and we squeeze or we squeeze it all the way down to something that's manageable and that's all correlation coefficient is you ready for this covariance is a measure of the strength and direction of the relationship between two variables correlation has the exact same definition but since we standardize it we force that relationship to be linear and by standardizing all we're going to do is take look at the formula we've got the covariance in the numerator and we're going to divide it by the product of the two standard deviations so that's what we do in economics and in finance and statistics to standardize a number we just divide by standard deviation since we have two numbers here we divide by the product of those two standard deviations and so the squeezing in the vice says something like this oh oh these correlation coefficients have to be either a minus one or plus one or something in between and so i want you to think about it this way here i always tell my students this and i go stand in front of the room and i show them these steps because my my hands are feet and so one variable goes like this if the other variable goes like this can you guys see that so whatever one does the second variable does exactly the same that's a correlation coefficient of plus one now if the variables go like this if this one moves out this way and this one moves in the opposite direction but in the same magnitude and no matter what this one does this one does the opposite that's a correlation coefficient of a minus one and for those of you who've ever watched seinfeld think of that as the george costanza there's an episode where george does the opposite of everything that he's done his entire life and he becomes super successful but of course most finance and economic and accounting variables don't have a correlation coefficient that is perfectly minus one or perfectly plus one so i want you to think about this suppose this variable goes like this and this variable goes 75 of the way and no matter what this one does this one goes 75 in the same direction that's a correlation coefficient of 0.75 now don't ever tell your stats professors i did this because it doesn't work on a one-to-one on a daily or a monthly basis but over time on average when one variable goes like this the other variable will do this three-fourths of that way and that's a great interpret correlation between two variables and here's some good pictures here strong positive and and strong negative correlation if the line that describes the distance between those two variables is pretty close to all the data points if it's around it there's weak correlation and then look on the bottom right there's no correlation at all now here's uh here's the great caveat with correlation i could i could have one of my sons go outside every day and shoot ten foul shots and compute the number of made foul shots during the course of a day right that number has to be between one and ten oh oh i'm guessing that my children are good enough to make at least one out of those 10 foul shots so let's suppose that i we do this for 100 days and my son may you know some days he makes 2 and 8 and 10 and 4 and 6. and i collect data on the delivery time from the amazon guy because we get a package delivered to us every day and somehow somehow the number of foul shots that my son makes exactly coincides with the delivery time you know one o'clock and four o'clock and seven o'clock coincides with the number of foul shots that my son makes well boy can we make that conclusion i mean how confident would you be saying okay i know exactly when the package is going to arrive at five o'clock because my son made five uh foul shots that day so look at the third one uh the third point correlation does not imply causation you've heard this many many times from your stats professors so my example there was correlation between two variables due to chance relationships that's probably mine but when we're talking about things like what did i say earlier gdp and stock returns and maybe bond returns and maybe option returns maybe they're related to a third variable and that third variable is influencing that high correlation uh let's go back up to the top here ah they can have a low correlation despite having a strong non-linear relationship so that sounds like a great exam question to me and then we have to worry about outliers as we have done uh in other measures and that takes us through these losses i'm going to go ahead and say focus on los 1 and the final loss i think those are great ones measures of central tendency but then you have to know all of those other losses and then don't forget about correlation that's super important [Music]