2024-04-07

What is Correlation?

A test of correlation in data with two variables measures how the value of one changes when the value of the second also changes. We can learn the strength of the relationship between the two variables and the direction in which they’re affected.

Pearson Product-Moment Correlation

A common way of quantifying the strength and direction of the relationship between two variables is the Pearson Product-Moment Correlation, denoted by r. The values for this correlation range from -1 to 1 where -1 is a perfect negative correlation between the data and 1 is a perfect positive correlation. While the positive and negative sign observe the direction of the correlation, strength is measured by how close the r value is to -/+1.

Positive Correlations

A positive correlation is any r value greater than zero. Below is an example of a positive correlation that shows as the variable on the x-axis increases, so does the variable on the y axis. Strong positive correlations have r values closer to 1.

Negative Correlations

A negative correlation is any r value below 0. Below is an example of a negative correlation that shows as the variable on the x-axis increases, the variable on the y-axis decreases and vice versa. Strong negative correlations have r values closer to -1.

No Correlation

The graph of a set of data whose variables have virtually no correlation would look like this. Data with little to no correlation will have r values closer to 0.

Formula

To calculate Pearson’s r you need to know the values of the both variables and the sample size (N).

\[ r = \frac{N\sum{xy} - (\sum{x}\sum{y})}{\sqrt{[N \sum{x^2} - (\sum{x})^2][N \sum{y^2} - (\sum{y})^2}]} \]

Factors to Keep in Mind

  • A correlation is rarely ever perfect.
  • Pearson’s r only works for interval/ratio variables.
  • Correlation does not mean the finding is significant.
  • Even with a significant correlation between two variables be aware there may exist a third variable, known as a confounding variable, that causes the correlation.

Thank you for your time!