Title: Forecasting
1Forecasting
- Forecasting Terminology
- Simple Moving Average
- Weighted Moving Average
- Exponential Smoothing
- Simple Linear Regression Model
- Holts Trend Model
- Seasonal Model (No Trend)
- Winters Model for Data with Trend and Seasonal
Components
2Evaluating Forecasts
- Visual Review
- Errors
- Errors Measure
- MPE and MAPE
- Tracking Signal
3Forecasting Terminology
Historical Data
ExPost Forecast
Initialization
Forecast
4Forecasting Terminology
- We are now looking at a future from here, and
the future we were looking at in February now
includes some of our past, and we can incorporate
the past into our forecast. 1993, the first
half, which is now the past and was the future
when we issued our first forecast, is now over - Laura DAndrea Tyson, Head of the Presidents
Council of Economic Advisors, quoted in November
of 1993 in the Chicago Tribune, explaining why
the Administration reduced its projections of
economic growth to 2 percent from the 3.1percent
it predicted in February.
5Forecasting Problem
- Suppose your fraternity/sorority house consumed
the following number of cases of beer for the
last 6 weekends 8, 5, 7, 3, 6, 9
- How many cases do you think your fraternity /
sorority will consume this weekend?
6ForecastingSimple Moving Average Method
- Using a three period moving average, we would get
the following forecast
7ForecastingSimple Moving Average Method
- What if we used a two period moving average?
8ForecastingSimple Moving Average Method
- The number of periods used in the moving average
forecast affects the responsiveness of the
forecasting method
9Forecasting Terminology
- Applying this terminology to our problem using
the Moving Average forecast
Model Evaluation
Initialization
ExPost Forecast
Forecast
10ForecastingWeighted Moving Average Method
- Rather than equal weights, it might make sense to
use weights which favor more recent consumption
values. - With the Weighted Moving Average, we have to
select weights that are individually greater than
zero and less than 1, and as a group sum to 1 - Valid Weights (.5, .3, .2) , (.6,.3,.1), (1/2,
1/3, 1/6) - Invalid Weights (.5, .2, .1), (.6, -.1, .5),
(.5,.4,.3,.2)
11ForecastingWeighted Moving Average Method
- A Weighted Moving Average forecast with weights
of (1/6, 1/3, 1/2), is performed as follows
- How do you make the Weighted Moving Average
forecast more responsive?
12ForecastingExponential Smoothing
- Exponential Smoothing is designed to give the
benefits of the Weighted Moving Average forecast
without the cumbersome problem of specifying
weights. In Exponential Smoothing, there is only
one parameter (?)
? smoothing constant (between 0 and 1)
13ForecastingExponential Smoothing
14ForecastingExponential Smoothing
t A(t) F(t)
1 8
2 5 6.5
3 7 5.9
4 3 6.34
5 6 5
6 9 5.4
7 6.84
8 6.84
9 6.84
10 6.84
Initialization
ExPost Forecast
Forecast
15ForecastingExponential Smoothing
16ForecastingExponential Smoothing
17Outliers (eloping point)
18Data with Trends
19Data with Trends
20ForecastingSimple Linear Regression Model
Simple linear regression can be used to forecast
data with trends
a
D is the regressed forecast value or dependent
variable in the model, a is the intercept value
of the regression line, and b is the slope of the
regression line.
21ForecastingSimple Linear Regression Model
In linear regression, the squared errors are
minimized
22ForecastingSimple Linear Regression Model
23Limitations in Linear Regression Model
As with the simple moving average model, all data
points count equally with simple linear
regression.
24ForecastingHolts Trend Model
- To forecast data with trends, we can use an
exponential smoothing model with trend,
frequently known as Holts model
L(t) aA(t) (1- a) F(t)
T(t) ? L(t) - L(t-1) (1- ?) T(t-1)
F(t1) L(t) T(t)
- We could use linear regression to initialize the
model
25Holts Trend ModelInitialization
First, well initialize the model
L(4) 20.54(9.9)60.1 T(4) 9.9
26Holts Trend ModelUpdating
52
64.6
7.74
L(t) aA(t) (1- a) F(t)
L(5) 0.3 (52) 0.7 (70)64.6
T(t) ? L(t) - L(t-1) (1- ?) T(t-1)
T(5) 0.4 64.6 60.1 0.6 (9.9) 7.74
F(t1) L(t) T(t)
F(6) 64.6 7.74 72.34
27Holts Trend Model Updating
63
69.54
6.62
72
L(6) 0.3 (63) 0.7 (72.34)69.54
T(6) 0.4 69.54 64.60 0.6 (7.74) 6.62
F(7) 69.54 6.62 76.16
28Holts Model Results
Initialization
ExPost Forecast
Forecast
29Holts Model Results
Initialization
ExPost Forecast
Forecast
30 Forecasting Seasonal Model (No Trend)
31Seasonal Model Formulas
L(t) aA(t) / S(t-p) (1- a) L(t-1)
S(t) g A(t) / L(t) (1- g) S(t-p)
F(t1) L(t) S(t1-p)
p is the number of periods in a season Quarterly
data p 4 Monthly data p 12
32Seasonal Model Initialization
S(5) 0.60 S(6) 1.00 S(7) 1.55 S(8)
0.85 L(8) 26.5
33Seasonal Model Forecasting
34Seasonal Model Forecasting
35Forecasting Winters Model for Data with Trend
and Seasonal Components
L(t) aA(t) / S(t-p) (1- a)L(t-1)T(t-1)
T(t) b L(t) - L(t-1) (1- b) T(t-1)
S(t) g A(t) / L(t) (1- g) S(t-p)
F(t1) L(t) T(t) S(t1-p)
36Seasonal-Trend Model Decomposition
- To initialize Winters Model, we will use
Decomposition Forecasting, which itself can be
used to make forecasts.
37Decomposition Forecasting
- There are two ways to decompose forecast data
with trend and seasonal components - Use regression to get the trend, use the trend
line to get seasonal factors - Use averaging to get seasonal factors,
de-seasonalize the data, then use regression to
get the trend.
38Decomposition Forecasting
- The following data contains trend and seasonal
components
39Decomposition Forecasting
- The seasonal factors are obtained by the same
method used for the Seasonal Model forecast
Average to 1
40Decomposition Forecasting
- With the seasonal factors, the data can be
de-seasonalized by dividing the data by the
seasonal factors
Regression on the De-seasonalized data will give
the trend
41Decomposition Forecasting Regression Results
42Decomposition Forecast
- Regression on the de-seasonalized data produces
the following results - Slope (m) 7.71
- Intercept (b) 101.2
- Forecasts can be performed using the following
equation - mx b(seasonal factor)
43Decomposition Forecasting
44Winters Model Initialization
- We can use the decomposition forecast to define
the following Winters Model parameters
L(n) b m (n) T(n) m S(j) S(j-p)
So from our previous model, we have
L(8) 101.2 8 (7.71) 162.88 T(8) 7.71 S(5)
0.80 S(6) 1.35 S(7) 1.05 S(8) 0.79
45Winters Model Example
46Winters Model Example
47Evaluating Forecasts
Trust, but Verify Ronald W. Reagan
- Computer software gives us the ability to mess up
more data on a greater scale more efficiently - While software like SAP can automatically select
models and model parameters for a set of data,
and usually does so correctly, when the data is
important, a human should review the model
results - One of the best tools is the human eye
48Visual Review
- How would you evaluate this forecast?
49Forecast Evaluation
Where Forecast is Evaluated
Do not include initialization data in evaluation
ExPost Forecast
Initialization
Forecast
50Errors
All error measures compare the forecast model to
the actual data for the ExPost Forecast region
51Errors Measure
All error measures are based on the comparison of
forecast values to actual values in the ExPost
Forecast regiondo not include data from
initialization.
52Bias and MAD
53Bias and MAD
- Bias tells us whether we have a tendency to over-
or under-forecast. If our forecasts are in the
middle of the data, then the errors should be
equally positive and negative, and should sum to
0. - MAD (Mean Absolute Deviation) is the average
error, ignoring whether the error is positive or
negative. - Errors are bad, and the closer to zero an error
is, the better the forecast is likely to be. - Error measures tell how well the method worked in
the ExPost forecast region. How well the
forecast will work in the future is uncertain.
54Absolute vs. Relative Measures
- Forecasts were made for two sets of data. Which
forecast was better?
Data Set 1 Bias 18.72 MAD 43.99
Data Set 2 Bias 182 MAD 912.5
55MPE and MAPE
- When the numbers in a data set are larger in
magnitude, then the error measures are likely to
be large as well, even though the fit might not
be as good. - Mean Percentage Error (MPE) and Mean Absolute
Percentage Error (MAPE) are relative forms of the
Bias and MAD, respectively. - MPE and MAPE can be used to compare forecasts for
different sets of data.
56MPE and MAPE
- Mean Percentage Error (MPE)
- Mean Absolute Percentage Error (MAPE)
57MPE and MAPE
Data Set 1
58MPE and MAPE
Data Set 2
59MPE and MAPE
Data Set 2
Data Set 1
60Tracking Signal
- Whats happened in this situation? How could we
detect this in an automatic forecasting
environment?
61Tracking Signal
- The tracking signal can be calculated after each
actual sales value is recorded. The tracking
signal is calculated as
- The tracking signal is a relative measure, like
MPE and MAPE, so it can be compared to a set
value (typically 4 or 5) to identify when
forecasting parameters and/or models need to be
changed.
62Tracking Signal
63Tracking Signal