CORRELATION1
CORRELATION1
that exists between two variables and it takes the range of value
−1 ≤ 𝑟 ≤ +1.
CORRELATION
If X and Y have a strong negative linear correlation, r is close
to −1. If X and Y have a perfect positive linear correlation or
a perfect negative linear correlation, r is equal to +1 or −1
respectively. If there is no linear correlation or a weak linear
correlation, r is close to 0.
relationship.
CORRELATION
Example 1
The data below shows the GDP (billion naira) and Carbon-dioxide emission (million metric
tones) for Nigeria. Determine whether there exists negative or positive linear correlation or
no linear correlation.
GDP X Carbondioxide Y
1.6 428.2
3.6 828.8
4.9 1214.2
1.1 444.6
0.9 264.0
2.9 415.3
2.7 571.8
2.3 454.9
1.6 358.7
1.5 573.5
CORRELATION
Solution
N= 10,
𝑛 𝑛 𝑛
𝑛 𝑖=1 𝑥𝑦 − 𝑖=1 𝑋 𝑖=1 𝑌
r=
𝑛 𝑛 2 𝑛 𝑋 2 − 𝑛 𝑛 2 𝑛 𝑌 2
𝑖=1 𝑋 − 𝑖=1 𝑖=1 𝑌 − 𝑖=1
Solution (Cont’d)
27,439.7
r= = 0.882
139.89 6,911,5116
Interpretation: As the gross domestic product increases, the carbon dioxide emissions also
increase.
CORRELATION
Example 2
X 1 3 4 6 8 9 11 14
Y 1 2 4 4 5 7 8 9
CORRELATION
Solution
S/N X Y XY 𝑿𝟐 𝒀𝟐
1 1 1 1 1 1
2 3 2 6 9 4
3 4 4 16 16 16
4 6 4 24 36 16
5 8 5 40 64 25
6 9 7 63 81 49
7 11 8 88 121 64
8 14 9 126 196 81
Total 𝑿 = 𝟓𝟔 𝒀 = 𝟒𝟎 𝑿𝒀 𝑿𝟐 𝒀𝟐
= 𝟑𝟔𝟒 = 𝟓𝟐𝟒 = 𝟐𝟓𝟔
𝑛 𝑛 𝑛
𝑛 𝑖=1 𝑥𝑦 − 𝑖=1 𝑋 𝑖=1 𝑌
r= , n=8
𝑛 𝑛 2 𝑛 𝑋 2 − 𝑛 𝑛 2 𝑛 𝑌 2
𝑖=1 𝑋 − 𝑖=1 𝑖=1 𝑌 − 𝑖=1
Solution (Cont’d)
8 364 − 56 40
r=
8 524 −56 2 8 256 −40 2
r = 0.977
Interpretation
This indicates a very strong positive linear relationship between the variable. As “X”
cases where there are ties, the average of the rank is taken.
+1
SPEARMAN RANK CORRELATION
defined as;
6 𝑑2
𝑟 = 1 − 𝑛 (𝑛 2 −1)
The table below shows the number of malaria infected individuals for
n=8.
6 𝑑2
𝑟 =1−
𝑛(𝑛2 − 1)
Solution (Cont’d)
6(5.5)
𝑟 =1− = 0.935
8(82 − 1)
6 𝑑2
𝑟 =1−
𝑛(𝑛2 − 1)
Solution (Cont’d)
6(30)
r=1− 2
= 0.82
10(10 − 1)