# Pearson’s correlation coefficient

Pearson's correlation coefficient ($$r$$) is used to describe the correlation between two variables with a linear relationship.

Pearson’s correlation coefficient ((r)) is used to describe the correlation between two variables with a linear relationship. (r) varies from -1 to +1, where:

• -1 represents a strong, negative correlation

• 0 represents no linear relationship between variables

• +1 represents a strong positive correlation

The image below shows how (r) varies depending on the relationship.

## Calculating r

You can calculate r manually using the following commonly used formula:

[r=frac{nleft(sum xyright)-left(sum xright)left(sum yright)}{sqrt{[nsum x^2 – left(sum xright)^2][nsum y^2 – left(sum yright)^2]}}]

But this can be quite time consuming. Thankfully tools like Excel and Tableau provide functionality to calculate this for us.