You are on page 1of 31

1

Module 4. Forecasting
MGS3100
2
Forecasting
Forecasting
Quantitative Qualitative
Causal Model
Time series
Expert Judgment
Trend
Stationary
Trend
Trend + Seasonality
Delphi Method
Grassroots
3
Casual Models:
Causal
Model
Year 2000
Sales
Price
Population
Advertising

Time Series Models:
Time Series
Model
Year 2000
Sales
Sales
1999

Sales
1998

Sales
1997


--Forecasting based on data and models
Quantitative Forecasting
4
Causal forecasting
Regression
Find a straight line that fits the data best.






y = Intercept + slope * x (= b
0
+ b
1
x)
Slope = change in y / change in x
0
2
4
6
8
10
12
10 11 12 13 14 15 16 17 18 19 20
Best line!
Intercept
5
Causal Forecasting Models
Curve Fitting: Simple Linear Regression
One Independent Variable (X) is used to predict one
Dependent Variable (Y): Y = a + b X
Given n observations (X
i
, Y
i
), we can fit a line to the
overall pattern of these data points. The Least
Squares Method in statistics can give us the best a
and b in the sense of minimizing E(Y
i
- a - bX
i
)
2
:

n
X
b
n
Y
a
n
X
X
n
Y X
Y X b
i i
i
i
i i
i i



=
|
|
.
|

\
|

|
|
.
|

