Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)

Similar presentations


Presentation on theme: "Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)"— Presentation transcript:

1 Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)

2 a.Analyze this data using the multiplicative decomposition method in an Excel spreadsheet. The book contains a CD-ROM with the data sets in different data formats.

3 Note! Data are given consecutively in column 1 (not tabled as in Table 6.4 of the book) Add a column with the time variable (month)

4 In column C, add the formulas for calculating CMA t Monthly data  Formula can be entered in cells C8:C163 (Row 1 is reserved for column labels)  Enter the following formula in cell C8 and copy it to cells C9:C163 “ =(B2+2*(B3+B4+B5+B6+B7+B8+B9+B10+B11+B12+B13)+B14)/24 ”

5 Next step: Divide y t with CMA t for t = 7,…,162 (Spreadsheet formula is entered into cells D8:D163) This gives the rough seasonal components (y / CMA)

6 Now we need to estimate the seasonal component, i.e. the 12 seasonal indices Average the rough seasonal components for each calendar month Cell E8 corresponds with calendar month 7, i.e. July Enter the following formula in E8 “ =(D8+D20+D32+D44+D56+D68+D80+D92+D104+D116+D128+D140+ D152)/13 ” Copy the formula to cells E9:E17 (August-April). For the cells E18:E19 (May and June), remove the last term in the sum of the formula and divide by 12.

7 The contents of cells E8:E19 are now close to the seasonal components. Fine adjust them by dividing with their average. In cell F8 enter the following formula =E8/(AVERAGE($E$8:$E$19)) and copy this to the cells F9:F19

8 Now, the seasonal components shall be “copied” to the rest of the relevant cells in column F. To make it more dynamic (allowing original observations to be changed) use formulas depending on the values calculated in F8:F19 In Cell F2, enter the formula =F14 (as month 1 is the same calendar month as month 13) In cell F3, enter formula =F15 and so on until cell F25 For the cells F26:F37 enter successively formulas =$F$2, =$F$3, =$F$4, =$F$5, =$F$6, =$F$7, =$F$8, =$F$9, =$F$10, =$F$11, =$F$12, =$F$13 The copy and paste these 12 cells further in the column

9 Now, deseasonalize the original observations by dividing them with the corresponding seasonal component In cell G2 enter =B2/F2, copy and paste into all relevant cells of column G.

10 From deseasonalized data, the trend function can be estimated. If a linear trend is to be found, we simply use columns A and G, if a quadratic trend is to be found a new column with squares of the values in A must be created. Stick to the linear case here. In Excel, open the menu Tools (open it while a cell in the spreadsheet is active, not e.g. a chart) Select the alternative Data Analysis… If that alternative does not exist, select the alternative Add-Ins… and check the box for the Analysis ToolPak add-in, then Data Analysis will appear on the Tools menu.

11 Scroll down to the alternative Regression and select that one. Enter the cells with the deseasonalized data here, i.e. cells G1:G169 (including column label) Enter the cells with the time variable(s) here, in our case cells A1:A169 (including column label) Check this box as labels are present (otherwise you may enter the ranges G2:G169 and A2:A169 in the Input Y and X Ranges above)

12 Enter a cell here that does not interfere with your previously entered columns or your prospectively entered columns (trend column, cyclical component etc.) Preferably: Enter a cell under your data columns, i.e. G171 Click OK, look at cell G171 and below!

13 Standard regression output. What we need here are the contents of cells H187 (intercept) and H188 (slope parameter).

14 Column H should now contain the estimated trend component. In cell H2 enter the formula =$H$187+$H$188*A2 (tr 1 =  t ) Copy and paste into all relevant cells in column H

15 Next step is to filter out the combined cyclical and irregular component. This should be stored in column I. (cl  ir) t = y t * / tr t  Enter the formula =G2/H2 in cell I2. Copy and paste into all relevant cells in column I.

16 To separate between the cyclical and the irregular component, moving averages need to be calculated. The moving averages constitute cl and the ratio between (cl  ir) and cl constitutes ir Excel has this function among the Data Analysis methods, but it is not consistent with the description in this course. Only 3-point moving averages are centred, the rest are skewed. To make 3-point centred moving averages, enter the following formula into cell J3: =average(I2:I4) Copy and paste into cells J4:J168 (Cell J169 like cell J2 will not have any value) Then enter the formula =I3/J3 into cell K3, copy and paste into cells K4:K168 to produce ir. To make 5-point centred moving averages, enter the following formula into cell J4: =average(I2:I6) Copy and paste into cells L5:L167, calculate ir ( =I4/L4 ) in cells M4:M167 Etc. In this case, calculate 3-, and 9-point moving averages.

17 To judge upon which of the moving averages that works best, calculate the standard deviation and the serial correlation coefficient for all estimated irregular components. Use e.g. rows 171 and 172 for these outputs. In cell K171 enter the formula =stdev(K2:K169) It doesn’t matter for this calculation that some cells are empty. Excel only calculates with active cells. This formula can therefore be copied to cells M171, O171 and Q171

18 In cell K172 enter the formula =correl(K2:K168,K3:K169) This calculates the correlation coefficient between the series of ir terms and the one- step lagged series of ir terms. Note that be benefit of that cell K169 is empty. Empty cells are treated as missing values in the Excel calculations. Copy and paste the formula into the cells M172, O172 and Q172. There are more empty cells in these columns, but that does not affect the result. Now we can see that the 3-point moving average gives the lowest standard deviation ( ) of the ir terms and the 5-point moving average gives the lowest serial correlation (in absolute value).

19 To help in the decision process, it could be wise to plot (cl  ir) together with cl for the two cases (use the “line” chart type in the Chart Wizard)). Gives a smoother impression

20 b. Use statistical software, such as SAS or MINITAB, to produce point forecasts and 95% prediction intervals for the deseasonalized hotel room averages in each month the 15th year. Copy the column of deseasonalized values (G) together with the time column (A) to the software (here to MINITAB). Perform a regression of deseasonalized values against time and ask for prediction in the 15 added time points.

21

22

23 c. Using the values from part (b), compute point and 95% prediction interval forecasts of the hotel room averages in each month of the 15th year. See page 339 in the textbook. The same error bound can be used in the prediction interval for y as those previously used for y *. In the Minitab worksheet, calculate the bounds as the differences between column C6 (PLIM2) and C4 (PFIT1) and the differences between C5 (PLIM1) and C4. Commands that can be used in Session Window if not Calculator is used

24 Now, the forecasts for y (hotel room averages) can be formed by multiplying the forecasted deseasonalized values (in column C4) with the estimated seasonal components from the Excel spreadsheet. Thus copy the first 12 seasonal components to MINITAB and then add the bounds to these forecasts. Forecasts Lower 95% Pred.limits Upper 95% Pred. Limits


Download ppt "Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)"

Similar presentations


Ads by Google