19
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 Year 1 Year 2 Year 3 Year 4 1 218 225 234 250 2 247 254 265 283 3 243 255 264 289 4 292 299 327 356 a) Compute seasonal indices for each quarter based on a CMA. Quart er Data MA CMA Percent age Seasonal ratio 1 218 2 247 3 243 250 250.8 8 96.86 0.97 4 292 251.75 252.6 3 115.59 1.16 1 225 253.5 255.0 0 88.24 0.88 2 254 256.5 257.3 8 98.69 0.99 3 255 258.25 259.3 8 98.31 0.98 4 299 260.5 261.8 8 114.18 1.14 1 234 263.25 264.3 8 88.51 0.89 2 265 265.5 269.0 0 98.51 0.99 3 264 272.5 274.5 0 96.17 0.96

QMT Assg 3

Embed Size (px)

DESCRIPTION

QMT

Citation preview

Assignment 3: ForecastingQuestion 5 33A 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:QuarterYear 1Year 2Year 3Year 4

1218225234250

2247254265283

3243255264289

4292299327356

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

1218

2247

3243250250.8896.860.97

4292251.75252.63115.591.16

1225253.5255.0088.240.88

2254256.5257.3898.690.99

3255258.25259.3898.310.98

4299260.5261.88114.181.14

1234263.25264.3888.510.89

2265265.5269.0098.510.99

3264272.5274.5096.170.96

4327276.5278.75117.311.17

1250281284.1387.990.88

2283287.25290.8897.290.97

3289294.5

4356

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 for quarter 1, I1 = (0.88+0.88+0.88)/3 = 0.88Index for quarter 2, I2 = (0.99+0.98+0.97)/3 = 0.98Index for quarter 3, I3 = (0.96+0.98+0.96)/3 = 0.97Index for quarter 4, 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:

QuarterDataSeasonal ratioDeseasonalize

12180.88247.73

22470.98252.04

32430.97250.88

42921.16252.63

12250.88255.00

22540.99257.38

32550.98259.38

42991.14261.88

12340.89264.38

22650.99269.00

32640.96274.50

43271.17278.75

12500.88284.13

22830.97290.88

32890.97297.94

43561.16306.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).

YX

247.731

252.042

250.883

252.634

255.005

257.386

259.387

261.888

264.389

269.0010

274.5011

278.7512

284.1313

290.8814

297.9415

306.9016

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.8226b = 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).

17Quarter 1: Y = 237.82 + 3.66(17) = 300.0418Quarter 2: Y = 237.82 + 3.66(18) = 303.719Quarter 3: Y = 237.82 + 3.66(19) = 307.3620Quarter 4: Y = 237.82 + 3.66(20) = 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:

17Quarter 1: 300.04(0.88) = 264.035218Quarter 2: 303.7(0.98) = 297.62619Quarter 3: 307.36(0.97) = 298.139220Quarter 4: 311.02(1.16) = 360.7832

Question 5 34Yxxxx

SalesT (time period)Q1Q2Q3

2181100

2472010

2433001

2924000

2255100

2546010

2557001

2998000

2349100

26510010

26411001

32712000

25013100

28314010

28915001

35616000

SUMMARY OUTPUT

Regression Statistics

Multiple R0.984243958

R Square0.968736169

Adjusted R Square0.957367504

Standard Error7.67070875

Observations16

ANOVA

dfSSMSFSignificance F

Regression420055.25013.885.211073.34E-08

Residual11647.237558.83977

Total1520702.44

CoefficientsStandard Errort StatP-valueLower 95%Upper 95%Lower 95.0%Upper 95.0%

Intercept281.56255.75303248.941593.18E-14268.9002294.2248268.9002294.2248

t3.693750.4288068.6140423.21E-062.7499554.6375452.7499554.637545

Q1-75.668755.574474-13.57423.25E-08-87.9381-63.3994-87.9381-63.3994

Q2-48.86255.491392-8.898022.34E-06-60.949-36.776-60.949-36.776

Q3-52.056255.440934-9.567521.15E-06-64.0317-40.0808-64.0317-40.0808

Using Excel, we get:Y = 281.6 + 3.7t 75.7Q1 48.9Q2 52.1Q3The forecast for the next 4 quarters are:Y = 281.6 + 3.7(17) 75.7(1) 48.9(0) 52.1(0) = 268.7Y = 281.6 + 3.7(18) 75.7(0) 48.9(1) 52.1(0) = 299.2Y = 281.6 + 3.7(19) 75.7(0) 48.9(0) 52.1(1) = 299.7Y = 281.6 + 3.7(20) 75.7(0) 48.9(0) 52.1(0) = 355.4

Question 5 - 35xy

QuarterDataTrend Line

1274197.26

2172196.93

3130196.59

4162196.26

5282195.92

6178195.59

7136195.25

8168194.92

9282194.58

10182194.25

11134193.91

12170193.58

13296193.24

14210192.91

15158192.57

16182192.24

Intercept197.6

Slope-0.34

SUMMARY OUTPUT

Regression Statistics

Multiple R0.028

