Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series...

42
Lesson 4 -Part A Forecasting • Quantitative Approaches to Forecasting • Components of a Time Series • Measures of Forecast Accuracy • Smoothing Methods • Trend Projection • Trend and Seasonal Components • Regression Analysis

Transcript of Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series...

Page 1: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Lesson 4 -Part AForecasting

• Quantitative Approaches to Forecasting

• Components of a Time Series

• Measures of Forecast Accuracy

• Smoothing Methods• Trend Projection

• Trend and Seasonal Components

• Regression Analysis

Page 2: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Forecasting Methods

ForecastingForecastingMethodsMethods

ForecastingForecastingMethodsMethods

QuantitativeQuantitativeQuantitativeQuantitative QualitativeQualitativeQualitativeQualitative

CausalCausalCausalCausal Time SeriesTime SeriesTime SeriesTime Series

SmoothingSmoothingSmoothingSmoothing TrendTrendProjectionProjection

TrendTrendProjectionProjection

Trend ProjectionTrend ProjectionAdjusted forAdjusted for

Seasonal InfluenceSeasonal Influence

Trend ProjectionTrend ProjectionAdjusted forAdjusted for

Seasonal InfluenceSeasonal Influence

Page 3: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Quantitative Approaches to Forecasting• Quantitative methods are based on an analysis of historical data

concerning one or more time series.

• A time series is a set of observations measured at successive points in time or over successive periods of time.

• If the historical data used are restricted to past values of the series that we are trying to forecast, the procedure is called a time series method.

• If the historical data used involve other time series that are believed to be related to the time series that we are trying to forecast, the procedure is called a causal method.

Page 4: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Time Series Methods• Three time series methods are:

– smoothing– trend projection– trend projection adjusted for seasonal influence

Page 5: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Components of a Time Series• The pattern or behavior of the data in a time series has

several components.

• The four components we will study are:

TrendTrendTrendTrend CyclicalCyclicalCyclicalCyclical SeasonalSeasonalSeasonalSeasonal IrregularIrregularIrregularIrregular

Page 6: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Components of a Time Series

• Trend Component

– The trend component accounts for the gradual shifting of the time series to relatively higher or lower values over a long period of time.

- Trend is usually the result of long-term factors such as changes in the population, demographics, technology, or consumer preferences.

Page 7: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Components of a Time Series

– Any regular pattern of sequences of values above and below the trend line lasting more than one year can be attributed to the cyclical component.

• Cyclical Component

– Usually, this component is due to multiyear cyclical movements in the economy.

Page 8: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Components of a Time Series

• The The seasonal componentseasonal component accounts for accounts for regular patterns of variability within certain regular patterns of variability within certain time periods, such as a year.time periods, such as a year.

• Seasonal Component

• The variability does not always correspond The variability does not always correspond with the seasons of the year (i.e. winter, with the seasons of the year (i.e. winter, spring, summer, fall).spring, summer, fall).• There can be, for example, within-week or There can be, for example, within-week or within-day “seasonal” behavior.within-day “seasonal” behavior.

Page 9: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Components of a Time Series

• The The irregular componentirregular component is caused by short- is caused by short-term, unanticipated and non-recurring term, unanticipated and non-recurring factors that affect the values of the time factors that affect the values of the time series.series.

• Irregular Component

• It is unpredictable.It is unpredictable.

• This component is the residual, or “catch-This component is the residual, or “catch-all,” factor that accounts for unexpected all,” factor that accounts for unexpected data values.data values.

Page 10: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Measures of Forecast Accuracy

The average of the squared forecast errors for the historical data is calculated. The forecasting method or parameter(s) that minimize this mean squared error is then selected.

The mean of the absolute values of all forecast errors is calculated, and the forecasting method or parameter(s) that minimize this measure is selected. (The mean absolute deviation measure is less sensitive to large forecast errors than the mean squared error measure.)

• Mean Squared Error

• Mean Absolute Deviation

Page 11: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods

• Three common smoothing methods are:

• In cases in which the time series is fairly stable and has no significant trend, seasonal, or cyclical effects, one can use smoothing methods to average out the irregular component of the time series.

Exponential SmoothingExponential Smoothing

Weighted Moving AveragesWeighted Moving Averages

Moving AveragesMoving Averages

Page 12: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods

The moving averages method consists of computing an average of the most recent n data values for the series and using this average for forecasting the value of the time series for the next period.

(most recent data values)Moving Average =

n

n(most recent data values)

Moving Average = n

n

• Moving Averages

Page 13: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Sales of Comfort brand headache medicine forSales of Comfort brand headache medicine for

the past ten weeks at Rosco Drugsthe past ten weeks at Rosco Drugs

are shown on the next slide. If are shown on the next slide. If

Rosco Drugs uses a 3-periodRosco Drugs uses a 3-period

moving average to forecast sales,moving average to forecast sales,

what is the forecast for Week 11?what is the forecast for Week 11?

• Example: Rosco Drugs

Smoothing Methods: Moving Averages

Page 14: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

• Example: Rosco Drugs

Smoothing Methods: Moving Averages

