# Introduction to Correlation

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

# 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

**increases, then**

*X***and**

*X***are positively correlated as shown below:**

*Y*# Negative Correlation

If variable ** Y** decreases when variable

**increases, then**

*X***and**

*X***are negatively correlated as shown below:**

*Y*# No correlation

When there is no obvious relationship between ** X** and

**Y**, we say

**X**and

**are uncorrelated, as shown below:**

*Y*