forecasting & time series minggu 6. learning objectives understand the three categories of...

46
Forecasting & Time Series Minggu 6

Post on 21-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Forecasting & Time Series

Minggu 6

Page 2: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Learning ObjectivesLearning Objectives

• Understand the three categories of forecasting techniques available.

• Become aware of the four components that make up a time series.

• Understand how to identify which components are present in a specific time series.

Page 3: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Learning Objectives, continued

• Recognize the forecasting methods available for time series with specific components.

• Learn several ways of identifying the forecasting methods with the least forecasting error.

• Forecast for time series with specific components using stationary methods, trend methods, and seasonal methods.

Page 4: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Introduction to Forecasting

Forecasting is the art or science of predicting the future.

Forecasting techniques

(1) Qualitative techniques: Subjective estimates from informed sources that are used when historical data are scarce or non-existent- Examples: Delphi techniques, scenario writing,

and visionary forecast.

Page 5: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Introduction to Forecasting, continued

(2) Time Series Techniques: Quantitative techniques that use historical data for only the forecast variable to find patterns.

- Based on the premise that the factors that influenced patterns of activity in the past will continue to do so in the future.

- Examples: moving averages, exponential smoothing, and trend projections

Page 6: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Introduction to Forecasting, continued

(3) Causal Techniques: Quantitative techniques based on historical data for the variable being forecast, and one or more explanatory variables.

- Based on the supposition that a relationship exists between the variable to be forecast and other explanatory time series data.

- Examples: regression models, econometric models, and leading indicators

Page 7: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Time Series Components

• Trend: Long-term upward or downward change in a time series

• Seasonal: Periodic increases or decreases that occur within one year

• Cyclical: Periodic increases or decreases that occur over more than a single year

• Irregular: Changes not attributable to the other three components; non-systematic and unpredictable

Page 8: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Components of Time Series Data

Components of Time Series Data

Trend

Irregular

Seasonal

Cyclical

Page 9: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Components of Time Series DataComponents of Time Series Data

1 2 3 4 5 6 7 8 9 10 11 12 13

Year

Seasonal

Cyclical

Trend

Irregularfluctuations

Page 10: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Composite Time Series DataComposite Time Series Data

1 2 3 4 5 6 7 8 9 10 11 12 13

Year

Page 11: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Time Series Forecasting Procedure

Step 1: Identifying Time Series Form

• Trend component– time series plot– trend line

• Seasonal component– folded annual time series plot– autocorrelation

Page 12: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Step 2: Select Potential Methods

• Stationary forecasting methods are effective for a stationary time series, that is one that contains only an irregular component. These methods attempt to eliminate the irregular through averaging.

• Trend forecasting methods are effective for time series that contain a trend component. These methods asses the trend component and use it to make projections.

• Seasonal forecasting methods are used for a time series that contains a trend, a seasonal and an irregular component.

Page 13: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Step 3: Evaluate Potential Methods

• Once the appropriate method has been chosen, it is used to forecast the historical data for the time series. The an evaluation is done of how close the estimates approach the actual historical data.

• Forecasting Error: A single measure of the overall error of a forecast for an entire set of data.

• Error of an Individual Forecast: The difference between the actual value and the forecast of that value.

et = Yt - Ft

Page 14: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Reasons for Forecast FailureReasons for Forecast Failure

• Failure to examine assumptions

• Limited expertise

• Lack of imagination

• Neglect of constraints

• Excessive optimism

• Reliance on mechanical extrapolation

• Premature closure

• Over specification

Page 15: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Measurement of Forecasting Error

Measurement of Forecasting Error

Mean Error (ME): The average of all the errors of forecast for a group of data.

Mean Absolute Deviation (MAD): The mean, or average of the absolute values of the errors.

Mean Square Error (MSE): The average of the squared errors.

Mean Percentage Error (MPE): The average of the percentage errors of a forecast.

Mean Absolute Percentage Error (MAPE): The average of the absolute values of the percentage errors of a forecast.

Page 16: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Example: Nonfarm Partnership Tax Returns: Actual and Forecast with = .7

Example: Nonfarm Partnership Tax Returns: Actual and Forecast with = .7

Year Actual Forecast Error1 14022 1458 1402.0 56.03 1553 1441.2 111.84 1613 1519.5 93.55 1676 1584.9 91.16 1755 1648.7 106.37 1807 1723.1 83.98 1824 1781.8 42.29 1826 1811.3 14.7

