Lecture 3 - Forecasting(s)
Lecture 3 - Forecasting(s)
??
Learning outcomes
Forecasting Prediction
Objective Subjective
Scientific Intuitive
Reproducible Non-reproducible
Free from bias Individual bias
Error analysis Error analysis limited
possible
Introduction to forecasting
In virtually every decision they make, executives today
consider some kind of forecast
Forecasts are vital to every organization for every
significant management decision
Forecast of demand is an essential input for
planning
Strategic importance of forecasting
Forecast is the only estimate of demand until actual
demand becomes known
Forecast of demand drives decisions in many areas:
Human resources
Capacity
Supply chain management
Inventory control/production planning
Forecasting time horizons
Forecast classified by future time horizon it will cover
Short-range forecast
– Up to 1 year, generally less than 3 months
– Used for purchasing, job scheduling, workforce
levels, job assignments, production levels
Medium-range forecast
– 3 months to 3 years
– Used for sales and production planning, budgeting
Long-range forecast
– 3+ years
– Used for new product planning, facility location,
research and development, overall capacity needs
Distinguishing differences
Medium term and long-run forecasts are distinguished
by 3 features:
Medium and long-range deal with more comprehensive
issues
Short term forecasts employ different methodologies
Short term forecasts tend to be more accurate
Types of forecasts
Economic forecasts
– Address business cycle – predict inflation rate,
money supply, housing starts, etc.
Technological forecasts
– Predict rate of technological progress
– Impacts development of new products
– Predicts new product sales
Demand forecasts
– Predict demand for company’s existing
products and services
– Also called sales forecasts
Economic and technological fall outside the role of
Ops managers so not covered in course
Hazards of forecasting
Underestimation
Overestimation
An underestimation of
An overestimation of
demand can result in
demand can result in:
various opportunity costs
Excess resources including:
Excess inventories Lost sales
The need to have Loss of goodwill
discount sales
Damage of company
image
Loss of market share
Loss of revenue presently
and in the future
7 steps in forecasting
Determine the use of the forecast
– E.g. Disney World uses park attendance forecasts to
drive staffing, opening times, ride availability and food
supplies
Select the items to be forecasted
– Individual products or groups
Determine the time horizon of the forecast
Select the forecasting model(s)
Gather the data needed to make the forecast
Make the forecast
Validate and implement results
– Done by reviewing the forecast to make sure the
model, assumptions and data are valid
The realities!
Forecasts are seldom perfect – in fact they are almost
always wrong
Most techniques assume an underlying stability in the
system
Product family and aggregated forecasts are more
accurate than individual product forecasts
Forecasts are more accurate for shorter time periods
Forecasts are no substitute for calculated demand
Forecasting approaches/techniques
2 general approaches: Qualitative and Quantitative
Qualitative
– Generated from information that does not have a well-defined
analytical structure
– Used when situation is vague and little data exist
• New products (so no sales history)
• New technology
– Based on personal judgment, involves intuition, experience,
tends to be subjective e.g., forecasting sales on Internet
– Advantage – allows for some fairly quick results
Quantitative
– Used when situation is ‘stable’ and historical data exist
• Existing products
• Current technology
– Employ one or more mathematical models that rely on historical
data and/or causal variables to forecast demand e.g.,
forecasting sales of color televisions
Forecasting Models
Forecasting
Techniques
Consumer
Market Survey Decomposition
Qualitative approaches to forecasting
A Jury of executive opinion
– Pool opinions of high-level experts, sometimes
augment by statistical models
Delphi method
– Panel of experts, queried iteratively
Sales force composite
– Estimates from individual salespersons are
reviewed for reasonableness, then aggregated
Consumer market survey
– Ask the customer
1. Jury of executive opinion
Or panel consensus
Involves small group of high-level experts and managers
– Opinions, experience, and technical knowledge of one or
more managers are summarized to arrive at a single
forecast
Group estimates demand by working together
• ‘2 heads are better than 1’ – discussion by group will
provide better forecast than 1 individual
Combines managerial experience with statistical models
Relatively quick
‘Group-think’ disadvantage
Also lower level staff may feel intimated by higher levels of
management
2. Delphi method
Iterative group process, continues until consensus is
reached
Reduces ‘group-think’
Difference between jury of executive opinion is that in the
latter the experts are brought together in a meeting format
for the discussion
Delphi – individual forecasts made with each expert – each
expert develops own forecast; collective set then shared
with all experts, allowing each to then modify original
forecast. Continues until consensus is reached
3. Sales force composite
Horizontal Trend
Data consistently increase or decrease
Data cluster about a horizontal line
Seasonal Cyclical
Data reveal gradual increases and decreases
Data consistently show peaks and valleys over extended periods
1. Trend pattern
Gradual overall upward or downward movement of
the data over time
– Changes due to population, technology, age,
culture, etc.
Typically several years duration
0 5 10 15 20
3. Seasonal pattern
Seasonality is a special type of cyclical pattern
Regular pattern of up and down fluctuations that repeat
after a period of days, weeks, months or quarters
Due to weather, customs, etc.
Occurs within a single year
6 common seasonality patterns
Number of
Period Length ‘seasons’ in pattern
Week Day 7
Month Week 4-4.5
Month Day 28-31
Year Quarter 4
Year Month 12
Year Week 52
4. Random pattern
Erratic, unsystematic, fluctuations, ‘blips’
Due to random variation or unforeseen events e.g.
strike, tornado
Short duration and non-repeating
Unforecastable – arise from chance and cannot be
predicted
M T W T F
Quantitative models
Ft = A t – 1
2. Moving averages
Used if little or no trend, seasonal or cyclical patterns
Horizontal pattern in time series is based on the mean
(average) of the demands
MA involves calculating the average demand for the n most
recent time periods and using it as a forecast for the next
time period
For the next time period, after the demand is known, the
oldest demand from the previous average is replaced with
the most recent demand and the average is recalculated
In this way, the n most recent demands are used, the
average ‘moves’ from period to period
i. Simple moving average method
Used if little or no trend, seasonal or cyclical patterns
Simple moving average is a series of arithmetic averages
Uses a number of historical actual data values to generate
forecast
Nothing more than the mathematical average of the last
several periods of actual average – the MA serves as an
estimate of the next period’s demand
Actual 3-Period
Period Occupancy Moving Average
1 79
2 84
3 83
4 81 (79 + 84 + 83)/3 = 82
5 98 (84 + 83 + 81)/3 = 83
6 100 (83 + 81 + 98)/3 = 83
7 ? (81 + 98 + 100)/3 = 93
Exercise 1: Simple moving average
Estimate simple moving average using the following
customer-arrival data
1 79
2 84
3 83
4 81 [(3 x 83) + (2 x 84) + (79)]/6 = 83
5 98 [(3 x 81) + (2 x 83) + (84)]/6 = 82
6 100 [(3 x 98) + (2 x 81) + (83)]/6 = 90
7 ? [(3 x 100) + (2 x 98) + (81)]/6 =
96
3-week MA 6-week MA
450 — forecast
forecast
430 —
Patient arrivals
410 —
390 —
Actual patient
370 — arrivals
| | | | | |
0 5 10 15 20 25 30
Week
3. Exponential smoothing
Major drawback of moving averages – need to continually carry
large amount of historical data
As each new piece of data is added, oldest observation is
dropped and new forecast calculated
In most instances most recent occurrences are more indicative
of the future than those in distant past
If premise is valid – importance of data diminishes as past
becomes more distant
Exponential smoothing – most used of all forecasting techniques
Requires only 3 items of data
– Last period’s forecast (most recent forecast)
– Actual demand for last period
– Smoothing constant, alpha (α), where 0 ≤ α ≤ 1.0
So look at error in last forecast and take a fraction of that error
and adjust that forecast to get new forecast
Exponential smoothing
Smoothing constant, alpha, (), chosen by the forecaster
– Ranges from 0 to 1; usually between 0.05 and 0.5 for
businesses
– Subjectively chosen
Fairly easy to use and accurate
Involves little record keeping of past data
Concept fairly simple – latest estimate of demand is equal to old
estimate adjusted by a fraction of the difference between last
period’s actual demand and the old estimate
So method assigns exponentially decreasing weights as data gets
older – recent data are given relatively more weight than older data
Called exponential smoothing because each increment in the past is
decreased by (1 - ) - decreasing weight as observations get older
(since future more dependent on recent past than on distant past)
Exponential smoothing
New forecast = Last period’s forecast + a (Last period’s actual
demand – Last period’s forecast)
Ft = Ft – 1 + a(At – 1 - Ft – 1)
Ft = a At – 1 + (1– a) Ft – 1
0 1
weight
Decreasing weight given
to older observations
(1 )
(1 ) 2
(1 ) 3
today
Impact of different
Higher (0.5) - more responsive – more closely follows
actual demand
Lower (0.1) – smoother (smooth out fluctuations, which
is desirable in some instances)
225 –
Actual a = .5
demand
200 –
Demand
175 –
a = .1
| | | | | | | | |
150 1– 2 3 4 5 6 7 8 9
Quarter
Exponential smoothing and moving
average
3-week MA 6-week MA
450 –
forecast forecast
430 –
410 –
Patient arrivals
390 –
370 –
Exponential
smoothing
= 0.10
| | | | | |
0 5 10 15 20 25 30
Week
Exponential smoothing
Approach easy to use and has been successfully applied
to virtually every type of business
Simplicity also a disadvantage when underlying average
is changing – in case of demand time series with trend
Smoothing constant – difference between an accurate
and an inaccurate forecast
Higher values may help reduce forecast error but if
large values are required (e.g. >0.50) chances are
good that another model is needed because of a
significant trend or seasonal influence in demand series
Exercise 3: Exponential smoothing
Patient Error
Week Forecast Error |(A-F)|
Arrivals Squared
1 400 400 400-400 = 0 0
2 380 400 380-400 = 20 400
3 411 398 411-398=13 169
4 415 399.3 415-399.3=15.7 246.49
Total 48.7 815.49
MAD 48.7/4=12.175
MSE 815.49/4=203.87
Exercise 4: MAD & MSE
Using α = 0.50, find MAD and MSE
MAPE =
∑ 100|Actuali - Forecasti|/Actuali
i=1
n
Example: Determining MAPE
Using α = 0.50 and exponential smoothing technique,
find MAPE
Patient
Week Forecast Error |(A-F)| Abs % error
Arrivals
1 400 400 0 100*0 = 0
2 380 400 20 100* 20/380 = 5.26
3 411 390 21 100* 21/411 = 5.11
4 415 400.5 14.5 100* 14.5/415 = 3.49
Total 13.87
MAPE =13.87/4 = 3.47%
Criteria for selecting time-series
methods
^ = a + bx
y
^ where y = computed value of the
variable to be predicted (dependent
variable)
a = y-axis intercept
b = slope of the regression line
x = the independent variable (in this
Least squares method
Least-squares method – finds a best fitting straight line (line of best fit)
Asterisks are actual observations; then fit a trend line to these values
Values of Dependent Variable
Deviation3
Deviation4
Deviation1
Deviation2
Trend line, ^y = a + bx
(error)
Time period
Least squares method
Actual observation
Values of Dependent Variable
Deviation7
(y value)
Deviation5 Deviation6
Deviation3
Least squares method minimises
the Deviation
sum of4 the squared errors
(deviations)
Deviation1
(error) Deviation2
Trend line, y^= a + bx
Time period
Least squares method
Equations to calculate values for a and b
^ a = y-axis intercept
y = a + bx
b=slope of line
x = known value of independent variable (in
Sxy - nxy this case time)
b=
Sx2 - nx2 y= known value of dependent variable
(variable to be predicted)
n=no of observations
a = y - bx x bar = average of the value of the x’s
y bar = average of the value of the y’s
Example: Least squares method
Time Electrical Power
Year Period (x) Demand
2001 1 74
2002 2 79
2003 3 80
2004 4 90
2005 5 105
2006 6 142
2007 7 122
2008 ?
2009 ?
Example: Least squares method
Time Electrical Power
Year Period (x) Demand (y) x2 xy
2001 1 74 1 74
2002 2 79 4 158
2003 3 80 9 240
2004 4 90 16 360
2005 5 105 25 525
2006 6 142 36 852
2007 7 122 49 854
2008 ?
2009 ?
Solution: Least squares method
Time Electrical Power
Year Period (x) Demand x2 xy
2001 1 74 1 74
2002 2 79 4 158
2003 3 80 9 240
2004 4 90 16 360
2005 5 105 25 525
2006 6 142 36 852
2007 7 122 49 854
∑x = 28 ∑y = 692 ∑x2 = 140 ∑xy = 3,063
x=4 y = 98.86
=28/7 =692/7
Trend line,
y^ = 56.70 + 10.54x
160 –
150 –
140 –
Power demand
130 –
120 –
110 –
Demand for 2008 (estimate)
100 –
= 56.70 + 10.54 (8) = 141 MW
90 –
80 – Demand for 2009 (estimate)
70 – = 56.70 + 10.54 (9) = 152 MW
60 –
50 –
| | | | | | | | |
2001 2002 2003 2004 2005 2006 2007 2008 2009
Year
Requirements for least squares
Must meet 3 requirements in order to use least squares:
Always plot the data to ensure a linear relationship
Do not predict time periods far beyond the database
– e.g. cannot take 5 years sales data and project 10
years into the future – world is too uncertain
Deviations around the least squares line are assumed
to be random
– Normally distributed – most observations close to line
and a smaller number farther out
Associative forecasting
Time-series forecasting – time is the only independent variable
considered
Associative forecasting – considers several variables related to
quantity being predicted
Also called causal method/ causal relationship forecasting -
used when historical data are available and relationship between
factor to be forecasted and other factors can be identified
Used when changes in one or more independent variables can be
used to predict the changes in the dependent variable
– Most common associative forecasting model is linear
regression analysis
One problem with this method is that we need a forecast for x – the
independent variable – before estimating the dependent variable
and it can be difficult for some variables such as GDP,
unemployment
Linear regression
One variable (dependent variable) is related to one or more
independent variables by a linear equation
Dependent variable (e.g. demand for doorknobs) – one
manager wants to forecast
Independent variables (such as advertising expenditure
and new housing data) – assumed to affect the dependent
variable and thereby ‘cause’ results observed in the past
Linear regression analysis
Sales Local
Payroll
($ millions), y ($
billions), x
2.0 1
3.0 3
2.5 4
2.0 2
2.0 1
3.5 7
Solution: Linear regression
First: Determine whether there is a linear relationship between Arima
payroll (independent) and sales (dependent variable)
Then use least squares criterion
4.0 –
3.0 –
Sales
2.0 –
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll
Solution: Linear regression
Sales, y Payroll, x x2 xy
2.0 1 1 2.0
3.0 3 9 9.0
2.5 4 16 10.0
2.0 2 4 4.0
2.0 1 1 2.0
3.5 7 49 24.5
∑y = 15.0 ∑x = 18 ∑x2 = 80 ∑xy = 51.5
Sales
3.0 –
nSxy - SxSy
r=
[nSx2 - (Sx)2][nSy2 - (Sy)2]
Correlation coefficient
y y
y y
Sales, y Payroll, x x2 xy
2.0 1 1 2.0
3.0 3 9 9.0
2.5 4 16 10.0
2.0 2 4 4.0
2.0 1 1 2.0
3.5 7 49 24.5
∑y = 15.0 ∑x = 18 ∑x2 = 80 ∑xy = 51.5
^
y = a + b1x1 + b2x2 …