# 1 previs£o | pedro paulo balestrassi | 4 â€“ exponential smoothing methods

Post on 28-Mar-2015

216 views

Embed Size (px)

TRANSCRIPT

- Slide 1

1 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br 4 Exponential Smoothing Methods Slide 2 2 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Signal and Noise Smoothing can be seen as a technique to separate the signal and the noise as much as possible and in that a smoother acts as a filter to obtain an "estimate" for the signal. Slide 3 3 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Smoothing a data set Slide 4 4 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Smoothing a Constant Process Slide 5 5 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Dow Jones Index (1999-2001) A constant model can be used to describe the general pattern of the data. Slide 6 6 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Constant Process For the constant process, the smoother in (4.2) does a good job How realistic is the assumption of constant process though? Slide 7 7 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Dow Jones Index (1999-2006) The constant process assumption is no longer valid Slide 8 8 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br In real life A constant process is not the norm but the exception Second Law of Thermodynamics says so: left to its own, any process will deteriorate As seen in Figure 4.3, trying to smooth a non-constant process with the average of the data points up to the current time does not look too promising Slide 9 9 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Smoothing Methods Minitab Smoothing Methods Slide 10 10 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Minitab Moving Average Slide 11 11 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Minitab Single Exponential Smoothing Slide 12 12 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Minitab Double Exponential Smoothing Slide 13 13 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Minitab Winters Method Slide 14 14 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Simple Moving Average Average of the data points in a moving window of length N Of course the question is: what should N be? Slide 15 15 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Slide 16 16 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Slide 17 17 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Moving Average for Metals Data Metals Length 60 NMissing 0 Moving Average Length 3 Accuracy Measures MAPE 0,890317 MAD 0,402299 MSD 0,255287 Forecasts Period Forecast Lower Upper 61 49,2 48,2097 50,1903 62 49,2 48,2097 50,1903 63 49,2 48,2097 50,1903 64 49,2 48,2097 50,1903 65 49,2 48,2097 50,1903 66 49,2 48,2097 50,1903 To calculate a moving average, Minitab averages consecutive groups of observations in a series. For example, suppose a series begins with the numbers 4, 5, 8, 9, 10 and you use the moving average length of 3. The first two values of the moving average are missing. The third value of the moving average is the average of 4, 5, 8; the fourth value is the average of 5, 8, 9; the fifth value s the average of 8, 9, 10. Slide 18 18 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Centered moving average By default, moving average values are placed at the period in which they are calculated. For example, for a moving average length of 3, the first numeric moving average value is placed at period 3, the next at period 4, and so on. When you center the moving averages, they are placed at the center of the range rather than the end of it. This is done to position the moving average values at their central positions in time. If the moving average length is odd: Suppose the moving average length is 3. In that case, Minitab places the first numeric moving average value at period 2, the next at period 3, and so on. In this case, the moving average value for the first and last periods is missing ( *). If the moving average length is even: Suppose the moving average length is 4. The center of that range is 2.5, but you cannot place a moving average value at period 2.5. This is how Minitab works around the problem. Calculate the average of the first four values, call it MA1. Calculate the average of the next four values, call it MA2. Average those two numbers (MA1 and MA2), and place that value at period 3. Repeat throughout the series. In this case, the moving average values for the first two and last two periods are missing ( *). Slide 19 19 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Moving average methods tem sempre a desvantagem de possuirem Autocorrelao! Slide 20 20 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br As N gets smaller, MA(N) reacts faster to the changes in the data! If the process is expected to be constant, a large N can be used whereas a small N is preferred if the process is changing. (quanto maior o nmero de N maior a suavizao) Slide 21 21 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br First-Order Exponential Smoothing For a faster reacting smoother, have a weighted average with exponentially decreasing weights Slide 22 22 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Use for: Data with no trend, and Data with no seasonal pattern Short term forecasting Forecast profile: Flat line ARIMA equivalent: (0,1,1) model Single Exponential Smoothing: When to Use Slide 23 23 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Optimal ARIMA weight 1 Minitab fits with an ARIMA (0,1,1) model and stores the fits. 2 The smoothed values are the ARIMA model fits, but lagged one time unit. 3 Initial smoothed value (at time one) by backcasting: initial smoothed value = [smoothed in period two - a (data in period 1)] / (1 - a) where 1- a estimates the MA parameter. Specified weight 1 Minitab uses the average of the first six (or N, if N < 6) observations for the initial smoothed value (at time zero). Equivalently, Minitab uses the average of the first six (or N, if N < 6) observations for the initial fitted value (at time one). Fit(i) = Smoothed(i-1). 2 Subsequent smoothed values are calculated from the formula: smoothed value at time t = a (data at t) + (1 - a) (smoothed value at time t - 1) where a is the weight. Slide 24 24 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br The fitted value at time t is the smoothed value at time t-1. The forecasts are the fitted value at the forecast origin. If you forecast 10 time units ahead, the forecasted value for each time will be the fitted value at the origin. Data up to the origin are used for the smoothing. In naive forecasting, the forecast for time t is the data value at time t-1. Perform single exponential smoothing with a weight of one to give naive forecasting. Prediction limits Based on the mean absolute deviation (MAD). The formulas for the upper and lower limits are: Upper limit = Forecast + 1.96 * 1.25 * MAD Lower limit = Forecast - 1.96 * 1.25 * MAD The value of 1.25 is an approximate proportionality constant of the standard deviation to the mean absolute deviation. Hence, 1.25 * MAD is approximately the standard deviation. Slide 25 25 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br The three accuracy measures, MAPE, MAD, and MSD, were 1.12, 0.50, and 0.43, respectively for the single exponential smoothing model, compared to 1.55, 0.70, and 0.76, respectively, for the moving average fit (see Example of moving average). Because these values are smaller for single exponential smoothing, you can judge that this method provides a better fit to these data.Example of moving average Slide 26 26 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Lambda Alpha no Minitab Slide 27 27 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Two Issues The initial value, The discount factor, Slide 28 28 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br The Initial Value Slide 29 29 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Two Commonly Used Estimates Slide 30 30 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br The discount factor, Slide 31 31 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br The smoothed values follow the original observations more closely. In general, as alpha gets closer to 1, and more emphasis is put on the last observation, the smoothed values will approach the original observations. From February 2003 to February 2004) the smoothed values consistently underestimate the actual data. Use Options=25 para Initial Vaue Use Options=1 para Initial Vaue Slide 32 32 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br The choice of A value between 0.1 and 0.4 is commonly recommended For more rigorous method for estimating is given in 4.6.1 Slide 33 33 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br A more general model For a more general model for y in time, we have where is the vector of unknown parameters and t are the uncorrelated errors. Slide 34 34 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Second-Order Exponential Smoothing If the data shows a linear trend, a more appropriate model will be Slide 35 35 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Simple Exponential Smoothing on a Linear Trend Bias in the fit! Linear trend Simple Exponential Slide 36 36 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Dow Jones Index (1999-2006) Bias is obvious for =0.3 when there is a linear trend Slide 37 37 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Second-Order Exponential Smoothing The simple exponential smoothing of the first-order exponential smoother Slide 38 38 Previso | Pedro Paulo Balestrassi | www.pedro.unifei.edu.br Use for: Data with constant or non-constant trend, and Data with no seasonal pattern Short term forecasting Forecast profile: Straight line with slope equal to last trend estimate ARIMA