10 1780 1821.6 -41.611 1759 1792.5 -33.5

Page 17: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Mean Error for the Nonfarm Partnership Forecasted Data

Mean Error for the Nonfarm Partnership Forecasted Data

ME ie

number of forecasts524 3

1052 43

.

.

Year Actual Forecast Error1 1402.02 1458.0 1402.0 56.03 1553.0 1441.2 111.84 1613.0 1519.5 93.55 1676.0 1584.9 91.16 1755.0 1648.7 106.37 1807.0 1723.1 83.98 1824.0 1781.8 42.29 1826.0 1811.3 14.7

10 1780.0 1821.6 -41.611 1759.0 1792.5 -33.5

524.3

Page 18: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Mean Absolute Deviation for the Nonfarm Partnership Forecasted Data

Mean Absolute Deviation for the Nonfarm Partnership Forecasted Data

MAD ie

number of forecasts674 5

1067 45

.

.

Year Actual Forecast Error |Error|1 1402.02 1458.0 1402.0 56.0 56.03 1553.0 1441.2 111.8 111.84 1613.0 1519.5 93.5 93.55 1676.0 1584.9 91.1 91.16 1755.0 1648.7 106.3 106.37 1807.0 1723.1 83.9 83.98 1824.0 1781.8 42.2 42.29 1826.0 1811.3 14.7 14.7

10 1780.0 1821.6 -41.6 41.611 1759.0 1792.5 -33.5 33.5

674.5

Page 19: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Mean Square Error for the Nonfarm Partnership Forecasted Data

MSE ie

2

55864 2

105586 42

number of forecasts.

.

Year Actual Forecast Error Error2

1 14022 1458 1402.0 56.0 3136.03 1553 1441.2 111.8 12499.24 1613 1519.5 93.5 8749.75 1676 1584.9 91.1 8292.36 1755 1648.7 106.3 11303.67 1807 1723.1 83.9 7038.58 1824 1781.8 42.2 1778.29 1826 1811.3 14.7 214.6

10 1780 1821.6 -41.6 1731.011 1759 1792.5 -33.5 1121.0

55864.2

Page 20: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Mean Percentage Error for the Nonfarm Partnership Forecasted Data

Mean Percentage Error for the Nonfarm Partnership Forecasted Data

MPE

i

i

eX

100

318

10318%

number of forecasts.

.

Year Actual Forecast Error Error %1 14022 1458 1402.0 56.0 3.8%3 1553 1441.2 111.8 7.2%4 1613 1519.5 93.5 5.8%5 1676 1584.9 91.1 5.4%6 1755 1648.7 106.3 6.1%7 1807 1723.1 83.9 4.6%8 1824 1781.8 42.2 2.3%9 1826 1811.3 14.7 0.8%

10 1780 1821.6 -41.6 -2.3%11 1759 1792.5 -33.5 -1.9%

31.8%

Page 21: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Mean Absolute Percentage Error for the Nonfarm Partnership Forecasted Data

MAPE

i

i

eX

100

40 3

104 03%

number of forecasts.

.

Year Actual Forecast Error |Error %|1 14022 1458 1402.0 56.0 3.8%3 1553 1441.2 111.8 7.2%4 1613 1519.5 93.5 5.8%5 1676 1584.9 91.1 5.4%6 1755 1648.7 106.3 6.1%7 1807 1723.1 83.9 4.6%8 1824 1781.8 42.2 2.3%9 1826 1811.3 14.7 0.8%

10 1780 1821.6 -41.6 2.3%11 1759 1792.5 -33.5 1.9%

40.3%

Page 22: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Use of Error Measures

To identify the best forecasting method

• Use error measure to identify the best value for the parameters of a specific method.

• Use error measure to identify the best method.

• Use MSE and MAD for both of these situations. Note that MSE tends to emphasize large errors.

Page 23: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Use of Error Measures, continued

Forecast bias is the tendency of a forecasting method to over or under predict.

The mean error, ME, measures the forecast bias.

Page 24: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Step 4: Make Required Forecasts

• The best forecasting method is that with the smallest overall error measurement.

• Using a stationary method will make a forecast for one time into the future, Ft+1. This is also the forecast for all future time periods.

• Forecasts made using a non-stationary method will not be the same for all time periods in the future.

Page 25: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Stationary Forecasting MethodsStationary Forecasting Methods

• Naive Forecasting Method

• Moving Average Forecasting Method

