Você está na página 1de 15

Assignment 3: Forecasting

Question 5 33
A major source of revenue in Texas is a state sales tax on certain types of
goods and services. Data are compiled and the state comptroller uses
them to project future revenues for the state budget. One particular
category of goods is classified as Retail Trade. Four years of quarterly data
for one particular area of southeast Texas follows:
Quarter
1
2
3
4

Year 1
218
247
243
292

Year 2
225
254
255
299

Year 3
234
265
264
327

Year 4
250
283
289
356

a) Compute seasonal indices for each quarter based on a CMA.


Quart
er
1
2
3

Data

MA

CMA

Percenta Seasonal
ge
ratio

218
247
243

250

96.86

0.97

292

251.75

115.59

1.16

225

253.5

88.24

0.88

254

256.5

98.69

0.99

255

258.25

98.31

0.98

299

260.5

114.18

1.14

234

263.25

88.51

0.89

265

265.5

98.51

0.99

264

272.5

96.17

0.96

327

276.5

117.31

1.17

250

281

87.99

0.88

283

287.25

250.8
8
252.6
3
255.0
0
257.3
8
259.3
8
261.8
8
264.3
8
269.0
0
274.5
0
278.7
5
284.1
3
290.8
8

97.29

0.97

3
4

289
356

294.5

At the first, we must compute a series of moving averages (MA) and then
average the MA in order to build the seasonal indices based on a CMA. In
addition, the percentage column is simply the data column, divided by the
CMA, and multiplied by 100. Using QM for Windows, we specify Centered
Moving Average and we get:
Index
Index
Index
Index

for
for
for
for

quarter
quarter
quarter
quarter

1,
2,
3,
4,

I1 = (0.88+0.88+0.88)/3 = 0.88
I2 = (0.99+0.98+0.97)/3 = 0.98
I3 = (0.96+0.98+0.96)/3 = 0.97
I4 = (1.16+1.14+1.17)/3 = 1.16

b) Deseasonalize the data and develop a trend line on the deseasonalized


data.
With using Excel, in order to get deseasonalized data, we simply data/
(seasonal ratio). We get:
Quart
er
1
2
3
4
1
2
3
4
1
2
3

Dat
a
21
8
24
7
24
3
29
2
22
5
25
4
25
5
29
9
23
4
26
5
26
4

Season
al ratio
0.88

Deseasona
lize
247.73

0.98

252.04

0.97

250.88

1.16

252.63

0.88

255.00

0.99

257.38

0.98

259.38

1.14

261.88

0.89

264.38

0.99

269.00

0.96

274.50

32
7
25
0
28
3
28
9
35
6

1
2
3
4

1.17

278.75

0.88

284.13

0.97

290.88

0.97

297.94

1.16

306.90

To compute the trend line, we must we must run a least squares


regression. The 'explanatory' variable here will be simply a time index.
Therefore, calling Y the explained variable (the actual data) and X the
explanatory variable, you would have to run a regression on the
following data (also adding a constant).
Y
247.
73
252.
04
250.
88
252.
63
255.
00
257.
38
259.
38
261.
88
264.
38
269.
00
274.
50
278.
75
284.
13

X
1
2
3
4
5
6
7
8
9
10
11
12
13

290.
88
297.
94
306.
90

14
15
16

So, we have to find the coefficients 'a' and 'b' in the following
regression:
Y = a + bX
Using excel, we get the intercept and slope. We get that these values
are:
a = 237.8226
b = 3.663168
So, the trend line is Y = 237.82 + 3.66X
c) Use the trend line to forecast the sales for each quarter of year 5.
This forecast can be obtained by simply using as "explanatory
variables" the values 17, 18, 19 and 20, which would correspond to
each quarter of the fifth yeard (recall that the 4th quarter of the 4th
year would be the 16th value).
17
18
19
20

Quarter
Quarter
Quarter
Quarter

1:
2:
3:
4:

Y
Y
Y
Y

=
=
=
=

237.82
237.82
237.82
237.82

+
+
+
+

3.66(17)
3.66(18)
3.66(19)
3.66(20)

=
=
=
=

300.04
303.7
307.36
311.02

