Answer to Class Exercise, Forecasting with Regression BSNS2120

advertisement
Answer to Class Exercise, Forecasting with Regression
BSNS2120, J. Wang
Name _Jinchang Wang______
Do forecasting for the 1st and second quarters of 2011 by using multiple regression
approach considering seasonal variations.
Year
2007
2008
2009
2010
Quarter
1st
2nd
3rd
4th
1st
2nd
3rd
4th
1st
2nd
3rd
4th
1st
2nd
3rd
4th
Actual sales (units)
483
415
603
655
581
524
687
744
603
565
757
789
636
592
806
843
Define variables:
Y = Sales in units
X1 = Period series number (1, 2, 3, 4, 5, 6, 7, …)
X2 = 1 if the 2nd season of a year, X2=0 otherwise.
X3 = 1 if the 3rd season of a year, X3=0 otherwise.
X4 = 1 if the 4th season of a year, X4=0 otherwise.
With the above definitions, the values of X2, X3, and X4 determine the season of a period:
(X2, X3, X4) = (0, 0, 0)
=>
__1st__ season of a year,
(X2, X3, X4) = (1, 0, 0)
=>
__2nd_ season of a year,
(X2, X3, X4) = (0, 1, 0)
=>
__3rd__ season of a year,
(X2, X3, X4) = (0, 0, 1)
=>
__4th__ season of a year.
1
Data to be entered into QM:
Year
Quarter
Y
2007
1st
483
2nc
415
3rd
603
4th
655
2008
1st
581
2nc
524
3rd
687
4th
744
2009
1st
603
2nc
565
3rd
757
4th
789
2010
1st
636
2nc
592
3rd
806
4th
843
X1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
X2
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
X3
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
X4
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
QM outcomes:
Module/submodule: Forecasting / Least Squares - Simple and Multiple
Regression
Problem title: Class Exercise
Results ---------Summary of Forecasting Results
Error Measures
Bias (Mean Error)
MAD (Mean Absolute Deviation)
MSE (Mean Squared Error)
Standard Error
0.0
14.4344
314.7963
18.3244
Regression line
Sales Y = 473.3313
+ 14.6312 * X1
-66.3813 * X2
+ 108.2375 * X3
+ 138.1063 * X4
Statistics
Correlation coefficient
Coefficient of determination (r^2)
0.9885
0.9772
The regression equation derived by QM is: (keep two digits after decimal point)
Y = 473.33 + 14.63X1 – 66.38X2 +108.24X3 + 138.11X4
2
For the 3rd quarter, 2007, X1=_3 ___, X2=_0_____, X3=_1_____, X4=_0_____.
Plug into the regression equation, and the forecast is:
Y = 473.33 + 14.63*3 – 66.38*0 +108.24*1 + 138.11*0
= 473.33 + 14.63*3 +108.24*1
= 625.46
For the 4th quarter, 2009, X1=_12____, X2=_0_____, X3=_0_____, X4=_1_____.
Plug into the regression equation, and the forecast is:
Y = 473.33 + 14.63*12 – 66.38*0 +108.24*0 + 138.11*1
= 473.33 + 14.63*12 + 138.11*1
= 787
For the 3rd quarter, 2010, X1=_15____, X2=_0_____, X3=_1_____, X4=_0_____.
Plug into the regression equation, and the forecast is:
Y = 473.33 + 14.63*15 -66.38*0 +108.24*1 + 138.11*0
= 473.33 +14.63*15 + 108.24*1
= 801.02
For the 1st quarter, 2011, X1=_17____, X2=_0_____, X3=_0_____, X4= _0_____.
Plug into the regression equation, and the forecast is:
Y = 473.33 + 14.63*17 – 66.38*0 +108.24*0 + 138.11*0
= 473.33 +14.63*17
= 722.04
For the 2nd quarter, 2011, X1=_18____, X2=_1_____, X3=_0_____, X4=_0_____.
Plug into the regression equation, and the forecast is:
Y = 473.33 + 14.63*18 – 66.38*1 +108.24*0 + 138.11*0
= 473.33 + 14.63*18 – 66.38*1
= 670.29
For the 3rd quarter, 2011, X1=_19_____, X2=_0_____, X3=_1_____, X4=_0______.
Plug into the regression equation, and the forecast is:
Y = 473.33 + 14.63*19 – 66.38*0 +108.24*1 + 138.11*0
= 473.33 + 14.63*19 +108.24*1
= 859.54
What if we take two seasons in a year: Season 1 is composed of Qtr. 1 and 2, Season 2 is
composed of Qtr. 3 and 4? Define regression variables:
Y = Sales in units
X1 = Period series number (1, 2, 3, 4, 5, 6, 7, …)
X2 = 1 if the 2nd season of a year (i.e. Qtr 3 or Qtr 4), X2=0 otherwise (i.e. Qtr 1 or Qtr 2).
3
Download