outline simple moving average weighted moving average exponential smoothing

24
Outline Simple Moving Average Weighted Moving Average Exponential Smoothing Comparison of Simple Moving Average and Exponential Smoothing LESSON 5: FORECASTING STATIONARY TIME SERIES METHODS

Upload: kylar

Post on 05-Jan-2016

76 views

Category:

Documents


2 download

DESCRIPTION

LESSON 5: FORECASTING STATIONARY TIME SERIES METHODS. Outline Simple Moving Average Weighted Moving Average Exponential Smoothing Comparison of Simple Moving Average and Exponential Smoothing. Time Series Methods. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Outline

• Simple Moving Average• Weighted Moving Average• Exponential Smoothing• Comparison of Simple Moving Average and

Exponential Smoothing

LESSON 5: FORECASTING STATIONARY TIME SERIES METHODS

Page 2: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Time Series Methods

• In this lesson we shall discuss some time series forecasting methods. All methods discussed in this lesson are designed for stationary series. Recall from the previous lesson that a stationary series contains only the average and no trend, seasonality, cyclicity, etc.

• No method is superior to any other method in every context. In a particular context, various methods can be used and evaluated using a suitable measure (e.g., MAD, MSE, MAPE etc.) discussed in the previous lesson. Then, it is possible to use the method that works best in that context. See the Taco Bell example.

• A comparison among the methods is done near the end of the lesson.

Page 3: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Time Series Methods

• All these methods will be illustrated with the following example: Suppose that a hospital would like to forecast the number of patients arrival from the following historical data:

Week Patients Arrival

1 400

2 380

3 411

4 415• Note: Although week 4 data is given, some methods

require that forecast for period 4 is first computed before computing forecast for period 5.

Page 4: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Time Series MethodsSimple Moving Average

Week

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

| | | | | |0 5 10 15 20 25 30

Actual patientarrivals

A moving average of order N is simply the arithmetic average of the most recent N observations. For 3-week moving averages N=3; for 6-week moving averages N=6; etc.

Page 5: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

PatientWeek Arrivals

1 4002 3803 411

Time Series MethodsSimple Moving Average

Given 3-week data, one-step-ahead forecast for week 4 or two-step-ahead forecast for week 5 is simply the arithmetic average of the first 3-week data

Page 6: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

4F

4for week

forecast ahead-step-One

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

PatientWeek Arrivals

1 4002 3803 411

Time Series MethodsSimple Moving Average

Page 7: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

| | | | | |0 5 10 15 20 25 30

Time Series MethodsSimple Moving Average

Week

PatientWeek Arrivals

1 4002 3803 411

5for week

forecast ahead-step-Two

5F

Page 8: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

PatientWeek Arrivals

2 3803 4114 415

Time Series MethodsSimple Moving Average

5for week

forecast ahead-step-One

5F

One-step-ahead forecast for week 5 is computed from the arithmetic average of weeks 2, 3 and 4 data

Page 9: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

Actual patientarrivals

3-week MAforecast

Time Series MethodsSimple Moving Average

Page 10: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Week

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

| | | | | |0 5 10 15 20 25 30

Actual patientarrivals

3-week MAforecast

6-week MAforecast

Time Series MethodsSimple Moving Average

Page 11: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Taco Bell determined that the demand for each 15-minute interval

can be estimated from a 6-week simple moving average of sales.

The forecast was used to determine the number of employees needed.

Page 12: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Time Series MethodsWeighted Moving Average

In the simple moving average method each of the N periods is equally important for the purpose of forecasting.

Weighted moving average is more general than the simple moving average and assigns different weights to different periods. Let,

Then, the one-step ahead forecast for period t

NtNtttttt DwDwDwF 2211

Ni

itD

itw

it

it

,,2,1

period for data actual

period to assigned weight

Page 13: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

3-week MAforecast Weighted Moving Average

Assigned weights

t-1 0.70t-2 0.20t-3 0.10

Time Series MethodsWeighted Moving Average

4F

Page 14: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

3-week MAforecast Weighted Moving Average

Assigned weights

t-1 0.70t-2 0.20t-3 0.10

Time Series MethodsWeighted Moving Average

5F

Page 15: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

• Exponential smoothing method computes a forecast value which is the weighted average of the most recent data and forecast values.

• The weight assigned to the most recent data is called the smoothing constant, and the weight assigned to the most recent forecast is (1- ).

• The method requires an initial forecast value. The initial forecast value may be obtained by some other forecasting technique.

• If the smoothing constant, is large, the forecast values fluctuate with the actual data. If is small, the fluctuation is less.

Time Series MethodsExponential Smoothing

Page 16: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

• The one-step-ahead forecast for period t

• Notice that therefore,

• With further expansion of the expression for forecast for period t it can be seen that the forecast for period t depends on all previous data!!

Time Series MethodsExponential Smoothing

11 1 ttt FDF

3

33

221

332

21

22

21

221

111

111

11

11

tttt

tttt

ttt

tttt

FDDD

FDDD

FDD

FDDF

Page 17: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

Exponential Smoothing = 0.10

Ft = Dt-1 + (1 - )Ft - 1

Time Series MethodsExponential Smoothing

Page 18: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

Exponential Smoothing = 0.10

Ft = Dt-1 + (1 - )Ft - 1

Initial forecast valueF3 = (400 + 380)/2=390D3 = 411

Time Series MethodsExponential Smoothing

Page 19: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

Exponential Smoothing = 0.10

Ft = Dt-1 + (1 - )Ft - 1

Time Series MethodsExponential Smoothing

Initial forecast valueF3 = (400 + 380)/2=390D3 = 411

4F

Page 20: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Week

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

| | | | | |0 5 10 15 20 25 30

F4 = 392.1D4 = 415

Exponential Smoothing = 0.10

Ft = Dt + (1 - )Ft - 1

Time Series MethodsExponential Smoothing

5F

Page 21: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

450 —

430 —

410 —

390 —

370 —Pat

ien

t ar

riva

ls

Week

| | | | | |0 5 10 15 20 25 30

Time Series MethodsExponential Smoothing

Page 22: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

Comparison of Exponential Smoothing and Simple Moving Average

• Both Methods – Are designed for stationary demand– Require a single parameter– Lag behind a trend, if one exists– Have the same distribution of forecast error if

)1/(2 N

Page 23: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

• Moving average uses only the last N periods data, exponential smoothing uses all data

• Exponential smoothing uses less memory and requires fewer steps of computation; store only the most recent forecast!

Comparison of Exponential Smoothing and Simple Moving Average

Page 24: Outline Simple Moving Average Weighted Moving Average Exponential Smoothing

READING AND EXERCISES

Lesson 5

Reading:

Section 2.7, pp. 66-77 (4th Ed.), pp. 63-73 (5th Ed.)

Exercises:

17, 18, 24, pp. 69, 75-76 (4th Ed.), pp. 66, 72 (5th Ed.)