d) Use the seasonal indices to adjust the forecasts found in part (c) to
obtain the final forecasts.
Since the trend forecasts were done using deseasonalized data, we
must now adjust each forecast to see the actual value for each quarter.
This is simply a matter of undoing what we did in question a. We must
take each value and multiply it by (seasonal index)/100. We then get:
17
18
19
20

Quarter
Quarter
Quarter
Quarter

1:
2:
3:
4:

300.04(0.88) = 264.0352
303.7(0.98) = 297.626
307.36(0.97) = 298.1392
311.02(1.16) = 360.7832

Question 5 34
Y

x
x
T
(time
SUMMARY OUTPUT
perio
Sales d)
Q1
Regression
Statistics
218
1
Multiple
R
0.984243
247
2
958
243
3
R Square
0.968736
292
4 169
Adjusted R
0.957367
225
5 504
Square
Standard
7.670708
254
6
Error
75
255
7
Observatio
16
8
ns299
234
9
ANOVA
265
10
264
11 df
327
12
Regression
4
250
13
Residual
11
283
14
289
15
Total
15
356
16
Coefficien
ts

Q2

Q3

1
0
0
0
1
0
0
0
1
0
0 SS
0
20055.2
1
0647.237
5
020702.4
4
0

3.69375

Standar
d Error
5.75303
2
0.42880
6

Q1

-75.66875

5.57447
4

Q2

-48.8625

5.49139
2

Q3

-52.05625

5.44093
4

Intercept
t

281.5625

0
1
0
0
0
1
0
0
0
1
0 MS
0
5013.8
0
158.839
77
0
0

0
0
1
0
0
0
1
0
0
0
1 F
0
85.211
0 07
0
1
0

t Stat
48.941
59
8.6140
42
13.574
2
8.8980
2
9.5675
2

P-value
3.18E14
3.21E06

Significa
nce F
3.34E-08

Lower
95%
268.9002
2.749955

3.25E08

-87.9381

2.34E06

-60.949

1.15E06

-64.0317

Upper
95%
294.22
48
4.6375
45
63.399
4

Lower
95.0%
268.90
02
2.7499
55
87.938
1

Upper
95.0%
294.22
48
4.6375
45
63.399
4

36.776
40.080
8

60.949
64.031
7

36.776
40.080
8

Using Excel, we get:


Y = 281.6 + 3.7t 75.7Q1 48.9Q2 52.1Q3
The forecast for the next 4 quarters are:
Y = 281.6 + 3.7(17) 75.7(1) 48.9(0) 52.1(0) = 268.7
Y = 281.6 + 3.7(18) 75.7(0) 48.9(1) 52.1(0) = 299.2

Y = 281.6 + 3.7(19) 75.7(0) 48.9(0) 52.1(1) = 299.7


Y = 281.6 + 3.7(20) 75.7(0) 48.9(0) 52.1(0) = 355.4

Question 5 - 35
x
y
Quarte
r
Data
1

274

172

130

162

282

178

136

168

282

10

182

11

134

12

170

13

296

14

210

15

158

16

182

Interc
ept
Slope

197.6
-0.34

Trend
Line
197.2
6
196.9
3
196.5
9
196.2
6
195.9
2
195.5
9
195.2
5
194.9
2
194.5
8
194.2
5
193.9
1
193.5
8
193.2
4
192.9
1
192.5
7
192.2
4

SUMMARY OUTPUT
Regression Statistics
Multiple R
0.028
R Square
0.001
Adjusted
R Square
-0.071
Standard
Error
58.65
Observati
ons
16
ANOVA
Df

Residual

14

SS
38.223
53
48160.
78

Total

15

48199

Coefficients
197.6

Standa
rd
Error
30.757
36

-0.335294

3.1808
51

Regressio
n

Intercept
X Variable
1

MS
38.223
53
3440.0
55

t Stat
6.4244
78
0.1054
1

F
0.0111
11

Significa
nce F
0.917546

Pvalue
1.59E05

Lower
95%
131.632

Upper
95%
263.56
8

0.9175
46

-7.15754

6.4869
52

Lower
95.0
%
131.6
32
7.157
54

Upper
95.0%
263.56
8
6.4869
52

a) Using Excel, we get Y = 197.6 0.34X, where X = time period


Besides that, the slope is -0.34 specify a small negative trend. In
addition, the result that we get are not statically significant and r2 =
0.001
b)
Quart
er

Percenta Seasona

1
2

