Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Sichuan University

Homework 2 (100 points)

Course Name:Data Analysis and Decision Making Lecturer:


Student Name
Score: _______________

1. The following table shows Tmall “Double Eleven” Day GMV historical data (2009-2019).

By using the statistical software, we can get the linear regression model for the above
historical data is:

8
where we assume x=1 and y=0.52 (RMB 10 ) in Year 2009, and x=2 and y=9.36 (RMB

8
10 ) in Year 2010, and so on.
(1) Please try to calculate the squared error (SE Line) of the above regression model. (50
points)
(2) Please try to calculate the R 2 (Coefficient of Determination) of the above regression
model. (50 points)
Answer:
(1) Squared error formula: SELine =

With: m = 267.31 & b = -713.26 (as linear regression model)


X Y
1 0.52
2 9.36
3 52
4 191
5 352
6 571
7 912
8 1207
9 1682.69
10 2135
11 2684

 SELine = [0.52 – (1*267.31-713.26)]^2 + [9.36 – (2*267.31-713.26)]^2 + [52 – (3*267.31-


713.26)]^2 + [191 – (4*267.31-713.26)]^2 + [352 – (5*267.31-713.26)]^2 + [571 – (6*267.31-
713.26)]^2 + [912 – (7*267.31-713.26)]^2 + [1207 – (8*267.31-713.26)]^2 + [1682.69 –
(9*267.31-713.26)]^2 + [2135 – (10*267.31-713.26)]^2 + [2684 – (11*267.31-713.26)]^2
= 199335.5 + 35344 + 1344.7 + 27218.4 + 73598.3 + 102144.2 + 60471.7 + 47620 + 96.8 +
30681 + 208712
= 786566.6

(2) Formula:
R2 = 1 - SELine/SEy

y y ̅ (yi-y ̅)^2
0.52 890.5973 792237.6
9.36 890.5973 776579.1
52 890.5973 703245.4
191 890.5973 489436.3
352 890.5973 290087
571 890.5973 102142.4
912 890.5973 458.0767
1207 890.5973 100110.7
1682.69 890.5973 627410.9
2135 890.5973 1548538
2684 890.5973 3216293

 SEy = 8646539
 R2 = 1 – (786566.6/8646539) = 0.91
(The results were rounded)

You might also like