Title: Forecasting
1 Chapter 2
2Introduction to Forecasting
- What is forecasting?
- Primary Function is to Predict the Future
- Why are we interested?
- Affects the decisions we make today
- Examples who uses forecasting in their jobs?
- forecast demand for products and services
- forecast availability of manpower for
manufacturing or services. - forecast inventory and materiel needs daily for
mfg or services
3Characteristics of Forecasts
- They are usually wrong!
- A good forecast is more than a single number
- mean and standard deviation
- range (high and low)
- Aggregate forecasts are usually more accurate
- Accuracy erodes as we go further into the future.
- Forecasts should not be used to the exclusion of
known information
4What Makes a Good Forecast
- It should be timely
- It should be as accurate as possible
- It should be reliable
- It should be in meaningful units
- It should be presented in writing
- The method should be easy to use and understand
in most cases.
5Forecast Horizons in Operation Planning
Figure 2.1
6Subjective Forecasting Methods
- Sales Force Composites
- Aggregation of sales personnel estimates
- Customer Surveys
- Jury of Executive Opinion
- The Delphi Method
- Individual opinions are compiled and
reconsidered. Repeat until and overall group
consensus is (hopefully) reached.
7Judgmental Forecasts
- There may not be enough time to gather data and
analyze quantitative data or no data at all. - Expert Judgment managers(marketing,operations,fi
nance,etc.) - Be careful about who you call an expert
- Sales force composite
- Recent experience may influence their perceptions
- Consumer surveys
- Requires considerable amount of knowledge and
skill - Opinions of managers and staff
- Delphi method a series of questionnaire,
responses are kept anonymous, new questionnaires
are developed based on earlier results Rand
corporation (1948)
8Objective Forecasting Methods
- Two primary methods causal models and time
series methods - Causal Models
- Let Y be the quantity to be forecasted and
(X1, X2, . . . , Xn) be n variables that have
predictive power for Y. - A causal model is Y f (X1, X2, . . . , Xn).
- A typical relationship is a linear one. That
is, - Y a0 a1X1 . . . an Xn.
What might be such variables for average income
for Turkey for 2007?
9Time Series Methods
- A time series is just collection of past values
of the variable being predicted. Also known as
naïve methods. Goal is to isolate patterns in
past data. (See Figures on following pages) - Trend
- Seasonality
- Cycles
- Randomness
10Time Series Model Building
- A time-series is a time ordered sequence of
observations taken at regular intervals over a
period of time. - The data may be demand, earnings, profit,
accidents, consumer price index,etc. - The assumption is future values of the series can
be estimated from past values - One need to identify the underlying behavior of
the series - pattern of the data
11Some Behaviors Typically Observed
- Trend
- E.g., population shifts, change in income.
Usually a long-term movement in data - Seasonality
- Fairly regular variations, e.g., Friday nights in
restaurants, new year in shopping malls, rush
hour traffic., etc. - Cycles
- Wavelike variations lasting more than a year,
e.g. economic recessions, etc. - Irregular variations
- Caused by unusual circumstances, e.g., strikes,
weather conditions, etc. - Random variations
- Residual variations after all other behaviors are
accounted for. Caused by chance
12Forecast Variations
13Types of Time Series Models
- We will cover the following techniques in this
section - Naïve
- Techniques for averaging
- Moving average
- Weighted moving average
- Exponential smoothing
- Techniques for trend
- Linear equations
- Trend adjusted exponential smoothing
- Techniques for seasonality
- Techniques for Cycles
14(No Transcript)
15Notation Conventions
- Let D1, D2, . . . Dn, . . . be the past values of
the series to be predicted (demand). If we are
making a forecast in period t, assume we have
observed Dt , Dt-1 etc. -
- Let Ft, t t forecast made in period t for the
demand in period t t where t 1, 2, 3, - Then Ft -1, t is the forecast made in t-1 for t
and Ft, t1 is the forecast made in t for
t1. (one step ahead) Use shorthand notation Ft
Ft - 1, t .
16Evaluation of Forecasts
- The forecast error in period t, et, is the
difference between the forecast for demand in
period t and the actual value of demand in t. - For a multiple step ahead forecast et Ft - t,
t - Dt. - For one step ahead forecast et Ft - Dt.
- e1, e2, .. , en forecast errors over n periods
- Mean Absolute Deviation MAD
(1/n) S e i - Mean Absolute Percentage Error MAPE
(1/n) S e i /Di 100 - Mean Square Error MSE (1/n) S ei 2
17Measures of Forecast Accuracy
- Error - difference between actual value and
predicted value - Mean absolute deviation (MAD)
- Average absolute error
- Mean squared error (MSE)
- Average of squared error
- Tracking signal
- Ratio of cumulative error and MAD
18MAD MSE
19Tracking Signal
20Biases in Forecasts
- A bias occurs when the average value of a
forecast error tends to be positive or negative
(ie, deviation from truth). - Mathematically an unbiased forecast is one in
which E (e i ) 0. See Figure 2.3 (next slide). - S e i 0
21Forecast Errors Over Time Figure
2.3
22Ex. 2.1
Which forecast is a better forecast? MAD, MAPE
and MSE
23- MAD1 17/6 2.83 better
- MAD2 18/6 3.00
- MSE1 79/6 13.17
- MSE2 70/6 11.67 better
- MAPE1 0.0325 better
- MAPE2 0.0333
24Forecasting for Stationary Series
- A stationary time series has the form
- Dt m e t where m is a constant (mean of the
series) and e t is a random variable with mean 0
and var s2 . - Two common methods for forecasting stationary
series are moving averages and exponential
smoothing.
25Moving Averages
- In words the arithmetic average of the N most
recent observations. For a one-step-ahead
forecast - Ft (1/N) (Dt - 1 Dt - 2 . . . Dt - N )
26Summary of Moving Averages
- Advantages of Moving Average Method
- Easily understood
- Easily computed
- Provides stable forecasts
- Disadvantages of Moving Average Method
- Requires saving all past N data points
- Lags behind a trend
- Ignores complex relationships in data
27Moving Average Lags a Trend
Figure 2.4
28Exponential Smoothing Method
- A type of weighted moving average that applies
declining weights to past data. - Based on the idea More recent data is more
relevant - 1. New Forecast a (most recent observation)
- (1 - a) (last forecast)
- or
- 2. New Forecast last forecast - a (last
forecast error) - where 0 lt a lt 1 and generally is small for
stability of forecasts ( around .1 to .2)
29Exponential Smoothing (cont.)
- In symbols
- Ft1 a Dt (1 - a ) Ft
- a Dt (1 - a ) (a Dt-1 (1 - a ) Ft-1)
-
- a Dt (1 - a )(a )Dt-1 (1 - a)2 (a )Dt - 2
. . . - Hence the method applies a set of
exponentially declining weights to past data. It
is easy to show that the sum of the weights is
exactly one. - (Or Ft 1 Ft - a (Ft -
Dt) )
30Weights in Exponential Smoothing Fig. 2-5
31Comparison of ES and MA
- Similarities
- Both methods are appropriate for stationary
series - Both methods depend on a single parameter
- Both methods lag behind a trend
- One can achieve the same distribution of forecast
error by setting a 2/ ( N 1). - Differences
- ES carries all past history. MA eliminates bad
data after N periods - MA requires all N past data points while ES only
requires last forecast and last observation.
32Exponential Smoothing for different values of
alpha
So how does alpha effect forecast?
33Example of Exponential Smoothing
34Picking a Smoothing Constant
Lower values of ??are preferred when the
underlying trend is stable and higher values of
??are preferred when it is susceptible to change.
Note that if ??is low your next forecast highly
depends on your previous ones and feedback is
less effective.
35Using Regression for Times Series Forecasting
- Regression Methods Can be Used When Trend is
Present. - Model Dt a bt.
- If t is scaled to 1, 2, 3, . . . , then the least
squares estimates for a and b can be computed as
follows - Set Sxx n2 (n1)(2n1)/6 - n(n1)/22
- Set Sxy n S i Di - n(n 1)/2 S Di
- _
- Let b Sxy / Sxx and a D - b (n1)/2
- These values of a and b provide the best fit
of the data in a least squares sense.
36An Example of a Regression Line
37Linear Trend Equation - Notation
A linear trend equation has the form Yt a
bt
- b is similar to the slope. However, since it is
calculated with the variability of the data in
mind, its formulation is not as straight-forward
as our usual notion of slope.
yt Forecast for period t, a value of yt at t0
and b is the slope of the line.
38Insights For Calculating a and b
- Suppose that you think that there is a linear
relation between the height (ft.) and weight
(pounds) of humans. You collected data and want
to fit a linear line to this data. - Weight a b Height
- How do you estimate a and b?
For further information refer to http//www.stat.p
su.edu/bart/0515.doc or any statistics book!
39 More Insights For Calculating a and b
- Demand observed for the past 11 weeks are given.
- We want to fit a linear line (DabT) and
determine a and b that minimizes the sum of the
squared deviations. (Why squared?)
A little bit calculus, take the partial
derivatives and set it equal to 0 and solve for a
and b!
40Linear Trend Equation Example
41Linear Trend Calculation
If we fit a line to the observed sales of the
last five months,
Question is forecasting the sales for the 6th
period. What do you think it will be?
42Linear Trend Calculation
812
-
6.3(15)
a
143.5
5
y 143.5 6.3t
y 143.5 6.36 181.5
43Other Methods When Trend is Present
Double exponential smoothing, of which Holts
method is only one example, can also be used to
forecast when there is a linear trend present in
the data. The method requires separate smoothing
constants for slope and intercept.
44Trends Adjusted Exponential Smoothing
- A variation of simple Exponential Smoothing can
be used when trend is observed in historical
data. - It is also referred as double smoothing.
- Note that if a series has a trend and simple
smoothing is used the forecasts will all lag the
trend. If data are increasing each forecast will
be low! When trend exists we may improve the
model by adjusting for this trend. (C.C. Holt) - Trend Adjusted Forecasts (TAF) is composed of two
elements a smoothed error and a trend factor - TAFt1 St Tt where
- St smoothed forecast TAFt ?(At TAFt)
- Tt current trend estimate Tt-1 b(TAFt
TAFt-1 Tt-1)
45Insights TAES
- TAFt1 St Tt where
- St smoothed forecast TAFt ?(At TAFt)
- Tt current trend estimate Tt-1 b(TAFt TAFt-1
Tt-1) (1-b) Tt-1 b(TAFt TAFt-1 )
Weighted average of last trend and last forecast
error. - ? and b are smoothing constants to be selected
by the modeler. - St is same with original ES feedback for the
forecast error is added to previous forecast with
a percentage of ? - If there is trend ES will have a lag. We must
also include this lag to our model. Hence Tt is
added where - Tt is the trend and updated each period.
46Forecasting For Seasonal Series
- Seasonality corresponds to a pattern in the data
that repeats at regular intervals. (See figure
next slide) - Multiplicative seasonal factors c1 , c2 , . . .
, cN where i 1 is first period of season, i 2
is second period of the season, etc.. -
- S ci N.
- ci 1.25 implies 25 higher than the
baseline on avg. - ci 0.75 implies 25 lower than the
baseline on avg.
47A Seasonal Demand Series
48Quick and Dirty Method of Estimating Seasonal
Factors
- Compute the sample mean of the entire data set
(should be at least several seasons of data). - Divide each observation by the sample mean. (This
gives a factor for each observation.) - Average the factors for like periods in a season.
- The resulting N numbers will exactly add to N and
correspond to the N seasonal factors.
49Deseasonalizing a Series
- To remove seasonality from a series, simply
divide each observation in the series by the
appropriate seasonal factor. The resulting series
will have no seasonality and may then be
predicted using an appropriate method. Once a
forecast is made on the deseasonalized series,
one then multiplies that forecast by the
appropriate seasonal factor to obtain a forecast
for the original series.
50Seasonal series with increasing trend Fig 2-10
51Initialization for Winterss Method
52Practical Considerations
- Overly sophisticated forecasting methods can be
problematic, especially for long term
forecasting. (Refer to Figure on the next slide.) - Tracking signals may be useful for indicating
forecast bias. - Box-Jenkins methods require substantial data
history, use the correlation structure of the
data, and can provide significantly improved
forecasts under some circumstances.
53The Difficulty with Long-Term Forecasts
54Tracking the Mean When Lost Sales are
Present Fig. 2-13
55Tracking the Standard Deviation When Lost Sales
are Present Fig. 2-14
56Case Study Sport Obermeyer Saves Money Using
Sophisticated Forecasting Methods
- Problem Company had to commit at least half of
production based on forecasts, which were often
very wrong. Standard jury of executive opinion
method of forecasting was replaced by a type of
Delphi Method which could itself predict forecast
accuracy by the dispersion in the forecasts
received. Firm could commit early to items that
had forecasts more likely to be accurate and hold
off on items in which forecasts were probably
off. Use of early information from retailers
improved forecasting on difficult items. - Consensus forecasting in this case was not the
best method.