# Elementary Forecasting Methods A Time Series is a set of regular observations Z t taken over time. By the term spot estimate we mean a forecast in a model.

## Presentation on theme: "Elementary Forecasting Methods A Time Series is a set of regular observations Z t taken over time. By the term spot estimate we mean a forecast in a model."— Presentation transcript:

Elementary Forecasting Methods A Time Series is a set of regular observations Z t taken over time. By the term spot estimate we mean a forecast in a model that works under deterministic laws. Exponential Smoothing. This uses a recursively defined smoothed series S t and a doubly smoothed series S t [2]. Exponential smoothing requires very little memory and has a single parameter. For commercial applications, the value = 0.7 produces good results. Filter: S t = Z t + (1 - ) S t-1, [ 0, 1] = Z t + (1 - ) Z t-1 + (1 - ) 2 S t-2 S t [2] = S t + (1 - ) S t-1 [2] Forecast: Z T+m = {2 S T - S T [2] } + {S T - S T [2] } m / (1 - ) Example [ = 0.7] Time t 1971 72 73 74 75 76 77 78 79 80 81 Z t 66 72 101 145 148 171 185 221 229 345 376 S t (66) 70.2 91.8 129.0 142.3 162.4 178.2 208.2 222.7 308.3 355.7 S t [2] (66) 68.9 84.9 115.8 134.3 154.0 170.9 197.0 214.5 280.2 333.0 Z 1983 = {2 (355.7) - 333} + {355.7 - 333} (2) (0.7) / (0.3) = 484.3

Moving Average Model. If the time series contains a seasonal component over n “seasons”, the Moving Average model can be used to generate deseasonalised forecasts. Filter:M t = X i / n = M t - 1 + { Z t - Z t - n } / n M t [2] = M t / n Forecast: Z T + k = { 2 (M T - M T [2] ) } + { M T - M T [2] } 2 k / ( n - 1) Example. Time t 1988 1989 1990 1991 Sp Su Au Wi Sp Su Au Wi Sp Su Au Wi Sp Su Au Wi Z T 5 8 5 13 7 10 6 15 10 13 11 17 12 15 14 20 M T - - - 7.75 8.25 8.75 9.00 9.50 10.25 11.00 12.25 12.75 13.25 13.75 14.50 15.25 M T [2] - - - - - - 8.44 8.88 9.38 9.94 10.75 11.56 12.31 13.00 13.56 14.19 The deseasonalised forecast for Sp 1992, which is 4 periods beyond the last observation, is Z T+4 = { 2 (15.25 - 14.19) } + { 15.25 - 14.19 } 2 (4) / 3 = 19.14 In simple multiplicative models we assume that the components are Z t = T (trend) * S(seasonal factor) * R (residual term). The following example demonstrates how to extricate these components from a series.

Time (1) Raw (2) Four Month (3) Centered (4) Moving (5) Detrended (6) Deseasonalised (7) Residual Data Moving Total Moving Total Average Data (1) / (4) Data (1)/(Seasonal) Series (6) / (4) t Z t =T*S*R T*R T T S*R T*R R Sp 1988 5-- -- --5.957-- -- Su 8-- -- --7.633-- 31 Au 5 64 8.000 62.5007.190 89.875 33 Wi13 68 8.500 152.9419.214108.400 35 Sp 1989 7 71 8.875 78.8738.340 93.972 36 Su10 74 9.250 108.108 9.541103.146 38 Au 6 79 9.875 60.7598.628 87.363 41 Wi15 85 10.625 141.176 10.631100.057 44 Sp 199010 93 11.625 86.022 11.914102.486 49 Su13100 12.500 104.000 12.403 99.224 51 Au11104 13.000 84.615 15.819121.685 53 Wi17108 13.500 125.926 12.049 89.252 55 Sp 199112113 14.125 84.956 14.297101.218 58 Su15119 14.875 100.84014.311 96.208 61 Au14 --- --- --- 20.133 -- -- Wi20 --- --- --- 14.175 --

The seasonal data is got by rearranging Sp Su Au Wi column (5). The seasonal factors are then 1988 -- -- 62.500 152.941 reused in column (6)1989 78.873 108.108 60.759 141.176 1990 86.022 104.000 84.615 125.926 Due to round-off errors in the arithmetic, 1991 84.956 100.840 -- -- it is necessary to readjust the means, so Means 83.284 104.316 69.291 140.014 that they add up to 400 (instead of 396.905).Factors 83.933 105.129 69.831 141.106 The diagram illustrates the components present in the data. In general when analysing time series data, it is important to remove these basic components before proceeding with more detailed analysis. Otherwise, these major components will dwarf the more subtle component, and will result in false readings. The reduced forecasts are multiplied by the appropriate trend and seasonal components, at the end of the analysis. The forecasts that result from the models above, are referred to as “spot estimates”. This is meant to convey the fact that sampling theory is not used in the analysis and so no confidence intervals are possible. Spot estimates are unreliable and should only be used to forecast a few time periods beyond the last observation in the time series. 1988198919901991 10 20 Trend Raw Data

Normal Linear Regression Model In the model with one independent variable, we assume that the true relationship is y = b 0 + b 1 x and that our observations (x 1, y 1 ), (x 2, y 2 ), …, (x n, y n ) is a random sample from the bivariate parent distribution, so that y = 0 + 1 x +, where -> N( 0, ). If the sample statistics are calculated, as in the deterministic case, then 0, 1 and r are unbiased estimates for the true values, b 0, b 1 and, where r and are the correlation coefficients of the sample and parent distributions, respectively. Ify = 0 + 1 x 0 is the estimate for y given the value x 0, then our estimate of 2 is s 2 = SSE / (n - 2) = ( y i - y i ) 2 / (n - 2) and VAR [ y] = s 2 { 1 + 1/n + (x 0 - x ) 2 / ( x i - x ) 2 }. The standardised variable derived from y has a t n - 2 distribution, so confidence intervals for the true value of y corresponding to x 0 is y 0 + t n - 2 s 1 + 1/n + (x 0 - x ) 2 / ( x i - x ) 2.

Example. Consider our previous regression example: y = 23 / 7 + 24 / 35 x x i 0 1 2 3 4 5 ( 6 ) y i 3 5 4 5 6 7 y i 3.286 3.971 4.657 5.343 6.029 6.714 7.40 (y i - y i ) 2 0.082 1.059 0.432 0.118 0.001 0.082 => ( y i - y i ) 2 = 1.774, s 2 = 0.4435, s = 0.666, (x i - x ) 2 = 17,5, x = 2.5, t 4, 0.95 = 2.776, t 4, 0.95 (s) = 1.849 Letf(x 0 ) = t 4, 0.9 s 1 + 1/n + (x 0 - x ) 2 / (x i - x ) 2. Thenx 0 0 1 2 3 4 5 6 f(x 0 )2.282 2.104 2.009 2.009 2.104 2.282 2.526 y 0 - f(x 0 )1.004 1.867 2.648 3.334 3.925 4.432 4.874 y 0 + f(x 0 )5.568 6.075 6.666 7.352 8.133 8.996 9.926 The diagram shows the danger of extrapolation. It is important in forecasting that the trend is initially removed from the data so that the slope of the regression line is kept as close to zero as possible. A description of the Box-Jenkins methodology and Spectral Analysis, which are the preferred techniques for forecasting commercial data, is to be found in standard text books. 2 4 6 8 Y X 6 95% Confidence Interval when x=6

Download ppt "Elementary Forecasting Methods A Time Series is a set of regular observations Z t taken over time. By the term spot estimate we mean a forecast in a model."

Similar presentations