Lec 12
Lec 12
Lec 12
Javed Iqbal
Range of R2 values : 0 ≤ 𝑅2 ≤ 1
(∑ 𝒙) 𝟐 (∑ 𝒚)𝟐 (∑ 𝒙)(∑ 𝒚)
𝑺𝒙𝒙 = ∑ 𝒙𝟐 − , 𝑺𝑺𝑻 = 𝑺𝒚𝒚 = ∑ 𝒚𝟐 − , 𝑺𝒙𝒚 = ∑ 𝒙𝒚 − ,
𝒏 𝒏 𝒏
𝑆𝑆𝑅
R2 = = 0.853: 85.3% variation in selling price of Orion cars is explained by
𝑆𝑆𝑇
their age.
Hence the age of a car is a very good predictor of its price.
Do it for Ex 14.60 (Home price, square feet data)
n = 9, ∑ 𝑥 = 20682, ∑ 𝑦 = 3487.1, ∑ 𝑥𝑦 = 9254378, ∑ 𝑥 2 =
57414186, ∑ 𝑦 2 = 1590653,
206822
𝑆𝑥𝑥 = 57414186 − = 9886950
9
(20682)(3487.1)
𝑆𝑥𝑦 = 9254378 − = 1241023
9
3487.12
𝑆𝑆𝑇 = 𝑆𝑦𝑦 = 1590653 − = 239556.4
9
12410232 155774.7
𝑆𝑆𝑅 = = 155774.7 𝑅2 = = 0.650
9886950 239556.4
65% variation in sale prices of homes is explained by their living area so living
area is a good predictor of house prices
The sign of the correlation coefficient is same as the sign of the slope coefficient (b1)
in regression.
Weiss Fig 14.18, p-669 for a visual idea of correlation and interpretation.
Note that while R2 is the square of correlation (r) between y and x, the interpretation
of R2 is very different from the r.
Example 14.13, p-670: For the Orion example, R2 was 0.853, hence magnitude of
correlation coefficient is: √0.853 = 0.924. As the sign of relationship between age
and price of car is negative hence r = -0.924. This indicates very strong negative
correlation between age and price of Orion.
Anderson Ex 7, p-572: For this data find and interpret the coefficient of
determination and coefficient of correlation.
(𝑆𝑥𝑦 )2 (568)2
𝑆𝑥𝑥 = 142, 𝑆𝑥𝑦 = 568, 𝑆𝑦𝑦 = 2442, 𝑆𝑆𝑅 = = = 2272
𝑆𝑥𝑥 142
R2 = SSR/ SST = 2272/2442 = 0.930
R2 = 0.93: 93% variation in sales is explained by years of experience of
salesperson through this model.
y
4.5
4
3.5
3
2.5
2
1.5
1
0.5
0
-3 -2 -1 0 1 2 3
x
HW: