Script
FORECASTING – Exponential Smoothing
Slide 1
· Welcome back. In this module we show how an exponential smoothing approach can also be used to forecast results for stationary models.
Slide 2
· We’ve previously shown how to generate forecasts for stationary models using the last period, the n-period moving average, and the n-period weighted moving average approaches.
· But each of these only uses a little data -- 1-week for the last period technique and n weeks for the moving average or weighted moving average techniques – the rest of the data is ignored in the calculation of the next forecasted value.
· Exponential smoothing takes into account all previous data values of the time series though with lesser and lesser weights as we go back in time.
Slide 3
· Here are the basic concepts in the exponential smoothing approach.
· Actually, exponential smoothing is a way to smooth out the data by removing much of the “noise” or random effects.
· The idea is that at every period an exponentially smoothed level is calculated updating the previous level. The level is the best revised estimate at each period for the value of the stationary parameter beta0. The level at period t
· Takes the actual value at time t, y sub t and smoothes it to a level L sub t, by weighting the current data point by a factor alpha and putting the remaining weight of 1 minus alpha of the last level, L sub t minus 1
· So L sub t, the revised estimate for the level at period t, equals
· Some weight, alpha, times
· The current time series value, y sub t
· Plus the remaining weight, 1 minus alpha,
· Times the last estimate for the level.
Slide 4
· What number should we take for alpha to smooth the data?
· Now the idea behind smoothing the data in the first place is to get a more realistic look at what is going on by reducing the effects of the random errors.
o The modeler or the decision maker can select any weight of alpha between 0 and 1.
§ Higher values of alpha allow the level to be swayed quickly by recent observations
§ Whereas lower values of alpha keep the time series levels flatter since less weight is paid to any one observation.
· Typical values of alpha tend to be between .1 and .7, but alpha can be any fraction.
· Later in this module we show the smoothed graphs for both an alpha of .1 and one of .7.
o The value 1 minus alpha is called the damping factor.
Slide 5
· The smoothed values of the time series can then be used to forecast future values of a stationary time series.
· The level, L sub t, is the best estimate for the unknown stationary value beta0 in the time series.
· Since that is the best estimate at period t, it will be our forecast for period t plus 1.
· That is F of t plus 1 equals L sub t.
· And since the model is stationary, this will be the forecast for all future values of the time series until new data is obtained.
Slide 6
· Here is how exponential smoothing works.
· Once a value for alpha has been selected, the level for the current period depends only on two quantities:
o The current observation which is weighted by alpha
o And the forecasted value for the period, which is actually the last calculated value for the Level, L sub t minus 1.
· The calculations then for L sub t and hence F sub t plus 1 reduce to the alpha times the current value plus 1 minus alpha times the last forecasted value for the level.
· But to get started we need a “first” value of the level.
o Since there is no Level 0, or L sub 0, we cannot calculate the estimate for Level 1 using the formula alpha times y sub 1 plus 1 minus alpha times L sub 0.
o Since the value for period 1, y sub 1 is the only data value we’ve got, it must be the best estimate for the initial Level, L sub 1, which in turn is the forecast for period 2, F sub 2.
o So the initialization step is to set the first value for the Level equal to the first value of the time series.
Slide 7
· We now show how exponential smoothing works by using it to generate the levels for the first 4 weeks of the yoyo problem.
· The first 4 observed values are
o 415, 236, 348, and 272
· Let’s suppose the modeler has chosen to use exponential smoothing with a smoothing constant of alpha equal to .1.
· We begin with the initialization step for week 1 where
o We set the level for week 1 equal to the actual time series value for week 1 of 415.
o So our forecast for week 2 is the level for week 1 of 415.
Slide 8
· Continuing.
· For period 2
· The level for week 2 equals .1 times the value for week 2 of 236 plus .9 times the last level of 415.
o This gives a level for week 2, L sub 2, of 397.1 and this
o Is our forecast, F sub 3, for week 3.
· For week 3
· The level for week 3 equals .1 times the value for week 3 of 348 plus .9 times the last level of 397.1
o This gives a level for week 3, L sub 3, of 392.19 and this
o Is our forecast, F sub 4, for week 4.
· For week 4
· The level for week 4 equals .1 times the value for week 4 of 272 plus .9 times the last level of 392.19
o This gives a level for week 4, L sub 4, of 380.171 and this
o Is our forecast, F sub 5, for week 5. We would continue doing this until we calculated a level for week 52, L sub 52, which would be our forecast, F sub 53, for week 53.
Slide 9
· Here is how exponential smoothing forecasts can be generated on a spreadsheet.
· The first level in cell C2 is equal to the first value in cell B2
· This, in turn, is the forecast for week 2 in cell D3.
· The exponentially smoothed level for week 2 is .1 times the current data value in cell B3 plus .9 times the last level in cell C2.
· Now since the level contained relative cell references, dragging the formula in cell C3 down to cell C53 gives the best estimates for the levels for each week
· And dragging cell D3 down to cell D54, gives the respective forecasts for weeks 3, 4, 5, all the way up to the week of interest, week 53.
· As with all of our stationary models, the forecast for week 54, equals the forecast for week 53, so the formula for cell D55 is equal to cell D54
· The formula in cell D54 is then dragged down to cell D55 to show the forecasts for weeks 53, 54, and 55 are all the same.
Slide 10
· We previously said that exponential smoothing uses all previous time series values in the forecast. Here we show why this is true.
· Recall the formula we are using is
o L sub t equals alpha times y sub t plus 1 minus alpha times L sub t minus 1
· Going back one period and applying the same formula we get
o L sub t minus 1 equals alpha times y sub t minus 1 plus 1 minus alpha times L sub t minus 2
o L sub t minus 2 equals alpha times y sub t minus 2 plus 1 minus alpha times L sub t minus 3
o And L sub t minus 3 equals alpha times y sub t minus 3 plus 1 minus alpha times L sub t minus 4
o And so forth
· Substituting the formula for L sub t minus 1 into the first of these formulas we get the following:
o Which simplifies to this
o Making the substitution for L sub t minus 2 gives this.
o And making the substitution for L sub t minus 3 gives this
o And so forth.
· Thus all time series values are used with each successive weight dampened by the fraction 1 minus alpha from the next more recent time series value. That is the weights on the time series values get smaller and smaller as we go back in time.
Slide 11
· How much smoothing do we get when we use a value of alpha?
· We’ve said that the lower the value of alpha, the more smoothed the time series will be.
· Here are the time series plots with
o the actual time series values in blue and
o the smoothed time series values in dark red for an alpha value of .1.
o Notice that the smoothed series really is relatively flat.
Slide 12
· Now lets look at the same series smoothed with a much larger value of alpha
· Of .7
· Again the actual series is in blue
· And the smoothed series is in dark red
· We notice this time that some but not very much smoothing has taken place.
· The smoothed series is heavily influenced by the most recent observation.
Slide 13
· So what value of alpha should be used?
· Again this is up to the modeler.
· If the modeler is considering several values of alpha, a forecast for each one could be prepared.
o He should only use useful values of alpha. Using alpha equal 0 would mean the level would always be the same first level, which in turn is the first time series value – it would never change – so 0 is not a useful value of alpha.
· A performance measure could then be used to determine which of the values of alpha under consideration performed the best given the actual time series data.
Slide 14
· Let’s review what we’ve discussed in this module.
· We’ve shown that exponential smoothing is a way of smoothing some of the randomness out of the model.
· We’ve define the smoothed level for a period to be:
o alpha times the time series value at that point plus 1 minus alpha times the last value for the level.
· And the forecast for time period t plus 1 is the smoothed value for period t.
· The process requires an initialization step.
· This consists of setting the first smoothed value to the actual first time series data point.
· We’ve shown that the smaller the value of alpha we take, the smoother the time series.
· And we showed the Excel approach to exponential smoothing.
That’s it for this module. Do any assigned homework and I’ll talk to you again next time.