Introduction to Correlation

Learn the basics of correlation and its use in data science and machine learning

Benjamin Obi Tayo Ph.D.

--

Image by Author.

About the Author

Benjamin O. Tayo is a data science educator, tutor, coach, mentor, and consultant. Contact me for more information about our services and pricing: benjaminobi@gmail.com

Dr. Tayo has written close to 300 articles and tutorials in data science for educating the general public. Support Dr. Tayo’s educational mission using the links below:

PayPal: https://www.paypal.me/BenjaminTayo

CashApp: https://cash.app/$BenjaminTayo

INTRODUCTION

After reading this article, the reader will learn the following:

  • Definition of correlation
  • Positive Correlation
  • Negative Correlation
  • Uncorrelation
  • Mathematical Definition of Correlation
  • Python Implementation of Correlation Coefficient
  • Covariance Matrix
  • Python Implementation of Covariance Matrix

Correlation

Correlation measures the degree of co-movement of two variables.

Positive Correlation

If variable Y increases when variable X increases, then X and Y are positively correlated as shown below:

Positive correlation between X and Y. Image by Author.

Negative Correlation

If variable Y decreases when variable X increases, then X and Y are negatively correlated as shown below:

Negative correlation between X and Y. Image by Author.

No correlation

When there is no obvious relationship between X and Y, we say X and Y are uncorrelated, as shown below:

--

--

Benjamin Obi Tayo Ph.D.

Dr. Tayo is a data science educator, tutor, coach, mentor, and consultant. Contact me for more information about our services and pricing: benjaminobi@gmail.com