R Square0.001

Adjusted R Square-0.071

Standard Error58.65

Observations16

ANOVA

DfSSMSFSignificance F

Regression138.2235338.223530.0111110.917546

Residual1448160.783440.055

Total1548199

CoefficientsStandard Errort StatP-valueLower 95%Upper 95%Lower 95.0%Upper 95.0%

Intercept197.630.757366.4244781.59E-05131.632263.568131.632263.568

X Variable 1-0.3352943.180851-0.105410.917546-7.157546.486952-7.157546.486952

a) Using Excel, we get Y = 197.6 0.34X, where X = time periodBesides 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.001b) QuarterDataMACMAPercentagesSeasonal RatioDeseasonalized

112741.47186.6021

221720.96178.8708

33130184.50185.5070.080.70185.5

44162186.50187.2586.520.87187.25

15282188.00188.75149.401.49188.75

26178189.50190.2593.560.94190.25

37136191.00191.0071.200.71191

48168191.00191.5087.730.88191.5

19282192.00191.75147.071.47191.75

210182191.50191.7594.920.95191.75

311134192.00193.7569.160.69193.75

412170195.50199.0085.430.85199

113296202.50205.50144.041.44205.5

214210208.50210.00100.001.00210

315158211.500.70225.2356

416182183.330.87210.2661

Intercept176.90

Slope2.18

Using Excel, the seasonal indices are:Quarter 1: 1.47Quarter 2: 0.96Quarter 3: 0.70Quarter 4: 0.87The 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.

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 39YearxDJIATrend SRF ErrorMADMSEMAPE

1994137545769.2142015.212015.21406108953.6818

1995238346166.5812332.582332.58544093560.8394

1996351176563.9481446.951446.95209365928.2773

1997464486961.315513.32513.322634927.9608

1998579087358.682-549.32549.323017506.9464

1999692137756.049-1456.951456.95212270715.8141

20007115028153.416-3348.583348.581121301629.1131

20018107918550.783-2240.222240.22501857420.7601

20029100228948.15-1073.851073.85115315510.7149

20031083429345.5171003.521003.52100704512.0297

200411104539742.883-710.12710.125042666.7934

2005121078410140.25-643.75643.754144145.9695

2006131071810537.62-180.38180.38325381.6830

2007141246010934.98-1525.021525.02232567312.2393

2008151326211332.35-1929.651929.65372354514.5502

200916877211729.722957.722957.72874809633.7177

2010171043112127.081696.081696.08287670416.2600

2011181157712524.45947.45947.458976658.1839

2012191239212921.82529.82529.822807084.2755

2013201310413319.19215.19215.19463051.6421

5.46E-131365.78262626717.5726

Intercept5371.85

Slope397.37

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

0.2MSE2867351

YearDJIAFTFITErrorMSE

19943754375403754

19953834375403754806400

19965117381813383112861654310

199764484859.76219507813701875936

199879086174.07438661212961680119

199992137648.7616458294919844767

2000115029029.178792982116812824543

20011079111165.87106112227-14362061979

20021002211078.1983111910-18883562751

2003834210399.5152910929-25876691711

2004104538859.367115897514782185068

20051078410157.363521050927575456

20061071810729.0639611125-407165616

20071246010799.393311113013301768431

20081326212194.0454412738524275004

2009877213157.1262713785-501325125958

2010104319774.516-1759600831690619

20111157710264.79-421022313541832754

20121239211306.2417511481911829442

20131310412209.8532112531573328797

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 Smoothing0.4SE1942.656717

MSE3773915

YearDJIAFTFITErrorMSE

19943754375403754

19953834375403754806400

1996511737860378613311771561

199764484318.40431821304535196

199879085170.240517027387495330

199992136265.3440626529488688676

2000115027444.40607444405816464066

2001107919067.4440906717242970646

2002100229756.8660975726570296

200383429862.9209863-15212313197

2004104539254.5520925511981436278

2005107849733.9310973410501102645

20061071810153.96010154564318143

20071246010379.5801038020804328167

20081326211211.7501121220504203545

2009877212031.85012032-326010626603

20101043110727.91010728-29788155

20111157710609.14010609968936743

20121239210996.2901099613961948015

20131310411554.5701155515492400727

20141310412174.34012174

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

(b)Exponential Smoothing0.9904588SE1623.168907

MSE2634677

YearDJIAFTFITErrorMSE

19943754375403754

19953834375403754806400

199651173833.2370383312841648048

199764485104.7510510513431804317

199879086435.1840643514732169187

199992137893.9480789413191739899

2000115029200.4150920023025297295

20011079111480.04011480-689474776

20021002210797.57010798-776601515

2003834210029.4010029-16872847318

2004104538358.10835820954388607

20051078410433.01010433351123192

20061071810780.65010781-633925

20071246010718.601071917413032482

20081326212443.38012443819670131

2009877213254.19013254-448220090022

2010104318814.7650881516162612215

20111157710415.5801041611611348898

20121239211565.92011566826682410

20131310412384.12012384720518230

20141310413097.13013097

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