\
|
=
2
2
) (
/
Regression formula is an optional learning objective
6
Curve Fitting: Simple Linear Regression
Find the regression line with Excel
Use Function:
a = INTERCEPT(Y range; X range)
b = SLOPE(Y range; X range)
Use Solver
Use Excels Tools | Data Analysis | Regression
Curve Fitting: Multiple Regression
Two or more independent variables are used to
predict the dependent variable:
Y = b
0
+ b
1
X
1
+ b
2
X
2
+ + b
p
X
p
Use Excels Tools | Data Analysis | Regression
7
Time Series Forecasting Process
Look at the data
(Scatter Plot)

Forecast using one or
more techniques
Evaluate the technique
and pick the best one.
Observations from the
scatter Plot
Techniques to try Ways to evaluate
Data is reasonably
stationary
(no trend or seasonality)
Heuristics - Averaging methods
- Naive
- Moving Averages
- Simple Exponential Smoothing
- MAD
- MAPE
- Standard Error
- BIAS
Data shows a consistent
trend
Regression
- Linear
- Non-linear Regressions (not
covered in this course)
- MAD
- MAPE
- Standard Error
- BIAS
- R-Squared
Data shows both a trend and
a seasonal pattern
Classical decomposition
- Find Seasonal Index
- Use regression analyses to find
the trend component
- MAD
- MAPE
- Standard Error
- BIAS
- R-Squared
8
BIAS - The arithmetic mean of the errors

n is the number of forecast errors
Excel: =AVERAGE(error range)
Mean Absolute Deviation - MAD

No direct Excel function to calculate MAD
Evaluation of Forecasting Model
n
Error
n
Forecast) - (Actual
BIAS

= =
n
| Error |
n
Forecast - Actual |
MAD

= =
|
9
Mean Square Error - MSE

Excel: =SUMSQ(error range)/COUNT(error range)
Standard error is square root of MSE
Mean Absolute Percentage Error - MAPE


R
2
- only for curve fitting model such as regression
In general, the lower the error measure (BIAS, MAD,
MSE) or the higher the R
2
, the better the forecasting
model

n
(Error)
n
Forecast) - (Actual
MSE
2 2

= =
n
Actual
| Forecast - Actual |
MAPE

=
% 100 *
Evaluation of Forecasting Model
10
Stationary data forecasting
Nave
I sold 10 units yesterday, so I think I will sell 10 units
today.


n-period moving average
For the past n days, I sold 12 units on average.
Therefore, I think I will sell 12 units today.

Exponential smoothing
I predicted to sell 10 units at the beginning of yesterday;
At the end of yesterday, I found out I sold in fact 8 units.
So, I will adjust the forecast of 10 (yesterdays forecast)
by adding adjusted error ( * error). This will compensate
over (under) forecast of yesterday.
11
Nave Model
The simplest time series forecasting model
Idea: what happened last time (last year,
last month, yesterday) will happen again
this time
Nave Model:
Algebraic: F
t
= Y
t-1
Y
t-1
: actual value in period t-1
F
t
: forecast for period t
Spreadsheet: B3: = A2; Copy down

12
Moving Average Model
Simple n-Period Moving Average



Issues of MA Model
Nave model is a special case of MA with n = 1
Idea is to reduce random variation or smooth data
All previous n observations are treated equally (equal
weights)
Suitable for relatively stable time series with no trend or
seasonal pattern
n
n t
Y
2 t
Y
1 t
Y
=
n
periods n previous in values actual of Sum
t
F

+ +

13
Smoothing Effect of MA Model
Longer-period moving averages (larger n) react to
actual changes more slowly
14
Moving Average Model
Weighted n-Period Moving Average

Typically weights are decreasing:
w
1
>w
2
>>w
n

Sum of the weights = w
i
= 1
Flexible weights reflect relative importance of
each previous observation in forecasting
Optimal weights can be found via Solver

n t
Y
n
w
2 t
Y
2
w
1 t
Y
1
w =
t
F

+ +


15
Weighted MA: An Illustration
Month Weight Data
August 17% 130
September 33% 110
October 50% 90
November forecast:
F
Nov
= (0.50)(90)+(0.33)(110)+(0.17)(130)
= 103.4
16
Exponential Smoothing
Concept is simple!
Make a forecast, any forecast
Compare it to the actual
Next forecast is
Previous forecast plus an adjustment
Adjustment is fraction of previous forecast error
Essentially
Not really forecast as a function of time
Instead, forecast as a function of previous actual and
forecasted value
17
Simple Exponential Smoothing
A special type of weighted moving average
Include all past observations
Use a unique set of weights that weight recent observations
much more heavily than very old observations:
o
o o
o o
o o
( )
( )
( )
1
1
1
2
3

weight
Decreasing weights
given
to older observations
0 1 < < o

Today
18
Simple ES: The Model
New forecast = weighted sum of last period
actual value and last period forecast
o : Smoothing constant
F
t
: Forecast for period t
F
t-1
:

Last period forecast
Y
t-1
: Last period actual value
| |

+ + + =
+ + + =


3 2 1
3
2
2 1
) 1 ( ) 1 (
) 1 ( ) 1 (
t t t t
t t t t
Y a Y Y F
Y Y Y F
o o o o
o o o o o
1 1
) 1 (

+ =
t t t
F Y F o o
19
Simple Exponential Smoothing
Properties of Simple Exponential Smoothing
Widely used and successful model
Requires very little data
Larger o, more responsive forecast; Smaller o,
smoother forecast (See Table 13.2)
best o can be found by Solver
Suitable for relatively stable time series
20
Time Series Components
Trend
persistent upward or downward pattern in a time series
Seasonal
Variation dependent on the time of year
Each year shows same pattern
Cyclical
up & down movement repeating over long time frame
Each year does not show same pattern
Noise or random fluctuations
follow no specific pattern
short duration and non-repeating
21
Time Series Components
Time
Trend
Random
movement
Time
Cycle
Time
Seasonal
pattern
D
e
m
a
n
d

Time
Trend with
seasonal pattern
22
Trend Model
Curve fitting method used for time series data
(also called time series regression model)
Useful when the time series has a clear trend
Can not capture seasonal patterns
Linear Trend Model: Y
t
= a + bt
t is time index for each period, t = 1, 2, 3,

0
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10
23
Pattern-based forecasting - Trend
Regression Recall Independent Variable X, which is now
time variable e.g., days, months, quarters, years etc.
Find a straight line that fits the data best.






y = Intercept + slope * x (= b
0
+ b
1
x)
Slope = change in y / change in x
0
2
4
6
8
10
12
10 11 12 13 14 15 16 17 18 19 20
Best line!
Intercept
24
Pattern-based forecasting Seasonal
Once data turn out to be seasonal,
deseasonalize the data.
The methods we have learned (Heuristic methods and
Regression) is not suitable for data that has
pronounced fluctuations.
Make forecast based on the deseasonalized data
Reseasonalize the forecast
Good forecast should mimic reality. Therefore, it is
needed to give seasonality back.

25
Pattern-based forecasting Seasonal
Deseasonalize
Forecast
Reseasonalize
Actual data Deseasonalized data
Example (SI + Regression)
26
Pattern-based forecasting Seasonal
Deseasonalization
Deseasonalized data = Actual / SI


Reseasonalization
Reseasonalized forecast
= deseasonalized forecast * SI


27
Seasonal Index
Whats an index?
Ratio
SI = ratio between actual and average demand
Suppose
SI for quarter demand is 1.20
Whats that mean?
Use it to forecast demand for next fall
So, where did the 1.20 come from?!
28
Calculating Seasonal Indices
Quick and dirty method of calculating SI
For each year, calculate average demand
Divide each demand by its yearly average
This creates a ratio and hence a raw index
For each quarter, there will be as many raw indices
as there are years
Average the raw indices for each of the quarters
The result will be four values, one SI per quarter
29
Classical decomposition
Start by calculating seasonal indices
Then, deseasonalize the demand
Divide actual demand values by their SI values
y = y / SI
Results in transformed data (new time series)
Seasonal effect removed
Forecast
Regression if deseasonalized data is trendy
Heuristics methods if deseasonalized data is stationary
Reseasonalize with SI
30
Causal or Time series?
What are the difference?

Which one to use?
31
Can you
describe general forecasting process?
compare and contrast trend, seasonality and
cyclicality?
describe the forecasting method when data is
stationary?
describe the forecasting method when data
shows trend?
describe the forecasting method when data
shows seasonality?

You might also like