• Weighted Moving Average Forecasting Method

• Exponential Smoothing Forecasting Method

Page 26: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Naive ForecastingNaive Forecasting

Simplest of thenaive forecasting

models

Simplest of thenaive forecasting

models

t t

t

t

F XFX

where t

t

1

1 1

: the forecast for time period

the value for time period -

We sold 532 pairs of shoes lastweek, I predict we’ll

sell 532 pairs this week.

We sold 532 pairs of shoes lastweek, I predict we’ll

sell 532 pairs this week.

Page 27: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Simple Average Forecasting MethodSimple Average Forecasting Method

tt t t t nF X X X X

n

1 2 3

The monthly average last 12 months was 56.45, so I predict

56.45 for September.

The monthly average last 12 months was 56.45, so I predict

56.45 for September.

Month Year

Cents per

Gallon Month Year

Cents per

GallonJanuary 1994 61.3 January 1995 58.2February 63.3 February 58.3March 62.1 March 57.7April 59.8 April 56.7May 58.4 May 56.8June 57.6 June 55.5July 55.7 July 53.8August 55.1 August 52.8September 55.7 SeptemberOctober 56.7 OctoberNovember 57.2 NovemberDecember 58.0 December

Page 28: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Moving Average Forecasting MethodMoving Average Forecasting Method

• Updated (recomputed) for every new time period• May be difficult to choose optimal number of periods• May not adjust for trend, cyclical, or seasonal effects

nXXXXF ntttt

t

....321

Update me each period.Update me each period.

Page 29: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Weighted Moving Average Forecasting Method

Weighted Moving Average Forecasting Method

nt

tii

ntntttttttt

W

XWXWXWXWF1

332211...

Page 30: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Exponential SmoothingForecasting Method

Exponential SmoothingForecasting Method

t t t

t

t

t

F X FFFX

where

1

1

1

: the forecast for the next time period (t+1)

the forecast for the present time period (t)

the actual value for the present time period

= a value between 0 and 1

is the exponentialsmoothing constant

Page 31: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Trend Forecasting Methods

• Linear Trend Projection Forecasting Method: Forecasting by fitting a linear equation to a time series

• Non-linear Trend Projection Forecasting Method: Forecasting by fitting a non-linear equation to a time series

Page 32: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Average Hours Worked per Week by Canadian Manufacturing Workers

Average Hours Worked per Week by Canadian Manufacturing Workers

Period Hours Period Hours Period Hours Period Hours1 37.2 11 36.9 21 35.6 31 35.72 37.0 12 36.7 22 35.2 32 35.53 37.4 13 36.7 23 34.8 33 35.64 37.5 14 36.5 24 35.3 34 36.35 37.7 15 36.3 25 35.6 35 36.56 37.7 16 35.9 26 35.67 37.4 17 35.8 27 35.68 37.2 18 35.9 28 35.99 37.3 19 36.0 29 36.0

10 37.2 20 35.7 30 35.7

Page 33: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Excel Regression Output using Linear Trend

Excel Regression Output using Linear Trend

Regression StatisticsMultiple R 0.782R Square 0.611Adjusted R Square 0.5600Standard Error 0.509Observations 35

ANOVAdf SS MS F Significance F

Regression 1 13.4467 13.4467 51.91 .00000003Residual 33 8.5487 0.2591Total 34 21.9954

Coefficients Standard Error t Stat P-valueIntercept 37.4161 0.17582 212.81 .0000000Period -0.0614 0.00852 -7.20 .00000003

i ti i

t

Y X

X

where

Y

0 1

37 416 0 0614

:

. .

data value for period i

time period

i

i

YX

Page 34: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Excel Graph of Hours Worked Data with a Linear Trend LineExcel Graph of Hours Worked Data with a Linear Trend Line

34.535.0

35.536.036.537.0

37.538.0

0 5 10 15 20 25 30 35

Time Period

Wo

rk W

ee

k

Page 35: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Excel Regression Output using Quadratic Trend

Excel Regression Output using Quadratic Trend

Regression StatisticsMultiple R 0.8723R Square 0.761Adjusted R Square 0.747Standard Error 0.405Observations 35

ANOVA

df SS MS F Significance FRegression 2 16.7483 8.3741 51.07 1.10021E-10Residual 32 5.2472 0.1640Total 34 21.9954

Coefficients Standard Error t Stat P-valueIntercept 38.16442 0.21766 175.34 2.61E-49Period -0.18272 0.02788 -6.55 2.21E-07Period2 0.00337 0.00075 4.49 8.76E-05

