Bivariate correlation: An introduction to the Pearson correlation coefficient

The Pearson correlation coefficient, named after Karl Pearson, is a statistical measure that quantifies the linear relationship between two metric variables. Here, we will take a closer look at how to calculate and interpret it.

Definition and Interpretation of the Pearson Coefficient

The formula for the Pearson correlation coefficient is:

Interpretation of the Correlation Coefficient

The value of r ranges between -1 and +1:

  • +1: Perfect positive correlation (when one variable increases, the other increases proportionally).
  • 0: No linear correlation (no linear relationship between the variables).
  • -1: Perfect negative correlation (when one variable increases, the other decreases proportionally).

The strength of the relationship is often interpreted as follows:

Correlation coefficient (r)Strength of relationship
0.0 to 0.2Very weak
0.2 to 0.4Weak
0.4 to 0.6Moderate
0.6 to 0.8Strong
0.8 to 1.0Very strong

Sometimes, it is necessary to transform variables before carrying out the actual hypothesis test. This is not a problem—the result of the correlation will not change (apart from possibly the sign), as long as the transformation is linear. This is also referred to as the scale independence of r.

Visualizing relationships

Scatterplots are useful for gaining a better understanding of the relationship between two variables. An example of a strongly positive scatterplot shows how the points lie close to an upward-sloping line.

Conditions for application

To apply the Pearson correlation coefficient meaningfully, the following conditions should be met:

Metric levels of measurement: Both variables must be measured at the metric level. You either know this based on how the data are defined or because they empirically “look that way” (e.g., decimal places, many different values, etc.). If one of the variables is only measured at the ordinal level, you should switch to a rank correlation .

Linear relationship: The relationship should be approximately linear. You can check this by looking at a scatterplot. Can you imagine a straight line that summarizes the point cloud reasonably well? What we definitely do not want to see is a (inverted) U: that would be a non-linear relationship!

Normal distribution: Both variables should be approximately normally distributed. If that is not the case, Spearman’s rank correlation may be a suitable alternative. Here, too, a visual analysis of the histograms is useful. If you want to know for sure, there are of course also statistical tests for this, such as the Shapiro–Wilk test.

No outliers: Extreme values can strongly influence the correlation coefficient.

Critical values of the correlation

To estimate the statistical significance of the hypothesis test, we can use a table of critical values for comparison. The sample size n is particularly important, as it determines which row we need to look at in the table. If we then find an r that is at least as large as the critical value in the corresponding row (note that these are absolute values!), we can assume statistical significance (p < 0.05).

Degrees of freedom: n â€“ 2(absolute) Critical values
10.997
20.950
30.878
40.811
50.754
60.707
70.666
80.632
90.602
100.576
110.555
120.532
130.514
140.497
150.482
160.468
170.456
180.444
190.433
200.423
210.413
220.404
230.396
240.388
250.381
260.374
270.367
280.361
290.355
300.349
400.304
500.273
600.250
700.232
800.217
900.205
1000.195

Example: Examining a Relationship

Imagine you want to examine the relationship between study time (in hours) and test scores. The following values are available for six students:

StudentStudy time (hours) XTest score Y
A250
B360
C580
D470
E690
F140

Here you can find the calculation in Google Sheets:

Limitations and Caution When Interpreting Results

  1. Correlation is not causation: Even if two variables are correlated, this does not mean that one causes the other.
  2. Linear relationships only: The Pearson coefficient measures exclusively linear relationships. Nonlinear relationships are not captured.
  3. Influence of outliers: Individual extreme values can significantly distort the value of r.

Applications of the Pearson Coefficient

The Pearson correlation coefficient is used in many fields, including (for example):

  1. Psychology: The relationship between IQ and academic performance.
  2. Medicine: The relationship between the dose of a medication and its effect.
  3. Economics: The relationship between marketing expenditure and revenue.

Conclusion

The Pearson correlation coefficient is a valuable tool for analysing linear relationships between two variables. However, using it requires care, particularly with regard to its assumptions and the interpretation of the results. With suitable visualisations and complementary measures, it can nevertheless provide deeper insights into the data.