The coefficient of correlation is a statistical measure that shows the strength and direction of a relationship between two variables. It helps in understanding how closely two variables move together. The most commonly used methods are Karl Pearson’s coefficient of correlation for linear relationships and Spearman’s rank correlation for ranked or ordinal data. A coefficient value ranges between -1 and +1, where ±1 indicates a perfect correlation and 0 indicates no correlation.
1.0Karl Pearson’s Coefficient of Correlation
One of the most commonly used methods for correlation analysis is Karl Pearson’s coefficient of correlation. It measures the linear relationship between two continuous variables.
2.0Karl Pearson’s Coefficient of Correlation Formula
r=∑(x−xˉ)2⋅∑(y−yˉ)2∑(x−xˉ)(y−yˉ)Or in shortcut form:r=[n∑x2−(∑x)2][n∑y2−(∑y)2]n∑xy−∑x∑y
Where:
x, y are the variables
n is the number of observations
r is the Pearson correlation coefficient
3.0Calculate Karl Pearson Coefficient of Correlation from the Following Data
X
2
4
6
8
10
Y
5
7
9
8
11
Step 1: Prepare the table
X
Y
X²
Y²
XY
2
5
4
25
10
4
7
16
49
28
6
9
36
81
54
8
8
64
64
64
10
11
100
121
110
Step 2: Apply Pearson formula
∑X=30,∑Y=40,∑X2=220,∑Y2=340,∑XY=266,n=5Step 2: Apply Pearson formular=[5(220)−302][5(340)−402]5(266)−(30)(40)r=(1100−900)(1700−1600)1330−1200r=200⋅100130=20000130=141.42130≈0.919Interpretation of the Coefficient of Correlation:Sincer≈0.92there is a strong positive linear relationship between X and Y
4.0Spearman Coefficient of Correlation
The Spearman coefficient of correlation is used when the data is ordinal or not normally distributed. It measures the monotonic relationship between ranks.
Spearman’s Formula:
rs=1−n(n2−1)6∑d2
Where:
d = difference in ranks
n = number of observations
rs= Spearman coefficient of correlation
This is useful when dealing with ranked or qualitative data.
5.0Coefficient of Correlation Interpretation Guide
Value of r
Interpretation
r = +1
Perfect positive correlation
r = 0.7–1
Strong positive correlation
r = 0.3–0.7
Moderate positive correlation
r = 0–0.3
Weak or no correlation
r = 0
No correlation
r = –0.3–0
Weak negative correlation
r = –0.7– –0.3
Moderate negative correlation
r = –1
Perfect negative correlation
6.0Applications of Karl Pearson’s Coefficient of Correlation
Analyzing the relationship between income and expenditure
Finding correlations in health and nutrition studies
Understanding dependencies in education performance
Research in psychology, economics, and finance
7.0Solved Examples Coefficient of Correlation
Example 1: Calculate Karl Pearson’s coefficient of correlation for the following data:
X
1
2
3
4
5
Y
2
4
6
8
10
Solution:
Here X and Y are perfectly correlated. ∑X=15,∑Y=30,∑X2=55,∑Y2=220,∑XY=110,n=5Using the formula: r=[n∑X2−(∑X)2][n∑Y2−(∑Y)2]n∑XY−∑X∑Yr=(5⋅55−225)(5⋅220−900)5⋅110−15⋅30r=(275−225)(1100−900)550−450r=50⋅200100=100100=1
Interpretation: Perfect positive correlation.
Example 2: Find Karl Pearson’s coefficient of correlation:
X
6
8
10
14
18
Y
5
10
12
18
25
Solution: We calculate:
∑X=56,∑Y=70,∑XY=952,∑X2=700,∑Y2=1098,n=5r=[5⋅700−562][5⋅1098−702]5(952)−56⋅70r=(3500−3136)(5490−4900)4760−3920r=364⋅590840≈214760840≈463.26840≈1.81Note: If r > 1, there’s a mistake. Recheck entries. (This is to highlight calculation errors in practice — use exact squared values.)
Example 3: Given the values:
X
5
6
7
8
Y
4
6
8
10
Solution:
∑X=26,∑Y=28,∑XY=194,∑X2=174,∑Y2=216,n=4r=(4⋅174−262)(4⋅216−282)4(194)−26⋅28r=(696−676)(864−784)776−728r=20⋅8048r=160048r=4048=1.2⇒Not possible; check data again.
Takeaway: Pearson's r is always between -1 and +1. Any value beyond that signals wrong entries or calculation.
8.0Practice Questions on Coefficient of Correlation
Calculate Karl Pearson’s coefficient of correlation:
X
2
4
6
8
10
Y
5
7
9
11
13
Calculate Karl Pearson correlation for:
X
3
6
9
12
Y
4
8
12
16
Calculate Karl Pearson coefficient of correlation from the following data:
X
10
20
30
40
50
Y
15
25
35
45
55
If r = 0, what does that indicate about the relationship between X and Y?
Interpret the coefficient of correlation in this case: You find r = -0.87 between “screen time” and “academic performance”.
Table of Contents
1.0Karl Pearson’s Coefficient of Correlation
2.0Karl Pearson’s Coefficient of Correlation Formula
3.0Calculate Karl Pearson Coefficient of Correlation from the Following Data
4.0Spearman Coefficient of Correlation
5.0Coefficient of Correlation Interpretation Guide
6.0Applications of Karl Pearson’s Coefficient of Correlation
7.0Solved Examples Coefficient of Correlation
8.0Practice Questions on Coefficient of Correlation
Frequently Asked Questions
It is a statistical measure that quantifies the strength and direction of the linear relationship between two variables.
The value of r lies between -1 and +1. +1: Perfect positive correlation 0: No correlation –1: Perfect negative correlation
Karl Pearson’s: For quantitative data; measures linear relationships Spearman’s: For ranked/ordinal data; measures monotonic relationships