i ti ti i

ti

t t

Y X X

XX X

where

Y

0 1 2

2

2

238164 0183 0 003

:

. . .

data value for period i

time period

the square of the i period

i

i

th

YX

Page 36: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Excel Graph of Hourly Data with Quadratic Trend Line

Excel Graph of Hourly Data with Quadratic Trend Line

34.5

35.0

35.5

36.0

36.5

37.037.5

38.0

0 5 10 15 20 25 30 35

Period

Wo

rk W

eek

Page 37: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Exponential Smoothing with Trend Effects: Holt’s Model

Exponential Smoothing with Trend Effects: Holt’s Model

t t t t

t t t t

t t t

t k t t

E X E TT E E TF E TF E Tk

Smoothed Values:

Trend Term Update:

Forecast for Next Period:

for k periods in the future:

( )( )

( ) ( )

1

1

1 1

1 1

1

Holt’s Model adds consideration of a trend component to the basic exponential smoothing relation.

Page 38: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Trend Autoregression MethodTrend Autoregression Method

Y b b Y b Yt t 0 1 1 2 2

Y b b Y b Y b Yt t t 0 1 1 2 2 3 3

Autoregression Model with two lagged variables

Autoregression Model with three lagged variables

A multiple regression technique in which the independent variables are time-lagged versions of the dependent variable.

Page 39: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Durbin-Watson Test for Autocorrelation

Durbin-Watson Test for Autocorrelation

H

Ha

0 0

0

:

:

D

t t

where

e e

et

n

tt

n

2

2

2

1

1

: n = the number of observations

If D > do not reject H (there is no significant autocorrelation).

If D < , reject H (there is significant autocorrelation).

If , the test is inconclusive.

U 0

L 0

L U

dd

d d

,

D

Page 40: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Overcoming the Autocorrelation Problem

Overcoming the Autocorrelation Problem

• Addition of Independent Variables• Transforming Variables

– First-differences approach– Percentage change from period to period– Use autoregression

Page 41: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Seasonal Forecasting Methods

• Seasonal Multiple Regression Forecasting Method

• Seasonal Autoregression Forecasting Method

• Winter’s Exponential Smoothing Forecasting Model

• Time Series Decomposition Forecasting Method

Page 42: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Exponential Smoothing with Trend and Seasonality: Winter’s Model

Exponential Smoothing with Trend and Seasonality: Winter’s Model

Smoothed Values:

Trend Term Update:

SeasonalityUpdate:

Forecast for Next Period:

for k periods in the future:

t

t t t L t t

t t t t

t t t L

t t t t L

t k t t t L k

E X S E T

T E E T

S X E S

F E T S

F E T Sk

( / ( )( )

( ) ( )

( / ) ( )

( )

( )

1

1

1

1 1

1 1

1 1

Page 43: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Time Series Decomposition Forecasting Method

Time Series Decomposition Forecasting Method

Basis for analysis is the multiplicative model

Y = T · C · S · I

where:

T = trend component

C = cyclical component

S = seasonal component

I = irregular component

Page 44: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Time Series Decomposition

• Determine the seasonality of the time series by computing a seasonal index for each season (each quarter, each month, and so on.

• Divide each time series data value by the appropriate seasonal index to deseasonalize it.

• Identify a trend model appropriate for the deseasonalized trend model.

• Forecast deseasonalized values with the trend model

• Multiply the deseasonalized forecasts times the appropriate seasonal index to compute the final seasonalized forecasts.

Page 45: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Demonstration Problem 14.6: Household Appliance Shipment Data

Demonstration Problem 14.6: Household Appliance Shipment Data

Year Quarter Shipments Year Quarter Shipments1 1 4009 4 1 4595

2 4321 2 47993 4224 3 44174 3944 4 4258

2 1 4123 5 1 42452 4522 2 49003 4657 3 45854 4030 4 4533

3 1 44932 48063 45514 4485

Shipments in $1,000,000.

Page 46: Forecasting & Time Series Minggu 6. Learning Objectives Understand the three categories of forecasting techniques available. Become aware of the four

Demonstration Problem 14.6: Graph of Household Appliance Shipment Data

Demonstration Problem 14.6: Graph of Household Appliance Shipment Data

3900

4050

4200

4350

4500

4650

4800

4950

0 4 8 12 16 20Quarter

Shipments