1122334455

66778899

1010

110110115115125125120120125125

120120130130115115110110130130

WeekWeek WeekWeekSalesSales SalesSales

Page 15: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Time Series Plot using MINITAB

Page 16: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Week

Sale

s

10987654321

140

130

120

110

100

90

80

70

60

50

Time Series Plot of Sales

•Time series appears to be stable over time, though random variability is present.•Thus, smoothing methods are applicable.

Page 17: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods: Moving Averages

11223344556677889910101111

110110115115125125120120125125120120130130115115110110130130

116.7116.7120.0120.0123.3123.3121.7121.7125.0125.0121.7121.7118.3118.3118.3118.3

123.3123.3121.7121.7125.0125.0121.7121.7118.3118.3118.3118.3

116.7116.7120.0120.0

WeekWeek SalesSales 3MA3MA ForecastForecast

(110 + 115 + (110 + 115 + 125)/3125)/3

(110 + 115 + (110 + 115 + 125)/3125)/3

Page 18: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Moving Averages using MINITAB

Page 19: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

You can specify this i.e. 4, 6, 12, … & its depend on the problem

# of future forecasts needed

# of data points

Page 20: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.
Page 21: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Moving Average for Sales

Moving Average: Length 3

Time Sales MA Predict Error

1 110 * * *

2 115 * * *

3 125 116.667 * *

4 120 120.000 116.667 3.3333

5 125 123.333 120.000 5.0000

6 120 121.667 123.333 -3.3333

7 130 125.000 121.667 8.3333

8 115 121.667 125.000 -10.0000

9 110 118.333 121.667 -11.6667

10 130 118.333 118.333 11.6667

Forecasts

Period Forecast 95% CI

11 118.333 101.954 134.713

Page 22: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.
Page 23: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Week

Sale

s

1110987654321

135

130

125

120

115

110

105

100

Moving Average

Length 3

Accuracy MeasuresMAPE 6.3203MAD 7.6190MSD 69.8413

Variable

Forecasts95.0% PI

ActualFits

Moving Average Plot for Sales

MSE

# of values to be included in the moving average is chosen such that itminimizes the MSE

Page 24: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods• Weighted Moving Averages

– The more recent observations are typically given more weight than older observations.

– For convenience, the weights usually sum to 1.

– To use this method we must first select the number of data values to be included in the average.

– Next, we must choose the weight for each of the data values.

Page 25: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods

• Weighted Moving Averages

– An example of a 3-period weighted moving average (3WMA) is:

3WMA = .2(110) + .3(115) + .5(125) = 1193WMA = .2(110) + .3(115) + .5(125) = 119

Most recent of Most recent of thethe

three three observationsobservations

Weights (.2, .3,Weights (.2, .3,and .5) sum to and .5) sum to

11

Page 26: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods

• Exponential Smoothing– This method is a special case of a weighted moving

averages method; we select only the weight for the most recent observation.

– The weights for the other data values are computed automatically and become smaller as the observations grow older.

– The exponential smoothing forecast is a weighted average of all the observations in the time series.

Page 27: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods• Exponential Smoothing Model

FFtt+1+1 = = YYtt + (1 – + (1 – ))FFtt

wherewhere

FFtt+1+1 = forecast of the time series for period = forecast of the time series for period tt + 1 + 1

YYtt = actual value of the time series in period = actual value of the time series in period tt

FFtt = forecast of the time series for period = forecast of the time series for period tt

= smoothing constant (0 = smoothing constant (0 << << 1) 1)

To start theTo start thecalculations,calculations,we let we let FF11 = =

YY11

To start theTo start thecalculations,calculations,we let we let FF11 = =

YY11

Page 28: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

– With some algebraic manipulation, we can rewrite Ft+1 = Yt + (1 – )Ft as:

Smoothing Methods

• Exponential Smoothing Model

FFtt+1+1 = = FFtt + + YYtt – – FFtt))

– We see that the new forecast Ft+1 is equal to the previous forecast Ft plus an adjustment, which is times the most recent forecast error, Yt – Ft.

Page 29: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Sales of Comfort brand headache medicine forSales of Comfort brand headache medicine for

the past ten weeks at Rosco Drugsthe past ten weeks at Rosco Drugs

are shown on the next slide. Ifare shown on the next slide. If

Rosco Drugs uses exponentialRosco Drugs uses exponential

smoothing to forecast sales, whichsmoothing to forecast sales, which

value for the smoothing constant value for the smoothing constant ,,

.1 or .8, gives better forecasts?.1 or .8, gives better forecasts?

• Example: Rosco Drugs

Smoothing Methods: Exponential Smoothing

Page 30: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

• Example: Rosco Drugs

1122334455

66778899

1010

110110115115125125120120125125

120120130130115115110110130130

WeekWeek WeekWeekSalesSales SalesSales

Smoothing Methods: Exponential Smoothing

Page 31: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods: Exponential Smoothing

• Exponential Smoothing ( = .1, 1 - = .9)

F1 = 110

F2 = .1Y1 + .9F1 = .1(110) + .9(110) = 110

