Exercise Set 1 Solution Key
Exercise Set 1 Solution Key
Key
Solution # 1
Part a.
Demand plot is as follows:
110
100
90
80
Demand
70
60
50
40
1 2 3 4 5 6 7 8 9 10 11 12
Year
Part b.
By simple regression model we mean that the forecasting model should be in
the form x̂t = α̂0 + α̂1 t where x̂t : the forecasted demand at time t, α̂0 : the
estimated intercept of the line, and α̂1 : the estimated slope of the line.
n
X 2
SSE = (xt − x̂t )
t=1
n
X 2
SSE = (xt − α̂0 − α̂1 t)
t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t)
∂ α̂0 t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t) t
∂ α̂1 t=1
1
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
n
X n
X n
X
α̂0 t + α̂1 t2 = txt
t=1 t=1 t=1
t t2 xt txt
1 1 50.7 50.7
2 4 55.4 110.8
3 9 59.6 178.8
4 16 61.0 244.0
5 25 58.0 290.0
6 36 60.5 363.0
7 49 66.0 462.0
8 64 70.5 564.0
9 81 77.8 700.2
10 100 87.6 876.0
11 121 94.8 1042.8
12 144 100.7 1208.4
78 650 842.6 6090.7
By solving the equations we get α̂0 = 42.32 and α̂1 = 4.29. So the desired
regression model is x̂t = 42.32 + 4.29t. The demand forecast for year 13 can be
found as x̂13 = 42.32 + 4.29 ∗ 13 = 98.09
Part c.
To construct the prediction interval we need the mean and the variance of the
estimate. The mean of the estimate is given in part (b) as 98.09 and the variance
of the forecast (z periods ahead) for the simple regression model can be found
by using the following formulas.
Pn 2
2 t=1 (xt − x̂t )
S =
n−2
( )
2
1 [(n + z) − t̄]
Sf2 = S 2
1 + + Pn 2
n t=1 (t − t̄)
2
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
318.26
S2 = = 31.83
12 − 2
( )
2
1 [(12 + 1) − 6.5]
Sf2 = 31.83 1 + + = 43.88
12 143
Part d.
Coefficient of determination shows the percentage of explained variation in the
dependent variable using the regression model.
n
X n
X n
X
(xt − x̄)2 = (x̂t − x̄)2 + (xt − x̂t )2
t=1 t=1 t=1
| {z } | {z } | {z }
SST otal SSRegression SSError
SSError
r2 = 1−
SST otal
3
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
318.26
r2 = 1− = 0.8922
2952.88
r = 0.9446
4
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
Solution # 2
Part a.
y = x/(α0 x − α1 ) is a nonlinear forecast function. In order to minimize the sum
of squared errors (SSE ), we should transform it into a linear model. ý = 1/y
and x́ = 1/x then ý = α0 − α1 x́
n
X 2
SSE = ýx − ýˆx
x=1
Xn
2
SSE = (ýx − α̂0 + α̂1 x́)
x=1
n
∂SSE X
= −2 (ýx − α̂0 + α̂1 x́)
∂ α̂0 x=1
n
∂SSE X
= 2 (ýx − α̂0 + α̂1 x́) x́
∂ α̂1 x=1
By solving the equations we get α̂0 = 0.0223 and α̂1 = -0.1471. So the desired
regression model is ýˆx = 0.0223 + 0.1471x́. The demand forecast for year 11 can
be found as ŷ11 = 1/(0.0223 + 0.1471 ∗ 1/11) = 28.0326
5
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
Part b.
x ¯ 2
(ýx − ý) (ýx − ýˆx )2
1 1.025E-02 7.471E-06
2 1.195E-03 1.722E-05
3 7.476E-05 7.512E-06
4 2.325E-05 2.344E-06
5 1.637E-04 8.310E-07
6 3.415E-04 1.734E-08
7 5.150E-04 3.355E-07
8 6.790E-04 1.736E-06
9 8.216E-04 3.533E-06
10 9.576E-04 6.387E-06
1.502E-02 4.739E-05
4.739E − 05
r2 = 1− = 0.9968
1.502E − 02
r = 0.9984
6
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
Solution # 3
Part a.
Demand plot is as follows:
240
220
200
Demand
180
160
140
120
100
80
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Month
Part b.
Let’s define our regression model as x̂t = α̂0 + α̂1 t + α̂2 sin(2πt/p) where x̂t :
the forecasted demand at time t, α̂0 : intercept of the forecasted demand, α̂1 :
slope of the forecasted demand, α̂2 : amplitude of the forecasted demand, and
p : number of observations in a seasonal path.
n
X 2
SSE = (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p))
t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p))
∂ α̂0 t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p)) t
∂ α̂1 t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p)) sin(2πt/p)
∂ α̂2 t=1
7
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
t xt t2 sin( 2πt
p ) txt tsin( 2πt
p ) xt sin( 2πt
p ) sin( 2πt
p )
2
By solving the equations we get α̂0 = 88.90, α̂1 = 8.67 and α̂2 = 27.76. So the
desired regression model is x̂t = 88.90 + 8.67t + 27.76 sin(2πt/p).
Part c.
t x̂t (xt − x̄)2 (xt − x̂t )2
1 111.452 3927.111 131.152
2 130.288 1820.444 105.836
3 142.681 513.778 7.187
4 147.635 7.111 152.888
5 146.147 58.778 78.370
6 140.940 160.444 82.084
7 135.733 312.111 85.884
8 134.245 513.778 33.123
9 139.199 765.444 17.633
10 151.592 312.111 43.459
11 170.428 7.111 108.740
12 192.983 1393.778 49.242
13 215.538 2240.444 30.666
14 234.373 4533.778 19.125
15 246.766 7627.111 10.456
24193.333 955.842
955.842
r2 = 1− = 0.9605
24193.333
r = 0.9800
8
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key
Part d.