In: Statistics and Probability
Please show answers and code using R/R Studio.
This data shows the series of quarterly shipments in millions of US dollars of US hosehold appliances between 1985 and 1989.
Quarter | Shipments |
Q1-1985 | 4009 |
Q1-1986 | 4123 |
Q1-1987 | 4493 |
Q1-1988 | 4595 |
Q1-1989 | 4245 |
Q2-1985 | 4321 |
Q2-1986 | 4522 |
Q2-1987 | 4806 |
Q2-1988 | 4799 |
Q2-1989 | 4900 |
Q3-1985 | 4224 |
Q3-1986 | 4657 |
Q3-1987 | 4551 |
Q3-1988 | 4417 |
Q3-1989 | 4585 |
Q4-1985 | 3944 |
Q4-1986 | 4030 |
Q4-1987 | 4485 |
Q4-1988 | 4258 |
Q4-1989 | 4533 |
(b) apply a moving average with window span w=4 to the data. Use all but the last year as the training period. Create a time ploy of the moving average series.
- What does the MA (4) chart reveal?
- Use the MA (4) model to forecast appliance sales in Q1-1990
- Use the MA (4) model to forecast appliance sales in Q1-1991
- is the Q1-1990 forecast most likely to underestimate, overestimate, or accurately estimate the actual sales on Q1-1990? Explain?
- Managment Feels most comfortable with moving averages. the analyst therefore plans to use this method for forecasting future quaters. what else should be considered before using the MA(4) to forecast future quarterly shipments of household appliances.
(c) we now focus on forcasting beyond 1989. in the following continue to use all but the last year as the training period and the last four quarters as the validation period. apply holt winters exponential smoothing to the training period.
- compute MAPE values for the training and validation periods using holt winters exponential smoothing.
- Draw two time plots: one for the actual forecasted values and theo ther for the residuals. the x-acis should include the training and validation periods. comment on the model fit in the training and validation periods.
- if we optimize the smoothing constants in the holt winters method are the optimal values likely to be close to zero? why or why not?
(b)
Qtr | Shipments | Period | Shipments | Forecast (MA4) |
Q1-1985 | 4009 | 1 | 4009 | |
Q1-1986 | 4123 | 2 | 4321 | |
Q1-1987 | 4493 | 3 | 4224 | |
Q1-1988 | 4595 | 4 | 3944 | |
Q1-1989 | 4245 | 5 | 4123 | 4124.5 |
Q2-1985 | 4321 | 6 | 4522 | 4153.0 |
Q2-1986 | 4522 | 7 | 4657 | 4203.3 |
Q2-1987 | 4806 | 8 | 4030 | 4311.5 |
Q2-1988 | 4799 | 9 | 4493 | 4333.0 |
Q2-1989 | 4900 | 10 | 4806 | 4425.5 |
Q3-1985 | 4224 | 11 | 4551 | 4496.5 |
Q3-1986 | 4657 | 12 | 4485 | 4470.0 |
Q3-1987 | 4551 | 13 | 4595 | 4583.8 |
Q3-1988 | 4417 | 14 | 4799 | 4609.3 |
Q3-1989 | 4585 | 15 | 4417 | 4607.5 |
Q4-1985 | 3944 | 16 | 4258 | 4574.0 |
Q4-1986 | 4030 | 17 | 4245 | 4517.3 |
Q4-1987 | 4485 | 18 | 4900 | 4429.8 |
Q4-1988 | 4258 | 19 | 4585 | 4455.0 |
Q4-1989 | 4533 | 20 | 4533 | 4497.0 |
Q1-1990 | 21 | 4565.8 | ||
Q1-1991 | 22 | 4565.8 |
For estimating the over/ underestimate, we will find the value of the tracking signal by dividing the sum of errors by the MAD.
Qtr | Shipments | Period | Shipments | Forecast (MA4) | |At - Ft| | (At - Ft) |
Q1-1985 | 4009 | 1 | 4009 | |||
Q1-1986 | 4123 | 2 | 4321 | |||
Q1-1987 | 4493 | 3 | 4224 | |||
Q1-1988 | 4595 | 4 | 3944 | |||
Q1-1989 | 4245 | 5 | 4123 | 4124.5 | 1.5 | -1.5 |
Q2-1985 | 4321 | 6 | 4522 | 4153.0 | 369 | 369.0 |
Q2-1986 | 4522 | 7 | 4657 | 4203.3 | 453.75 | 453.8 |
Q2-1987 | 4806 | 8 | 4030 | 4311.5 | 281.5 | -281.5 |
Q2-1988 | 4799 | 9 | 4493 | 4333.0 | 160 | 160.0 |
Q2-1989 | 4900 | 10 | 4806 | 4425.5 | 380.5 | 380.5 |
Q3-1985 | 4224 | 11 | 4551 | 4496.5 | 54.5 | 54.5 |
Q3-1986 | 4657 | 12 | 4485 | 4470.0 | 15 | 15.0 |
Q3-1987 | 4551 | 13 | 4595 | 4583.8 | 11.25 | 11.3 |
Q3-1988 | 4417 | 14 | 4799 | 4609.3 | 189.75 | 189.8 |
Q3-1989 | 4585 | 15 | 4417 | 4607.5 | 190.5 | -190.5 |
Q4-1985 | 3944 | 16 | 4258 | 4574.0 | 316 | -316.0 |
Q4-1986 | 4030 | 17 | 4245 | 4517.3 | 272.25 | -272.3 |
Q4-1987 | 4485 | 18 | 4900 | 4429.8 | 470.25 | 470.3 |
Q4-1988 | 4258 | 19 | 4585 | 4455.0 | 130 | 130.0 |
Q4-1989 | 4533 | 20 | 4533 | 4497.0 | 36 | 36.0 |
Q1-1990 | 21 | 4565.8 | 208.2344 | 5.802356 | ||
Q1-1991 | 22 | 4565.8 | MAD | TS |
Since the tracking signal is more than 2, we are overestimating the forecast by using MA(4).
The analyst should check first the normality of the residuals before confirming the method instead of only deciding on the basis of convenience. Also, autocorrelation between lagged period must also be checked.
(c)
Alpha = | 0.04 | Beta = | 0.16 | Gamma = | 0.27 | ||
Time(t) | Sales | A_t | T_t | S_t | F(t) | abs | abs/y |
1 | 4009 | 4009.0 | 0.0 | 1.0 | |||
2 | 4321 | 4022.3 | 2.2 | 1.0 | |||
3 | 4224 | 4032.9 | 3.6 | 1.0 | |||
4 | 3944 | 4032.6 | 2.9 | 1.0 | |||
5 | 4123 | 4039.2 | 3.5 | 1.0 | 4035.5 | 87.5 | 0.0212 |
6 | 4522 | 4059.4 | 6.3 | 1.0 | 4123.5 | 398.5 | 0.0881 |
7 | 4657 | 4088.3 | 10.0 | 1.0 | 4117.4 | 539.6 | 0.1159 |
8 | 4030 | 4096.4 | 9.7 | 1.0 | 4074.1 | 44.1 | 0.0109 |
9 | 4493 | 4121.4 | 12.2 | 1.0 | 4128.9 | 364.1 | 0.0810 |
10 | 4806 | 4153.4 | 15.4 | 1.1 | 4320.6 | 485.4 | 0.1010 |
11 | 4551 | 4176.4 | 16.7 | 1.1 | 4363.5 | 187.5 | 0.0412 |
12 | 4485 | 4207.2 | 19.0 | 1.0 | 4156.8 | 328.2 | 0.0732 |
13 | 4595 | 4236.5 | 20.7 | 1.0 | 4345.9 | 249.1 | 0.0542 |
14 | 4799 | 4266.0 | 22.1 | 1.1 | 4577.8 | 221.2 | 0.0461 |
15 | 4417 | 4283.2 | 21.3 | 1.1 | 4537.9 | 120.9 | 0.0274 |
16 | 4258 | 4300.5 | 20.7 | 1.0 | 4353.7 | 95.7 | 0.0225 |
17 | 4245 | 4508.9 | 263.9 | 0.0622 | |||
18 | 4900 | 4726.8 | 173.2 | 0.0353 | |||
19 | 4585 | 4585.0 | 0.0 | 0.0000 | |||
20 | 4533 | 4408.1 | 124.9 | 0.0275 | |||
MAPE for Test | 0.0569 | ||||||
MAPE for Validation | 0.0313 |
With the above set of alpha, beta, and gamma we were able to have lowest MAPE = 0.0313