Вы находитесь на странице: 1из 36

MGS3100 Chapter 13

Forecasting
Slides 13b:
Time-Series Models;
Measuring Forecast Error

Forecasting Models
Forecasting
Techniques
Qualitative
Models

Time Series
Methods
Delphi
Method
Jury of Executive
Opinion
Sales Force
Composite
Consumer Market
Survey

Naive
Moving
Average
Weighted
Moving Average
Exponential
Smoothing
Trend Analysis

Causal
Methods
Simple
Regression
Analysis
Multiple
Regression
Analysis

Seasonality
Analysis
Multiplicative
Decomposition

Time Series Models


General Form: Y = T * C * S , where
T = Trend - long term movement of mean
C = (Business) Cycle - an upturn or downturn not caused
by seasonal variation; effect of the economy
S = Seasonal Variation - repetitive pattern observed over a
specific time period
= Error (random variation)
Practical Forecast Form: = T * S
C is important, but difficult to forecast
Dont forecast an error!

Time
series
value

Components of a Time Series


Linear trend and seasonality time series

Linear trend time series

Future

A stationary time series


Time

Time Series: Stationary Models


Stationary Model Assumptions
Assumes item forecasted will stay steady over time (constant
mean; random variation only)
Techniques will smooth out short-term irregularities
Forecast for period t+1 is equal to forecast for period t+k; the
forecast is revised only when new data becomes available.
Stationary Model Types
Nave Forecast
Moving Average
Weighted Moving Average
Exponential Smoothing

Stationary Time Series Models:


The Nave Model
Whatever happened
last period will happen
again this time
The model is simple
and flexible
Provides a baseline to
measure other models
Attempts to capture
seasonal factors at the
expense of ignoring
trend

Ft Yt 1
or

Ft Yt 4 : Quarterly data
Ft Yt 12 : Monthly data

Measures of Forecast Error


( Forecast Error Yt Ft )

Bias - The arithmetic sum of the


errors
MAD - Mean Absolute Deviation
MAPE Mean Absolute Percentage
Error
Mean Square Error (MSE) - Similar
to simple sample variance
Standard Error - Standard deviation
of the sampling distribution (the
square
root of the MSE)
Bias, MAD, and MAPE - typically
MAD
used for time series

Bias (forecast error) /T


t 1

(Yt Ft ) / T
t 1

MSE | forecast error |2 /T


t 1
T

(Yt Ft ) 2 / T
t 1

| forecast error | /T |Y
t 1

t 1

Ft | / T

MAPE 100 [|Yt Ft | / Yt ] / T


t 1

Nave Forecast

Nave Forecast Graph

Stationary Time Series Models:


Moving Averages
The Moving Average Method
The forecast is the average of the last n
observations of the time series.

YYtt YYtt11 ...


YYttnn11
...
FFtt11
nn

Moving Averages

Moving Averages Forecast


Wallace Garden Supply
Forecasting

3 period moving average

Input Data
Period
Month 1
Month 2
Month 3
Month 4
Month 5
Month 6
Month 7
Month 8
Month 9
Month 10
Month 11
Month 12
Next period

Actual Value - Forecast

Forecast Error Analysis


Actual Value
10
12
16
13
17
19
15
20
22
19
21
19
19.667

Forecast

12.667
13.667
15.333
16.333
17.000
18.000
19.000
20.333
20.667
Average

Error

0.333
3.333
3.667
-1.333
3.000
4.000
0.000
0.667
-1.667
1.333
BIAS

Absolute
error

0.333
3.333
3.667
1.333
3.000
4.000
0.000
0.667
1.667
2.000
MAD

Squared
error

0.111
11.111
13.444
1.778
9.000
16.000
0.000
0.444
2.778
6.074
MSE

Absolute
% error

2.56%
19.61%
19.30%
8.89%
15.00%
18.18%
0.00%
3.17%
8.77%
10.61%
MAPE

Moving Averages Graph

Stability vs. Responsiveness


Should I use a 2-period moving average or
a 3-period moving average?
The larger the n the more stable the forecast.
A 2-period model will be more responsive to
change.
We dont want to chase outliers.
But we dont want to take forever to correct for
a real change.
We must balance stability with responsiveness.

Stationary Time Series Models:


Weighted Moving Averages
The Weighted Moving Average Method
Historical values of the time series are assigned
different weights when performing the forecast
Ft 1 = w1Yt + w2Yt-1 +w3Yt-2 + + wnYt-n+1
wi = 1

Weighted Moving Average

Weighted Moving Average

Stationary Time Series Models:


