Covariance, correlation and R-squared

The complete guide to understand covariance, correlation and R²

Yassine EL KHAL
8 min readMar 28, 2022
Photo by Yingchih on Unsplash

In the last article we talked deeply about variance and standard deviation and how they will briefly summarize all features for a given data. They are the first impression for a given variable, to see how it is distributed in our sample. Based on those, today we are going to treat three other similar metrics. And instead of treating every feature alone, we’re going to treat them two by two to see if there’s a relationship between them, what kind of relationship and how strong it is. Those metrics are: Covariance, correlation and R². They are very similar to each other in statistics and probability theory. They have a big utility in statistics and machine learning field. So what is the definition behind these metrics? what are the differences between them and how can we use them?

Covariance

Definition

Remember when last time we talked about variance and standard deviation, we have said that these metrics are measuring the spread and the dispersion of the data for a given feature or variable. Covariance uses the same principal but this time between multiple variables. In fact, it generalizes variance notion to the scale of two features. In a nutshell, covariance measures the joint…

--

--

Yassine EL KHAL
Yassine EL KHAL

Written by Yassine EL KHAL

A software and machine learning engineer

Responses (1)