Data MA
CMA ges
1
274
2
172
184.5
185.

130

50

Deseasonali

l Ratio
zed
1.47
186.6021
0.96
178.8708
70.08

0.70

185.5

186.5

187.

162

0
188.0

25
188.

86.52

0.87

187.25

282

0
189.5

75
190.

149.40

1.49

188.75

178

0
191.0

25
191.

93.56

0.94

190.25

136

0
191.0

00
191.

71.20

0.71

191

168

0
192.0

50
191.

87.73

0.88

191.5

282

0
191.5

75
191.

147.07

1.47

191.75

10

182

0
192.0

75
193.

94.92

0.95

191.75

11

134

0
195.5

75
199.

69.16

0.69

193.75

12

170

0
202.5

00
205.

85.43

0.85

199

13

296

0
208.5

50
210.

144.04

1.44

205.5

14

210

0
211.5

00

100.00

1.00

210

15

158

0
183.3

0.70

225.2356

16

182

0.87

210.2661

Interce
pt
Slope

Using Excel, the seasonal indices are:


Quarter 1: 1.47
Quarter 2: 0.96
Quarter 3: 0.70
Quarter 4: 0.87
The trend equation found with the deseasonalized data is Y = 176.90 +
2.18X. The slope indicates a positive trend of 2.18 per time period.
However, the results are statistically significant.

176.90
2.18

c) The negative slope that we get in part (a) was found when the
seasonality was ignored. The quarter 1 has a high seasonal ratio, so
the first observation was very large relative to the last observation.
According raw data, which was used for the trend line in a part (a), it
appeared that there was a negative trend line but in reality this was
due to the seasonal variation and not due to trend. In addition, the
decomposition method is better to use when there is a sesonal pattern
present.

Question 5 39
Trend
Year

MAP

DJIA

SR
Error
MAD MSE
5769.2 2015.2 2015.

E
53.68

1994

3754

14
1
6166.5 2332.5

21
2332.

4061089

18
60.83

1995

3834

81
8
6563.9 1446.9

58
1446.

5440935

94
28.27

1996

5117

48
6961.3

95
513.3

2093659

73
7.960

1997

6448

15 513.32
7358.6
-

2
549.3

263492

8
6.946

1998

7908

82 549.32
-

301750

7756.0 1456.9

1456.

1999

9213
1150

2000

49

15.81

5
-

95

2122707

41

8153.4 3348.5

3348.

1121301

29.11

58

31

16

1079
2001

8550.7 2240.2
83

2240.

20.76

2
-

22

5018574

01

1002

8948.1 1073.8

1073.

5
5
9345.5 1003.5

85
1003.

1153155

49
12.02

10.71

2002

2003

10

8342
1045

17
9742.8

2
-

52
710.1

1007045

97
6.793

2004

11

3
1078

83 710.12
10140.
-

2
643.7

504266

4
5.969

2005

12

4
1071

25 643.75
10537.
-

5
180.3

414414

5
1.683

2006

13

62 180.38
-

32538

1246

10934. 1525.0

1525.

2007

14

98

2
-

02

1326

11332. 1929.6

1929.

12.23
2325673

93
14.55

2008

15

35
5
11729. 2957.7

65
2957.

3723545

02
33.71

2009

16

8772
1043

72
2
12127. 1696.0

72
1696.

8748096

77
16.26

2010

17

1
1157

08
12524.

08
947.4

2876704

00
8.183

2011

18

7
1239

45 947.45
12921.

5
529.8

897665

9
4.275

2012

19

2
1310

82 529.82
13319.

2
215.1

280708

5
1.642

2013

20

19 215.19
5.46E

9
1365

46305
262626

1
17.5

-13

.78

726

Interc
ept
Slope

5371.
85
397.3
7

The trend equation is Y = 5371.85 + 397.37X


For 2014, X = 21; Y = 5371.85 + 397.37(21) = 13716.62
For 2015, X = 22; Y = 5371.85 + 397.37(22) = 14113.99
For 2016, X = 23; Y = 5371.85 + 397.37(23) = 14511.36
The MSE from Excel output is 2626267.
Question 5 40
Exponential
Smoothing

0.8
0.2

SE
MSE

1693.325303
2867351

Yea
r
DJIA
199

FIT

Error

MSE

4
199

3754

3754

3754

5
199

3834

3754