Exponential Smoothing
Exponential Smoothing
Moving average technique that requires a minimum
amount of past data
Uses a smoothing constant with a value between 0 and 1
(Usual range 0.1 to 0.3)
Forecast for period t = Forecast for period t-1 plus times
the difference between the actual value and forecast in
period t-1: t = t-1 + (Yt-1 - t-1), or
Can also be expressed as: t = (Yt-1) + (1- )(t-1) =
(Actual value in period t-1) + (1- )(Forecast in period t-1)

Exponential Smoothing Data


Storage Shed Sales

Period
January
February
March
April
May
June
July
August
September
October
November
December

Actual
Value(Yt )
10
12
16
13
17
19
15
20
22
19
21
19

t-1

10
10
10
10.2
10.78
11.002
11.602
12.342
12.607
13.347
14.212
14.691

0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1

+
+
+
+
+
+
+
+
+
+
+

t-1

Yt-1
*(
*(
*(
*(
*(
*(
*(
*(
*(
*(
*(

10
12
16
13
17
19
15
20
22
19
21

10
10
10.2
10.78
11.002
11.602
12.342
12.607
13.347
14.212
14.691

t
)=
)=
)=
)=
)=
)=
)=
)=
)=
)=
)=

10.000
10.200
10.780
11.002
11.602
12.342
12.607
13.347
14.212
14.691
15.322

Class Exercise: What is the forecast for January of the following year?
How about March? Find the Bias, Mad & MAPE. (Note: equals 0.1.)

Exponential Smoothing
(Alpha = .419)
Wallace Garden Supply
Forecasting

Exponential smoothing

Input Data

Forecast Error Analysis

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

Actual value
10
12
16
13
17
19
15
20
22
19
21
19

Alpha

0.419

Next period

19.573

Forecast
10.000
10.000
10.838
13.000
13.000
14.675
16.487
15.864
17.596
19.441
19.256
19.987
Average

Error
2.000
5.162
0.000
4.000
4.325
-1.487
4.136
4.404
-0.441
1.744
-0.987

Absolute
error
2.000
5.162
0.000
4.000
4.325
1.487
4.136
4.404
0.441
1.744
0.987
2.608
MAD

Squared
error
4.000
26.649
0.000
16.000
18.702
2.211
17.106
19.391
0.194
3.041
0.973
9.842
MSE

Absolute
% error
16.67%
32.26%
0.00%
23.53%
22.76%
9.91%
20.68%
20.02%
2.32%
8.30%
5.19%
14.70%
MAPE

Exponential Smoothing

Evaluating the Performance


of Forecasting Techniques
Several forecasting methods have been
presented.
Which one of these forecasting methods
gives the best forecast?

Performance Measures
Sample Example
Find the forecasts and the errors for each forecasting
technique applied to the following stationary time series.
Time
Time series:

3 4

100 110 90 80 105 115

3-Period Moving average:


Error for the 3-Period MA:
3-Period Weighted MA(.5, .3, .2)
Error for the 3-Period WMA

100
- 20
98
- 18

93.33
11.67
89
16

91.6
23.4
85.5
29.5

Performance Measures
MAD for the Sample Example
MAD for the moving average technique:
MAD =

t| = |-20| + |11.67| + |23.4|


n

= 18.35

MAD for the weighted moving average technique:


MAD =

t| = |-18| + |116| + |29.5|


n

= 21.17

Performance Measures
MAPE for the Sample Example
MAPE for the moving average technique:

t| |-20|/80 + |11.67|/105+ |23.4|/115

MAPE=
=
=
n

.188

MAPE for the weighted moving average technique:

t| |-18|/80 + |16|/105 + |29.5|/115

MAPE=
=
n

= .211

Performance Measures
Selecting Model Parameters
Use the performance measures to select a good set of
values for each model parameter.
For the moving average:
the number of periods (n).

For the weighted moving average:


The number of periods (n),
The weights (wi).

For the exponential smoothing:


The exponential smoothing factor ().

Excel Solver can be used to determine the values of the


model parameters.

Trend & Seasonality


Trend analysis
Technique that fits a trend equation (or curve) to a series of
historical data points
Projects the equation into the future for medium and long
term forecasts. Typically do not want to forecast into the
future more than half the number of time periods used to
generate the forecast

Seasonality analysis
Adjustment to time series data due to variations at certain
periods.
Adjust with seasonal index - ratio of average value of the
item in a season to the overall annual average value.
Examples: demand for coal in winter months; demand for
soft drinks in the summer and over major holidays

Linear Trend Analysis


