[MUSIC] Covariance gives us some information about relation between two variables. There is another coefficient that can be used for similar objective, but has a little bit different and in some cases a little bit better properties. This coefficient is called correlation. Actually, correlation is strictly related to covariance. Correlation of two variables X and Y is equal to covariance of X and Y divide by the square root of the product of their variances Let us again consider a case of perfect linear relationship, let us assume that Y = kX+b. What is correlation between X and Y in this case? Let us calculate. Correlation between X and Y is equal to correlation between X and kX+b. And we can use properties of covariance now. This is equal to covariance of X, kX+ b over square root of variance X times variance kX+b. We know from previous that this covariance is equal to k times variance X. And in the denominator, we have the following. Here we have variance X and here we have some linear transformation of variance. Again, we can use properties of variance. This plus b doesn't change variance. So we have just variance X, times variance kX. K is a constant, and we can move it out of the variance. But we have to take a square of k. Due to the properties of variance we discussed before. So we have k times Variance X over square root of k square times Var X square. Variance is positive so square root of variance square is equal to just simple variance X. But k can be either positive or negative. So, we have k times variance X here, over absolute value of k, times variance X. Now we see that these two variances in the numerator and denominator cancel each other. And here we have k over absolute value of k, this value. Is equal to 1 if k is positive. And negative 1 if k is negative. It is not defined if k is equal to 0. So we see that if there is perfectly linear relationship between two random variable. Like this one, when you know X, you can calculate Y as a linear function of X. Then correlation between these two variables is equal either to 1 or to -1, depending on the sign of this coefficient k. This makes correlation a perfect measure of linear relationship between two random variables. We'll meet with correlation in course of statistics. Let me state some properties of correlation. If I multiply one of the variables for which correlation is calculated, the correlation does not change if this coefficient is positive. It means that re-scaling of a random variable does not change the correlation. It is a very useful property. Then, correlation of two variables lie on the segment from negative 1 to 1. If correlation is equal to plus or minus 1, it means that Y is equal to kX + b and the sign of k depends on the sign of correlation. If correlation between two variable is 0. It means that their covariance is also 0. And vice versa. So two variables with 0 covariance are also called uncorrelated. As we discussed before, if the variables are independent, they are uncorrelated, but the inverse possibly is not true. As I said, we'll return to correlation in the course of statistics, and we will use it as a tool that allow us to investigate relationships between two variables. [MUSIC]