3754

80

6400

6
199

5117

3818

13

3831

1286

1654310

7
199

6448

4859.76

219

5078

1370

1875936

8
199

7908

6174.07

438

6612

1296

1680119

9
200

9213
1150

7648.761

645

8294

919

844767

0
200

2
1079

9029.178

792

9821

1681

2824543

1
200

1
1002

11165.87

1061

12227

-1436

2061979

2
200

11078.19

831

11910

-1888

3562751

3
200

8342
1045

10399.51

529

10929

-2587

6691711

4
200

3
1078

8859.367
10157.36

115
352

8975
10509

1478
275

2185068
75456

5
200

4
1071

6
200

8
1246

10729.06

396

11125

-407

165616

7
200

0
1326

10799.39

331

11130

1330

1768431

8
200

12194.04

544

12738

524

275004

9
201

8772
1043

13157.12

627

13785

-5013

25125958

0
201

1
1157

9774.516

-175

9600

831

690619

1
201

7
1239

10264.79

-42

10223

1354

1832754

2
201

2
1310

11306.24

175

11481

911

829442

12209.85

321

12531

573

328797

Using Excel, the MSE is 2,867,351. As we can see, this MSE is higher than
the MSE that we found using a trend line. So, the trend line provides
better forecasts than exponential smoothing. But, other values for the
two smoothing constants might result in better forecasts and a lower MSE.
Question 5 41 (a)
Exponential
Smoothing

0.4

SE
MSE

Yea
r
DJIA
199

FIT

Error

MSE

4
199

3754

3754

3754

5
199

3834

3754

3754

80

6400

6
199

5117

3786

3786

1331

1771561

7
199

6448

4318.4

4318

2130

4535196

8
199

7908

5170.24
6265.34

5170

2738

7495330

9213

6265

2948

8688676

1942.656717
3773915

200

1150

7444.40

1646406

0
200

2
1079

6
9067.44

7444

4058

1
200

1
1002

4
9756.86

9067

1724

2970646

2
200

9757

265

70296

3
200

8342
1045

9862.92
9254.55

9863

-1521

2313197

4
200

3
1078

2
9733.93

9255

1198

1436278

5
200

4
1071

1
10153.9

9734

1050

1102645

6
200

8
1246

6
10379.5

10154

564

318143

7
200

0
1326

8
11211.7

10380

2080

4328167

8
200

5
12031.8

11212

2050

4203545
1062660

9
201

8772
1043

5
10727.9

12032

-3260

0
201

1
1157

1
10609.1

10728

-297

88155

1
201

7
1239

4
10996.2

10609

968

936743

2
201

2
1310

9
11554.5

10996

1396

1948015

3
201

4
1310

7
12174.3

11555

1549

2400727

12174

Using Excel, with a smoothing constant of 0.4, the MSE = 3,773,915.

(b)
Exponential

0.99045

Smoothing

88

SE
MSE

Yea
r
DJIA
199

FIT

Error

MSE

4
199

3754

3754

3754

5
199

3834

3754
3833.23

3754

80

6400

6
199

5117

7
5104.75

3833

1284

1648048

7
199

6448

1
6435.18

5105

1343

1804317

8
199

7908

4
7893.94

6435

1473

2169187

9
200

9213
1150

8
9200.41

7894

1319

1739899

0
200

2
1079

5
11480.0

9200

2302

5297295

1
200

1
1002

4
10797.5

11480

-689

474776

2
200

10798

-776

601515

3
200

8342
1045

10029.4

10029

-1687

2847318

4
200

3
1078

8358.1
10433.0

8358

2095

4388607

5
200

4
1071

1
10780.6

10433

351

123192

6
200

8
1246

10781

-63

3925

7
200

0
1326

10718.6
12443.3

10719

1741

3032482

8
200

8
13254.1

12443

819

670131
2009002

9
201

8772
1043

9
8814.76

0
0

13254
8815

-4482
1616

2
2612215

1623.168907
2634677

0
201

1
1157

5
10415.5

1
201

7
1239

8
11565.9

10416

1161

1348898

2
201

2
1310

2
12384.1

11566

826

682410

3
201

4
1310

2
13097.1

12384

720

518230

13097

Using Excel, the best smoothing constant is 0.99. According this results
the lowest MSE of 2,632,477

Você também pode gostar