socovariance and correlation give us means of measuring just how tight these things are correlated would expect very low correlation or covariance for the data in the left scatter plotbut very high covariance and correlation for the data in the right scatter plot so that' the concept of covariance and correlation it measures how much these two attributes that ' measuring seem to depend on each other measuring covariance measuring covariance mathematically is little bit hardbut 'll try to explain it these are the stepsthink of the data sets for the two variables as high-dimensional vectors convert these to vectors of variances from the mean take the dot product (cosine of the angle between themof the two vectors divide by the sample size it' really more important that you understand how to use it and what it means to actually derive itthink of the attributes of the data as high dimensional vectors what we're going to do on each attribute for each data point is compute the variance from the mean at each point so now have these high dimensional vectors where each data pointeach personif you willcorresponds to different dimension have one vector in this high dimensional space that represents all the variances from the mean forlet' sayage for one attribute then have another vector that represents all the variances from the mean for some other attributelike income what do then is take these vectors that measure the variances from the mean for each attributeand take the dot product between the two mathematicallythat' way of measuring the angle between these high dimensional vectors so if they end up being very close to each otherthat tells me that these variances are pretty much moving in lockstep with each other across these different attributes if take that final dot product and divide it by the sample sizethat' how end up with the covariance amount now you're never going to have to actually compute this yourself the hard way we'll see how to do this the easy way in pythonbut conceptuallythat' how it works now the problem with covariance is that it can be hard to interpret if have covariance that' close to zerowelli know that' telling me there' not much correlation between these variables at allbut large covariance implies there is relationship but how large is largedepending on the units ' usingthere might be very different ways of interpreting that data that' problem that correlation solves