F3 = .1Y2 + .9F2 = .1(115) + .9(110) = 110.5

F4 = .1Y3 + .9F3 = .1(125) + .9(110.5) = 111.95F5 = .1Y4 + .9F4 = .1(120) + .9(111.95) = 112.76

F6 = .1Y5 + .9F5 = .1(125) + .9(112.76) = 113.98

F7 = .1Y6 + .9F6 = .1(120) + .9(113.98) = 114.58

F8 = .1Y7 + .9F7 = .1(130) + .9(114.58) = 116.12

F9 = .1Y8 + .9F8 = .1(115) + .9(116.12) = 116.01

F10= .1Y9 + .9F9 = .1(110) + .9(116.01) = 115.41

Page 32: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods: Exponential Smoothing• Exponential Smoothing ( = .8, 1 - = .2)

F1 = 110

F2 = .8(110) + .2(110) = 110

F3 = .8(115) + .2(110) = 114

F4 = .8(125) + .2(114) = 122.80F5 = .8(120) + .2(122.80) = 120.56

F6 = .8(125) + .2(120.56) = 124.11

F7 = .8(120) + .2(124.11) = 120.82

F8 = .8(130) + .2(120.82) = 128.16

F9 = .8(115) + .2(128.16) = 117.63

F10= .8(110) + .2(117.63) = 111.53

Page 33: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods: Exponential Smoothing

[([(YY22--FF22))22 + ( + (YY33--FF33))22 + ( + (YY44--FF44))22 + . . . + ( + . . . + (YY1010--FF1010))22]/9]/9

• Mean Squared Error

In order to determine which smoothing constant gives the better performance, we calculate, for each, the mean squared error for the nine weeks of forecasts, weeks 2 through 10.

Page 34: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Smoothing Methods: Exponential Smoothing

22334455667788991100

115115125125120120125125120120130130115115110110130130

WeekWeek = .1= .1 = .8= .8

FFtt FFtt((YYtt - - FFtt))22 ((YYtt - - FFtt))22

110.0110.000

110.5110.500

111.9111.955

112.7112.766

113.9113.988

114.5114.588

116.1116.122

116.0116.011

115.4115.411

110.0110.000

114.0114.000

122.8122.800

120.5120.566

124.1124.111

120.8120.822

128.1128.166

117.6117.633

111.5111.533

25.0025.00210.2210.2

5564.8064.80149.9149.9

4436.2536.25237.7237.7

331.261.26

36.1236.12212.8212.8

77

25.0025.00121.0121.0

007.847.84

19.7119.7116.9116.9184.2384.23173.3173.3

0058.2658.26341.2341.2

77

Sum 974.22Sum 974.22 Sum 847.52Sum 847.52Sum/9 108.25Sum/9 108.25 Sum/9 94.17Sum/9 94.17MSEMSE

YYtt

Page 35: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Exponential Smoothing using MINITAB

Page 36: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

# of future forecasts needed # of data points

value for the value for the smoothing constant smoothing constant

Page 37: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.
Page 38: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.
Page 39: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Single Exponential Smoothing for Sales

Smoothing Constant Alpha 0.1

Time Sales Smooth Predict Error

1 110 110.000 110.000 0.0000

2 115 110.500 110.000 5.0000

3 125 111.950 110.500 14.5000

4 120 112.755 111.950 8.0500

5 125 113.980 112.755 12.2450

6 120 114.582 113.980 6.0205

7 130 116.123 114.582 15.4184

8 115 116.011 116.123 -1.1234

9 110 115.410 116.011 -6.0111

10 130 116.869 115.410 14.5901

Forecasts

Period Forecast Lower Upper

11 116.869 96.5445 137.193

Page 40: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Single Exponential Smoothing for Sales

Smoothing Constant Alpha 0.8

Time Sales Smooth Predict Error

1 110 110.000 110.000 0.0000

2 115 114.000 110.000 5.0000

3 125 122.800 114.000 11.0000

4 120 120.560 122.800 -2.8000

5 125 124.112 120.560 4.4400

6 120 120.822 124.112 -4.1120

7 130 128.164 120.822 9.1776

8 115 117.633 128.164 -13.1645

9 110 111.527 117.633 -7.6329

10 130 126.305 111.527 18.4734

Forecasts

Period Forecast Lower Upper

11 126.305 107.735 144.876

Page 41: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.
Page 42: Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection.

Week

Sale

s

1110987654321

140

130

120

110

100

Smoothing ConstantAlpha 0.1

Accuracy MeasuresMAPE 6.6994MAD 8.2958MSD 97.4232

Variable

Forecasts95.0% PI

ActualFits

Single Exponential Smoothing Plot for Sales

Weeks

Sale

s

1110987654321

150

140

130

120

110

Smoothing ConstantAlpha 0.8

Accuracy MeasuresMAPE 6.2116MAD 7.5800MSD 84.7522

Variable

Forecasts95.0% PI

ActualFits

Single Exponential Smoothing Plot for Sales

Value of the smoothing smoothing constant constant is chosen such that itminimizes the MSE