![]() ![]() Now, with all of that out of the way, let's think about how we calculate the correlation coefficient. The exact same way we did it for X and you would get 2.160. Is indeed equal to three and then the sample standard deviation for Y you would calculate The sample mean for Y, if you just add up one plus two plus three plus six over four, four data points, this is 12 over four which Now, this actually simplifies quite nicely because this is zero, this is zero, this is one, this is one and so you essentially get the square root of 2/3 which is if you approximate 0.816. We're talking about sample standard deviation, we have four data points, so one less than four isĪll of that over three. So, one minus two squared plus two minus two squared plus two minus two squared plus three minus two squared, all of that over, since The sample standard deviation for X, we've also seen this before, this should be a little bit review, it's gonna be the square root of the distance from each of these points to the sample mean squared. Just be one plus two plus two plus three over four and this is eight over four which is indeed equal to two. Is quite straightforward to calculate, it would And so, we have the sample mean for X and the sample standard deviation for X. So, we assume that these are samples of the X and the corresponding Y from our broader population. Now, before I calculate theĬorrelation coefficient, let's just make sure we understand some of these other statistics Saying for each X data point, there's a corresponding Y data point. Now, when I say bi-variate it's just a fancy way of Going to do in this video is calculate by hand the correlation coefficientįor a set of bi-variated data. we are moving away from r=0 and closer and closer to the line which has an r of 1. As we rotate our line further and further clockwise we once again pass the perfectly horizontal line (r=0), but this time we are moving into positive territory i.e. A line which is a 'perfect opposite' of r=1 will be r=-1 i.e a downwards sloping line.īut this cannot go on forever. As this line moves further and further from the line which has an r of 0 we are getting closer to the 'opposite' of the line which had an r of positive 1. Do you see what I am getting at? Now r has a negative value. Let's continue rotating our imaginary line clockwise.now we are moving 'beneath' the line which has an r of 0 so we are moving into negative territory. ![]() (Which btw means that a change in X results in no change in Y). Now let's rotate our line clockwise.until the line is a straight horizontal line. This line (r=1) is an upwards sloping line. Here, when we say that r has a value of 1 we are basically saying that on average an increase in X will result in an increase in Y. When it comes to telling the time we refer to the angle of the minute hand by splitting the clock into 60. So imagine the minute hand on a clock which can rotate 360 degrees but is pinned down to the centre of the clock. The least squares line will always go through the mean of X and the mean of Y. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |