IEOR 165 Homework 5 Due April 30, 2015

advertisement
IEOR 165 Homework 5
Due April 30, 2015
Question 1.
a. Assuming the weather on a given day only depends on the weather on
the previous day, weather forecasting can be modeled as a Markov Chain. Weather
can be sunny, rainy or cloudy. The data coming from the US Weather Service can be
summarized as follows:
today sunny
today rainy
today cloudy
tomorrow sunny
286
128
245
tomorrow rainy
123
333
255
tomorrow cloudy
165
256
189
Find the maximum likelihood estimates of the transition probabilities.
b. Each time a certain horse runs in a three-horse race, he can win, come in second,
and come in third. This race is modeled as Markov chain and the following data is
collected.
first
second
third
first
55
44
20
second
71
62
39
third
22
56
53
Find the maximum likelihood estimates of the transition probabilities.
Question 2. A popular brand of tennis shoe has had the following demand history by quarters over a three-year period.
1990
1
2
3
4
Demand
12
25
76
52
1991
1
2
3
4
Demand
16
32
71
62
1992
1
2
3
4
Demand
14
45
84
47
a. Using the data from 1991 and 1992, determine initial values of the intercept, slope and
seasonal factors for Winter’s method.
1
b. Assume that the observed demand for the first quarter of 1993 was 18. Using α = 0.2,
β = 0.15 and γ = 0.1, update the estimates of the series, the slope and the seasonal
factors.
c. What are the forecasts made at the end of the first quarter of 1993 for the remaining
three quarters of 1993?
Question 3. The energy consumption can be modeled as a the linear time invariance (LTI)
dynamical system in discrete time.
xt+1 = Axt + But
The following data shows how energy consumption (thousand metric ton of oil equivalent
per capita) is related to the Gross Domestic Product (GDP) per capita. Write a code to
determine the values of A and B.
GDP per capita
Energy Consumption
(thousand metric ton of oil equivalent per capita)
16,176
5468.54
16,472
5566.28
15,779
5665.80
16,076
5764.13
16,836
5864.23
17,582
5967.52
17,862
6073.97
18,348
6182.22
18,993
6292.91
19,108
6406.52
18,872
6521.51
18,255
6636.81
18,139
6751.31
18,303
6866.49
18,936
6983.20
19,227
7102.85
19,319
7224.46
19,953
7347.44
20,613
7473.42
21,563
7602.52
22,488
7735.64
22,599
7872.72
23,156
8011.37
23,409
8152.94
23,943
8296.55
24,470
8443.04
24,971
8592.44
25,809
8744.69
25,267
8900.81
2
Solution 1.
a.
p11 =
p12 =
p13 =
p21 =
p22 =
p23 =
p31 =
p32 =
p33 =
n11
n11 + n12 + n13
n12
n11 + n12 + n13
n13
n11 + n12 + n13
n21
n21 + n22 + n23
n22
n21 + n22 + n23
n23
n21 + n22 + n23
n31
n31 + n32 + n33
n32
n31 + n32 + n33
n33
n31 + n32 + n33
=
=
=
=
=
=
=
=
=
286
286 + 123 + 165
123
286 + 123 + 165
165
286 + 123 + 165
128
128 + 333 + 256
333
128 + 333 + 256
256
128 + 333 + 256
245
245 + 255 + 189
255
245 + 255 + 189
189
245 + 255 + 189
=
=
=
=
=
=
=
=
=
286
574
123
574
165
574
128
717
333
717
256
717
245
689
255
689
189
689
= 0.498
= 0.214
= 0.288
= 0.179
= 0.464
= 0.357
= 0.356
= 0.370
= 0.274
b.
p11 =
p12 =
p13 =
p21 =
p22 =
p23 =
p31 =
p32 =
p33 =
n11
n11 + n12 + n13
n12
n11 + n12 + n13
n13
n11 + n12 + n13
n21
n21 + n22 + n23
n22
n21 + n22 + n23
n23
n21 + n22 + n23
n31
n31 + n32 + n33
n32
n31 + n32 + n33
n33
n31 + n32 + n33
=
=
=
=
=
=
=
=
=
3
55
55 + 71 + 22
71
55 + 71 + 22
22
55 + 71 + 22
44
44 + 62 + 56
62
44 + 62 + 56
56
44 + 62 + 56
20
20 + 39 + 53
39
20 + 39 + 53
53
20 + 39 + 53
=
=
=
=
=
=
=
=
=
55
148
71
148
22
148
44
162
62
162
56
162
20
112
39
112
53
112
= 0.371
= 0.48
= 0.149
= 0.272
= 0.383
= 0.346
= 0.179
= 0.348
= 0.473
Solution 2.
a. Seasonal factor initialization
Dt
Vi − [(N + 1)/2 − j]G0
where i = 1 for the first season and i = 2 for the second season and j is the period of
the season.
Initialization procedure:
ct =
V1
1
=
N
V2 =
G0 =
S0 =
c−7 =
c−6 =
c−5 =
c−4 =
c−3 =
c−2 =
c−1 =
c0 =
c−3
c−2
c−1
c0
sum:
1
N
−N
∑
1
Dj = (16 + 32 + 71 + 62) = 45.25
4
j=−2N +1
0
∑
1
Dj = (14 + 45 + 84 + 47) = 47.5
4
j=−N +1
V2 − V1
47.5 − 45.25
=
= 0.5625
N
4
3
N −1
= 47.5 + (0.5625) = 48.34
V2 + G0
2
2
16
= 0.36
45.25 − [5/2 − 1]0.5625
32
= 0.711
45.25 − [5/2 − 2]0.5625
71
= 1.559
45.25 − [5/2 − 3]0.5625
62
= 0.345
45.25 − [5/2 − 4]0.5625
14
= 0.30
47.5 − [5/2 − 1]0.5625
45
= 0.953
47.5 − [5/2 − 2]0.5625
84
= 1.758
47.5 − [5/2 − 3]0.5625
47
= 0.972
47.5 − [5/2 − 4]0.5625
avg seasonal factors
(c−7 + c−3 )/2 = 0.33
(c−6 + c−2 )/2 = 0.832
(c−5 + c−1 )/2 = 1.659
(c−4 + c0 )/2 = 1.159
3.98
4
normalized seasonal factors
0.331
0.837
1.667
1.165
4
b.
α = 0.2 β = 0.15 γ = 0.1 D1 = 18
S1 = α(D1 /c−3 ) + (1 − α)(S0 + G0 ) = 0.2(18/0.33) + 0.8(48.34 + 0.5625) = 49.97
G1 = β(S1 − S0 ) + (1 − β)G0 = 0.15(49.97 − 48.34) + 0.85(0.5625) = 0.72
c1 = γ(D1 /S1 ) + (1 − γ)c−3 = 0.1(18/49.97) + 0.9(0.331) = .3345
c. At this point it is recommended to renorm c−2 , c−1 , c0 and the new value of c1 to add
to 4.
c1
c−2
c−1
c0
sum:
avg seasonal factors
0.334
0.837
1.667
1.165
4.003
normalized seasonal factors
0.334
0.836
1.666
1.164
4
Forecasts for 2nd , 3rd and 4th quarters of 1993
F1,2 = [S1 + G1 ]c−2 = (49.97 + .72)0.836 = 42.378
F1,3 = [S1 + 2G1 ]c−1 = (49.97 + 2(.72))1.666 = 85.66
F1,4 = [S1 + 3G1 ]c0 = (49.97 + 3(.72))1.164 = 60.67
Solution 3.
A = 1.009
B = 0.003
5
Download