Midwestern Manufacturing Sales
Sales(in units) vs. Time
Scatter Diagram
Actual
value (or)
Y
74
79
80
90
105
142
122

Period
number
(or) X
1995
1996
1997
1998
1999
2000
2001

160
140
120
100
80
60
40
20
0
1994

1995

1996

1997

1998

1999

2000

2001

2002

Least Squares for Linear Regression


Midwestern Manufacturing

Objective: Minimize
the squared deviations!

Least Squares Method


Where

Y a bX
^

= predicted value of the dependent variable (demand)

X = value of the independent variable (time)


a = Y-axis intercept = Y - b* X
b = Slope of the regression line =

_ _

[ XY - n X Y ]

2
X -nX

Linear Trend Data & Error Analysis


Midwestern Manufacturing Company
Forecasting

Linear trend analysis

Enter the actual values in cells shaded YELLOW. Enter new time period at the bottom to forecast

Input Data
Period
Year 1
Year 2
Year 3
Year 4
Year 5
Year 6
Year 7
Intercept
Slope
Next period

Forecast Error Analysis


Actual value Period number
(or) Y
(or) X
74
1
79
2
80
3
90
4
105
5
142
6
122
7
56.714
10.536
141.000

Forecast
67.250
77.786
88.321
98.857
109.393
119.929
130.464
Average

Error
6.750
1.214
-8.321
-8.857
-4.393
22.071
-8.464

Absolute
error
6.750
1.214
8.321
8.857
4.393
22.071
8.464
8.582
MAD

Squared
Absolute
error
% error
45.563
9.12%
1.474
1.54%
69.246 10.40%
78.449
9.84%
19.297
4.18%
487.148 15.54%
71.644
6.94%
110.403
8.22%
MSE
MAPE

Least Squares Graph


Tre nd Analysis
160

140

y = 10.536x + 56.714
120

Va lue

100

80

60

40

20

0
1

Time
Actual values

Linear (Actual values)

Another way to Determine Trend:


Use the Excel Regression Function
Run linear regression to test 1 in the model Yt=0+1t+t
Excel results:
Coeff.
Intercept
Weeks

Stand. Err

t-Stat

P-value

Lower 95%Upper 95%

369.27 27.79436 13.2857 5E-18


313.44 425.094
0.3339 0.912641 0.36586 0.71601
0.71601 -1.49919 2.16699

This large P-value indicates


that there is little evidence that trend exists

Conclusion: A stationary model is appropriate.

Forecasting Seasonal Data: Quick Method


Eichler Supplies
Year
1

Month
January
February
March
April
May
June
July
August
September
October
November
December
January
February
March
April
May
June
July
August
September
October
November
December

Average
Demand Demand
80
94
75
94
80
94
90
94
115
94
110
94
100
94
90
94
85
94
75
94
75
94
80
94
100
94
85
94
90
94
110
94
131
94
120
94
110
94
110
94
95
94
85
94
85
94
80
94

Ratio = Demand / Average Demand


Ratio
0.851
0.798
0.851
0.957
1.223
1.170
1.064
0.957
0.904
0.798
0.798
0.851
1.064
0.904
0.957
1.170
1.394
1.277
1.170
1.170
1.011
0.904
0.904
0.851

Seasonal
Index
0.957
0.851
0.904
1.064
1.309
1.223
1.117
1.064
0.957
0.851
0.851
0.851
0.957
0.851
0.904
1.064
1.309
1.223
1.117
1.064
0.957
0.851
0.851
0.851

Seasonal Index ratio of the


average value of the item in a
season to the overall average
annual value.
Example: average of year 1
January ratio to year 2 January
ratio.
(0.851 + 1.064)/2 = 0.957
If Year 3 average monthly demand is
expected to be 100 units.
Forecast demand Year 3 January:
100 X 0.957 = 96 units
Forecast demand Year 3 May:
100 X 1.309 = 131 units

Forecasting Seasonal Data With Trend


1. Calculate the seasonal indices (as shown on the
previous slide)
2. Calculate deseasonalized treand by dividing the
actual value (Y) by the seasonal index for that
period:
Deseasonalized Trend = Y / Seasonal index
(e.g., 80 units/ 0.957 =
83.595)
3. Find the trend line, and extend the trend line into
the desired forecast period.

Forecasting Seasonal Data With Trend:


Calculating the Seasonal Forecast
4. Now that we have the Seasonal Indices and Trend
line, we can reseasonalize the data and generate
the seasonalized forecast by multiplying the
trend line values in the forecast period by the
appropriate seasonal indices for each time period
as follows:

= Trend x Seasonal Index

Вам также может понравиться