The Pearson Correlation Coefficient, Explained Simply
towardsdatascience.com·6h
Flag this post

build a regression model, which means fitting a straight line on the data to predict future values, we first visualize our data to get an idea of how it looks and to see the patterns and relationships.

The data may appear to show a positive linear relationship, but we confirm it by calculating the Pearson correlation coefficient, which tells us how close our data is to linearity.

Let’s consider a simple Salary Dataset to understand the Pearson correlation coefficient.

The dataset consists of two columns:

YearsExperience: the number of years a person has been working

Salary (target): the corresponding annual salary in US dollars

Now we need to build a model that predicts salary based …

Similar Posts

Loading similar posts...