Title: Introductory Forecasting Concepts
1Introductory Forecasting Concepts
2Outline
- Information vs. intuition and the value of data
- Past vs. future performance
- Accuracy and its limits
- Prediction intervals
- Forecast accuracy and decisions
- Aggregate forecasting
- Averaging and smoothing
- Monitoring forecasting systems
- Dealing with alerts and outliers
3Forecasting
- The art of using information to predict future
behavior of some time series - There is no magic math that allows clairvoyance
4Forecasting
- This course focuses on using historical data for
forecasting - This should not diminish the importance of other
sources of information and common sense - Information consists of
- Historical data on our time series
- Insight/knowledge and common sense
- Dont confuse information with intuition/guessing/
human pattern recognition
5Information and Intuition
- Example from a forecasting paper in the electric
power industry - Total kilowatt-hour usage in Georgia,
Mississippi, and the gulf region appears to
follow a 12 month seasonal pattern while Alabama
follows a 13 month season. - What do you think?
6On the other hand..
- People see Elvis visage in a cloud
- Humans see patterns in purely random systems
- Dont confuse information with intuition
- Lets try a case study. Forecast a real time
series from scratch using intuition (this is real
data!)
7(No Transcript)
8Well guess same as last month
9(No Transcript)
10Well guess same as last month plus a little more
for a possible trend
11This is easy, who needs forecasting
12Continue with our successful method guess the
same as last month plus a little more for a
possible trend
13(No Transcript)
14Definitely looks like a trend
15(No Transcript)
16Trend might be a tad steeper than I thought
17Opps
18Momentary deviation, trend will continue
19See, I told you this was easy!
20Trend will continue
21Opps, another momentary fluctuation
22Trend should continue
23Oh oh!
24Sales has leveled off Lets average last few
points
25Oh oh, maybe things are going down hill
26Lets be conservative and Assume a negative trend
27Thank goodness, we are still basically level
28Well guess same as last month
29This stuff is easy
30We have for sure leveled off
31Big trouble!!! Chief forecaster Smith and CEO
Smothers fired!
32New chief forecaster points out the obvious trend
33Remarkable turnaround in sales. New CEO Smithers
given credit
34Still looks like a trend to me
35Maybe not!
36Level except for anomaly
37Have things turned around?
38Ill hedge my bets
39Things have turned around. Perhaps Smithers truly
is a genius
40Trend up!
41Not bad!
42Revise trend a tad
43Smithers makes cover of Fortune
Smithers
Smothers
44This is easy!!
45No big deal, trend continues
(in an unrelated matter Smithers cashes out
stock options)
46(No Transcript)
47Heads will surely roll soon
48Lets be cautiously optimistic
49Smithers called before board
50(No Transcript)
51Perhaps we over reacted
52We will guess level
53Back to normal!
54(No Transcript)
55Smithers fired!
56What have we learned?
- Our Actual sales appears to be a great leading
indicator of our forecast - It is supposed to work the other way around!!!!
- If we add up the (absolute value of) our forecast
errors, we get 226.2 - If we had simply guessed same as last month we
get 175.1
57Information vs. Intuition
- Our intuition (ability to recognize a pattern)
was poor given almost no information or data.
Never-the-less we saw patterns. - For monthly data we can be tempted to over
think forecasting. - Now some additional information
- Source of data is monthly sales of Australian Red
Wine - We also have a few years of data
58(No Transcript)
59We observe
- Series behavior includes
- Clear seasonal behavior
- A clear upward trend
- An increase in amplitude as the level increases
60Value of Data
- Given data, we can forecast this series quite
accurately. - This assumes stable behavior
- Recommend at least 4 - 5 seasons of data.
- Monthly demand thus prefers 4 to 5 years of data
- With 2 years of data, we are essentially
forecasting on the basis of two points if there
is seasonal behavior
611st Law of Forecasting Past vs. Future
Performance
- In forecasting, we assume the future will behave
like the past - If behavior changes, our forecasts can be really
really terrible -
62Here is an easy series to forecast!
63No method based on historical behavior could see
this coming
64Corollary to the 1st Law of Forecasting
- In the real world, the future often does not
behave like the past. - The behavior of many time series changes fairly
frequently. -
652nd Law of ForecastingForecast Accuracy
Limitations
- Even given that the future behaves like the past,
there is a limit to how accurate forecasts can be
(or nothing can be predicted with complete
accuracy) - Typical times series have a signal component
and a noise component - The achievable accuracy depends on the magnitude
of the noise component
66Corollary to the 2nd Law of Forecasting
- All forecasts will be wrong
- The key issue is How close will the forecast be
to the actual value? - It is crucial to attempt to quantify the expected
accuracy of a forecast
67Prediction Intervals
- We can create prediction intervals of the basic
form - There is a xx probability that the actual
future value will fall in the range - Forecast ? K
- Example
68Now
Future forecast
Past Data
69(No Transcript)
70(No Transcript)
71Prediction Intervals
- Details become complex (and will come later)
- Prediction intervals based on assumptions
- The future behaves like the past
- The model used to calculate the prediction
interval is an accurate model of the data - Prediction intervals tend to be optimistic
(because of the assumptions) - Never-the-less, look how wide they are!
723rd Law of Forecasting
- The further into the future you attempt to
forecast, the greater will be the forecast error.
- This is typically true even if the future behaves
like the past. - (as we can see from the prediction intervals)
73Corollary to 3rd Law of Forecasting
- Major decisions are often based on long term
forecasts. - e.g. building a new plant
- Considering risk is even more important in these
cases - Example Fiber optic production capacity
74Decisions and the 2nd Law of Forecasting
- Decisions will be based on the forecast
- (Otherwise there is no need to forecast!)
- One should consider the ramifications of a
decision over the range of possible outcomes - That is forecasts have inherent error, thus the
decisions based on forecasts have inherent risk - Rational decision making includes analysis of
risk - You would never buy stock solely on the basis of
expected return
75(No Transcript)
76Sales forecast
77Forecast prediction interval
78Forecast prediction interval
79Forecasting and Decisions
- We forecast as part of a decision making process
- It is important to keep in mind the decisions
that are based on the forecast - Keeping this link in mind can help guide us
- When and how often to forecast
- At what level of aggregation to forecast
- Etc.
80Aggregate Forecasting
- Suppose we forecast demand for product X at the
individual customer level. - Suppose we also need a forecast of total demand
for product X for production planning - Should we add the individual forecasts together
to get the forecast for overall demand for
product X? - Or should we forecast total demand for product X
directly using total demand data?
81Research is Inconclusive
- Define Disaggregated forecasting
- Develop individual forecasting methods for each
customer - Add the forecasts together to get forecast of
total demand - Define Direct forecasting
- Use the total monthly demand time series data to
develop a forecasting method
82Argument for disaggregated forecasting
- By aggregating into total demand, we have, by
definition, lost information - Patterns existing in customer specific data that
we could exploit for improved forecasting may be
lost/obscured through aggregation - Under idealized conditions, it can be shown that
disaggregated forecasting will be at least as
good as direct forecasting - Assumptions for this are arguable however
83Argument for Direct Forecasting
- Idealized circumstances never true in practice
- Each individual forecast requires specification
of models and model parameter estimates both of
which are subject to error - These errors are compounded in disaggregated
forecasting - Direct forecasting does not suffer from this. We
develop one simple model.
84Empirical Results Support Both Viewpoints
- Direct method tends to be better when
- Individual series are positively correlated (tend
to move together) - e.g. all customers effected by the economy
- Lower level forecasts are ad hoc and do not
exploit all the information available - e.g. simple automated methods are applied
85Empirical Results Support Both Viewpoints
- Disaggregated method tends to be better if
- Individual series are negatively correlated (tend
to move oppositely) - e.g. sales of Product X Product Y ? constant
- Information at the lower levels is carefully
exploited - e.g. expertise is applied to forecast individual
customer demands - Warning be wary of demand forecasts from Sales
Dept
86Disaggregated vs. Direct
- One can use composite forecasts (combine
disaggregated and direct forecasts - One can try both and test which works better in
practice - What if the sum of disaggregated forecasts is not
equal to forecast of the sum? - Performance difference tends to be greatest for
near term forecasts (1 or 2 periods ahead)
87Forecasting Fundamentals
- Averaging
- Smoothing
- Modeling
- Most forecasting techniques combine modeling and
smoothing
88Averaging
- Is a basic concept in statistics
- Is important in understanding simple smoothing
based forecasts - Understand the trade off between averaging and
data currency
89Standard deviation of an average
- The standard deviation of an average is inversely
proportional to the square root of the number of
data points in the average - The larger the sample, the better the average
approximates the true mean - Ball players may hit 450 in the first two weeks,
but not by the end of the season
90(No Transcript)
91Standard deviation of an average
- As sample size increases, the accuracy of an
average increases - The increase in accuracy decreases in N
- i.e. the marginal value of more samples decreases
- Aside How big should N be? Answer 5
- (an obvious gross over generalization)
92Knee of the curve
93Forecasting with Moving Averages
- Consider the time series generated by
- 10 random white noise
- (the best forecast would be 10 if we knew how
the series behaved beforehand) - We will average the last 3 points (a 3 period
moving average) - Then we average the last 10 points (a 10 point
moving average)
94(No Transcript)
95(No Transcript)
96(No Transcript)
97Averaging
- Averaging can be seen to smooth or filter out
the noise. - Why not use the average of all the data?
- Because things rarely remain the same
98(No Transcript)
99(No Transcript)
100Averaging
- Long averages are good since they reduce the
variance and thus the forecast error - Short averages are good because the respond more
quickly to changes - How much data should we include in our average?
- There is a trade off
101Moving Averages
- Moving averages are common forecasting techniques
- Their best feature is their simplicity everyone
can understand them - Consider the weights attached to past data points
in a moving average
102(No Transcript)
103Moving Averages
- We want less weight on past data points so the
forecast can adapt to changes - Why then do we put equal weight (0.2) on points 4
and 5 periods ago? - Why do we give a weight of 0.2 to 5 periods ago
but zero weight to six periods ago? - Why not discount weight based on age?
104(No Transcript)
105Moving Average
106Moving Average
Exponential Smoothing
107Average age of data is the same in this example
108Average age of data is the same in this example
ES gives decreasingly less weight to past data
109Exponential Smoothing
- With equivalent average age, the forecast error
variance will be the same (under a constant
model) - Since more weight is on recent points, ES should
adapt to changes more quickly - The weighting scheme is more intuitively
appealing - In general, ES is preferred to MA
- The only disadvantage is its complexity
110Time Series Modeling
- The science of extracting a signal from noise
- Requires a fair amount of data
- Can be very effective as long as the behavior of
the time series does not change much.
111Simple Models
- Constant Mean Random Noise
- Trend Random Noise
- Trend Seasonal Factor Random Noise
- These are the basis for the models in SAP and
other common planning systems
112Monitoring and Alerts
- Especially useful when automatically forecasting
many time series - Basic idea
- Compare forecast to actual value
- If error is too big, issue an alert
- Alert dealt with via human intervention
- Automatic adaptation methods also exist
- These are not without dangers
113Monitoring
- We can monitor for
- Magnitude of forecast errors
- Forecast bias
114(No Transcript)
115Looks like something happened around here
116Could devise Control Limits
117Story clearer using AD
118Clearer still using Smoothed AD
119Monitoring for Bias
- Example
- Can you spot anything in the following plot of
forecast error Actual Forecast?
120(No Transcript)
121- From time 0 to 25, White noise with a mean of
zero - From time 26 to 50, White noise with a mean of
0.2 - After time 26, the forecast is too low by 0.2 on
average - Now consider Error Total
- Sum of all errors up to now
- Should stay close to zero
122(No Transcript)
123Tracking Signal
- Standardize Error Total
- Tracking Signal Error total / Smoothed MAD
124(No Transcript)
125Alerts and Outliers
- It is crucial to investigate alerts and outliers
and find their cause - It may be a fluke or an error that should be
ignored - It may be the most important point in the data
set indicating entirely new behavior - i.e. it contains much information
126Example
- Lets look at my monthly power bill and that of
three colleagues - This example is real!
127Actual
Alert!
Forecast
128Outliers and Alerts
- Forecast is way off.
- What happened?
- What should be our next forecast?
- Close to the prior pattern?
- Close to the most recent observation?
129Example
- Lets investigate my power bill outlier
- Facts of the case
- From Jan to July 31, we were on sabbatical and
rented out our house - We returned Aug. 1
- My family still wonders what those switchy
thingys on the wall are - They like fresh air and AC together
130Outliers
- After investigation, we know what to do
- We expect power usage to stay at its new, higher
level - We can adjust our forecast accordingly
- We might also adjust our business practice in
important new ways on the basis of what we have
learned - Throwing out outliers simply because they are
outliers is very bad practice
131Data with many zeros
- 100 APCI Demand data sets
132How do we deal with this?
133Assume a Demand Distribution
134Poisson fit to data
- We could fit a Poisson to the data
- We could use the Poisson mean as the forecast
- This assumes each demand outcome iid
- There exist methods that try to track the
parameter(s) of the demand distribution over time - see parameter driven state space models
135Thank you