SEHH1008 Chapter 04 Correlation and Regression
SEHH1008 Chapter 04 Correlation and Regression
𝑥 21 28 35 37 40 43 48 56
𝑦 21 14 12 5 14 7 10 3
(a) Construct a scatter diagram for the data.
(b) Comment on the relationship between x and y.
20
15
cups)
10
5
0
0 20 40 60
Amount of Sleep (in hours)
20
15
10
0
0 10 20 30 40 50 60
Amount of Sleep (in hours)
High Linear
Correlation
Perfect Linear
Correlation
No Correlation 𝑟 = 0.0
Very Weak Correlation 0.0 < 𝑟 < 0.2
Weak Correlation 0.2 ≤ 𝑟 < 0.4
Moderate Correlation 0.4 ≤ 𝑟 < 0.6
Strong Correlation 0.6 ≤ 𝑟 < 0.8
Very Strong Correlation 0.8 ≤ 𝑟 < 1.0
Perfect Correlation 𝑟 = 1.0
σ 𝑥 , σ 𝑦, σ 𝑥 2 , σ 𝑦 2 and σ 𝑥𝑦
𝑛 σ 𝑥𝑦 − σ 𝑥 σ 𝑦
𝑟=
𝑛 σ 𝑥2 − σ 𝑥 2 𝑛 σ 𝑦2 − σ 𝑦 2
𝑦 66 70 75 69 85 83 95 98
90
80
70
60
50
40
90 100 110 120 130
IQ scores
It appears that as x values increase, y values also tend to
increase. Thus, r should be positive.
SEHH1008 Mathematics and Statistics for College Students 18
Example 2 – Sample Correlation Coefficient r
(b) 𝑥 𝑦 𝑥2 𝑦2 𝑥𝑦
95 66 9025 4356 6270
98 70 9604 4900 6860
100 75 10000 5625 7500
102 69 10404 4761 7038
104 85 10816 7225 8840
110 83 12100 6889 9130
116 95 13456 9025 11020
125 98 15625 9604 12250
σ 𝑥 = 850 σ 𝑦 = 641 σ 𝑥 2 = 91030 σ 𝑦 2 = 52385 σ 𝑥𝑦 = 68908
= 0.934959 = 0.9350
90
80
70
60
50
40
90 100 110 120 130
IQ scores
𝑑
𝑑
𝑑
𝑑
𝑑 𝑑
𝑦ො = 𝑎 + 𝑏𝑥
Estimated y x value
value Intercept Slope of
of the line the line
σ 𝑥 , σ 𝑦, σ 𝑥 2 , σ 𝑦 2 , σ 𝑥𝑦, 𝑥ҧ and 𝑦ത
• 𝑦-intercept a, 𝑎 = 𝑦ത − 𝑏𝑥ҧ
(a) Find the equation of the least-squares line, correct your final
answers to 4 decimal places.
(b) Graph the least-squares line on the scatter diagram constructed
in example 2.
(c) Interpret the meaning of the slope.
(d) Predict the mathematics exam score for a student with IQ score
of 107, correct your final answer to an integer.
SEHH1008 Mathematics and Statistics for College Students 27
Example 3 – Least-squares Line 𝒚
ෝ = 𝒂 + 𝒃𝒙
(a) 𝑥 𝑦 𝑥2 𝑦2 𝑥𝑦
95 66 9025 4356 6270
98 70 9604 4900 6860
100 75 10000 5625 7500
102 69 10404 4761 7038
104 85 10816 7225 8840
110 83 12100 6889 9130
116 95 13456 9025 11020
125 98 15625 9604 12250
σ 𝑥 = 850 σ 𝑦 = 641 σ 𝑥 2 = 91030 σ 𝑦 2 = 52385 σ 𝑥𝑦 = 68908
σ𝑥 850
𝑥ҧ = = = 106.25
𝑛 8
σ𝑦 641
𝑦ത = = = 80.125
𝑛 8
𝑛 σ 𝑥𝑦− σ 𝑥 σ 𝑦 8 68908 − 850 641 6414
𝑏= = = = 1.1174
𝑛 σ 𝑥2− σ 𝑥 2 8 91030 − 850 2 5740
641 850 6414
𝑎 = 𝑦ത − 𝑏𝑥ҧ = − = −38.6010
8 8 5740
110
100
Math exam's scores
90
80
70 ഥ, 𝒚
𝒙 ഥ
60
50
40
90 100 110 120 130
IQ scores
𝑦ො = −38.6010 + 1.1174𝑥
2
𝑛 σ 𝑥𝑦 − σ 𝑥 σ 𝑦
𝑟2 =
𝑛 σ 𝑥2 − σ 𝑥 2 𝑛 σ 𝑦2 − σ 𝑦 2
= 0.874148 ≈ 0.8741
(b) About 87.41% of the variation of mathematics exam score
y can be explained by the corresponding variation in the
IQ score x using the least-squares line.