Lecture (3)
Chapter 3
Forecasting
Dr.Waleed Elfeel
Chapter 3: Learning Objectives
You should be able to:
1. List the elements of a good forecast
2. Outline the steps in the forecasting process
3. Describe at least three qualitative forecasting techniques and
the advantages and disadvantages of each
4. Compare and contrast qualitative and quantitative
approaches to forecasting
5. Describe averaging techniques, trend and seasonal
techniques, and regression analysis, and solve typical
problems
6. Explain three measures of forecast accuracy
7. Compare two ways of evaluating and controlling forecasts
8. Assess the major factors and trade-offs to consider when
choosing a forecasting technique
3-2
Forecast
Forecast – a statement about the future value of a
variable of interest
We make forecasts about such things as weather,
demand, and resource availability
Forecasts are an important element in making informed
decisions
I see that you will
get an “A” this semester
3-3
Uses of Forecast
Help managers plan the system ( long term ):
Types of products to offer
Facilities and equipment to have, to locate
• Help managers plan the use of the system ( short
term ):
Planning inventory
Work force level
Planning purchasing and production
Budgeting and scheduling
Instructor Slides 4
Two Important Aspects of Forecasts
Expected level of demand
The level of demand may be a function of some
structural variation such as trend or seasonal variation
Accuracy
Related to the potential size of forecast error
3-5
Features Common to All Forecasts
1. Techniques assume some underlying causal system that
existed in the past will persist into the future
2. Forecasts are not perfect
3. Forecasts for groups of items are more accurate than
those for individual items
4. Forecast accuracy decreases as the forecasting horizon
increases
3-6
Elements of a Good Forecast
The forecast
should be timely
should be accurate
should be reliable
should be expressed in meaningful units
should be in writing
technique should be simple to understand and use
should be cost effective
3-7
Steps in the Forecasting Process
“The forecast”
Step 6: Monitor the forecast
Step 5: Prepare the forecast
Step 4: Gather and analyze data
Step 3: Select a forecasting technique
Step 2: Establish a time horizon
Step 1: Determine purpose of forecast
3-8
Forecast Accuracy and Control
Forecasters want to minimize forecast errors
It is nearly impossible to correctly forecast real-
world variable values on a regular basis
So, it is important to provide an indication of
the extent to which the forecast might deviate
from the value of the variable that actually
occurs
Forecast accuracy should be an important
forecasting technique selection criterion
Error = Actual – Forecast
If errors fall beyond acceptable bounds,
corrective action may be necessary
3-9
Forecast Accuracy Metrics
MAD
MAD =
Actual t − Forecast t
Easy to compute
n
Weights errors linearly
MSE
(Actual − Forecast t )
2
MSE = t
Squares error
n −1
More weight to large errors
MAPE
Actual t − Forecast t
Actual t
100 Puts errors in perspective
MAPE =
n
3-10
Forecast Error Calculation
Actual Forecast (A-F)
Period
(A) (F) Error |Error| Error2 [|Error|/Actual]x100
1 107 110 -3 3 9 2.80%
2 125 121 4 4 16 3.20%
3 115 112 3 3 9 2.61%
4 118 120 -2 2 4 1.69%
5 108 109 1 1 1 0.93%
Sum 13 39 11.23%
n=5 n-1 = 4 n=5
MAD MSE MAPE
= 2.6 = 9.75 = 2.25%
3-11
Forecast Error Calculation
Class Work
The following data come from regression line
projections:
Compute the MAD, MSE and MAPE.
3-12
Forecast Error Calculation
Actual Forecast (A-F)
Period
(A) (F) Error |Error| Error2 [|Error|/Actual]x100
1 406 410 -4 4 16 0.98 %
2 423 419 4 4 16 0.94 %
3 423 428 -5 5 25 1.18 %
4 440 435 5 5 25 1.13 %
Sum 18 4.23 %
n=4 n-1 = 3 n=4
MAD MSE MAPE
= 4.5 = 27.33 = 1.06 %
3-13
Forecasting Approaches
Instructor Slides 14
Forecasting Approaches
Instructor Slides 15
Forecasting Approaches
Qualitative Forecasting
Qualitative techniques permit the inclusion of soft
information such as:
Human factors
Personal opinions
Hunches
These factors are difficult, or impossible, to quantify
Quantitative Forecasting
Quantitative techniques involve either the projection
of historical data or the development of associative
methods that attempt to use causal variables to make a
forecast
These techniques rely on hard data
3-16
Time-Series Forecasts
Forecasts that project patterns identified in
recent time-series observations
Time-series - a time-ordered sequence of
observations taken at regular time
intervals
Assume that future values of the time-series
can be estimated from past values of the
time-series
3-17
Time-Series Behaviors
Trend
Seasonality
Cycles
Irregular variations
Random variation
3-18
Time-Series Behaviors
Trend
A long-term upward or downward movement in data
Population shifts
Changing income
Seasonality
Short-term, fairly regular variations related to the calendar
or time of day
Restaurants, service call centers, and theaters all
experience seasonal demand
3-19
Time-Series Behaviors
Cycle
Wavelike variations lasting more than one year
These are often related to a variety of economic,
political, or even agricultural conditions
Random Variation
Residual variation that remains after all other behaviors
have been accounted for
Irregular variation
Due to unusual circumstances that do not reflect typical
behavior
Labor strike
Weather event
3-20
Time-Series Behaviors
Irregular
variation
Random
Trend variations
Cycles
14
15
16
Seasonal variations
3-21
Time Series Forecasts
Instructor Slides 22
Time-Series Forecasting - Naïve Forecast
Naïve Forecast
Uses a single previous value of a time series as the basis
for a forecast
The forecast for a time period is equal to the previous
time period’s value
Can be used with
a stable time series Uh, give me a minute.. We sold 250
seasonal variations
wheels last week.... Now, next week
we should sell....
trend
3-23
Naive Forecast
Simple to use
Virtually no cost
Data analysis is nonexistent
Easily understandable
Cannot provide high accuracy
F(t) = A(t-1)
Instructor Slides 24
Naive Forecast
Example:
Instructor Slides 25
Naïve Forecasts
Data with trends Example
Week Sales F (t) = A(t-1) + (A(t-1) – A(t-2))
(t) y F (6) = A (5) + (A(5) – A (4))
1 150 F (6) = 177 + (177 – 166)
2 157 F (6) = 177 + 11
3 162 F (6) = 188
4 166
5 177
6 ?
3-26
Time-Series Forecasting - Averaging
These Techniques work best when a series
tends to vary about an average
Averaging techniques smooth variations in
the data
They can handle step changes or gradual
changes in the level of a series
Techniques
1. Moving average
2. Weighted moving average
3. Exponential smoothing
3-27
Moving Average
Technique that averages a number of the most
recent actual values in generating a forecast
n
A t −i
Ft = MA n = i =1
n
where
Ft = Forecast for time period t
MA n = n period moving average
At −1 = Actual value in period t − 1
n = Number of periods in the moving average
3-28
Moving Average
3-29
Moving Average
As new data become available, the forecast is
updated by adding the newest value and dropping
the oldest and then re-computing the average
The number of data points included in the
average determines the model’s sensitivity
Fewer data points used-- more responsive
More data points used-- less responsive MA5
MA3
Actual
3-30
Moving Average
Advantages of Moving Average Method
Easily understood
Easily computed
Provides stable forecasts
Disadvantages of Moving Average Method
Requires saving lots of past data points: at least
the N periods used in the moving average
computation
Ignores complex relationships in data
3-31
Weighted Moving Average
The most recent values in a time series are given
more weight in computing a forecast
The choice of weights, w, is somewhat arbitrary
and involves some trial and error
Ft +1 = wt ( At ) + wt −1 ( At −1 ) + ... + wt − n ( At − n )
where
wt = weight for period t ,
wt −1 = weight for period t − 1, etc.
At = the actual value for period t ,
At −1 = the actual value for period t − 1, etc.
3-32
Example 2
3-33
Exponential Smoothing
A weighted averaging method that is based
on the previous forecast plus a percentage of
the forecast error
Ft = Ft −1 + ( At −1 − Ft −1 )
where
Ft = Forecast for period t
Ft −1 = Forecast for the previous period
= Smoothing constant
At −1 = Actual demand or sales from the previous period
3-34
Example 3
3-35
Solution
a) The values are stable (i.e., no trend or cycles).
Therefore, the most recent value of the series becomes
the next forecast: 64
b)
c)
d)
3-36
Linear Trend
A simple data plot can reveal the existence
and nature of a trend
Linear trend equation
Ft = a + bt
where
Ft = Forecast for period t
a = Value of Ft at t = 0
b = Slope of the line
t = Specified number of time periods from t = 0
3-37
Estimating slope and intercept
Slope and intercept can be estimated from historical
data
n ty − t y
b=
n t − ( t )
2 2
a=
y − b t
or y − bt
n
where
n = Number of periods
y = Value of the time series
3-38
Example
Calculate the Linear trend Equation for the
following set of sales data
Week Sales t 2 y ty
t
t y Week Sales
1 150 1 1 150 150
2 157 2 4 157 314
3 162
3 9 162 486
4 166
5 177 4 16 166 664
5 25 177 885
t = 15 t2 = 55 y = 812 ty = 2499
( t) = 225
2
3-39
Linear Trend Calculation
5 (2499) - 15(812) 12495 -12180
b = = = 6.3
5(55) - 225 275 -225
812 - 6.3(15)
a = = 143.5
5
y = 143.5 + 6.3t
3-40
Techniques for Seasonality
Seasonality is expressed in terms of the amount that actual
values deviate from the average value of a series
Models of seasonality
• Additive
Seasonality is expressed as a quantity that gets added or
subtracted from the time-series average in order to incorporate
seasonality
• Multiplicative
Seasonality is expressed as a percentage of the average (or trend)
amount which is then used to multiply the value of a series in
order to incorporate seasonality
Instructor Slides 41
Seasonal Relatives
Seasonal relatives
The seasonal percentage used in the multiplicative
seasonally adjusted forecasting model
To deseasonalize data
Done in order to get a clearer picture of the nonseasonal
components of the data series
Divide each data point by its seasonal relative
To incorporate seasonality in a forecast
Obtain trend estimates for desired periods using a trend
equation
Add seasonality by multiplying these trend estimates by
the corresponding seasonal relative
- Calculate Seasonal Relative
Instructor Slides 42
Incorporating seasonality into forecast
Example:
A furniture manufacturer wants to predict quarterly demand
for certain seats for periods 15 and 16, which happen to be the
second and the third quarters for a particular year. The series
consists of both trend and seasonality. The trend portion of the
demand is projected using the trend equation Ft = 124 + 7.5 t.
Quarter relatives are Q1 = 1.2 , Q2 = 1.1, Q3 = 0.75 and Q4 =
0.95. use this information to predict demand for periods 15 and
16.
Instructor Slides 43
Incorporating seasonality into forecast
Solution
The trend values at t = 15 and t = 16 are:
F15 = 124 + 7.5 (15) = 236.5
F16 = 124 + 7.5 (16) = 244.0
Multiplying the trend value by the appropriate quarter relatives yield a forecast
that includes both trend and seasonality. Given that t = 15 is a second
quarter and t = 16 is a third quarter, the forecast will be:
Period 15: 236.5 (1.1) = 260.15 Period 16: 244.0 (0.75) = 183.00
Instructor Slides 44
Deseasonalize data
Example:
Use the following information to deseasonalize sales
for quarters 1 through 8 given the following quarter
relatives:
Instructor Slides 45
Deseasonalize data
Solution:
Instructor Slides 46
Associative Forecasting Techniques
Associative techniques are based on the
development of an equation that summarizes
the effects of predictor variables
Predictor variables - variables that can be used to
predict values of the variable of interest
House prices may be related to such factors as home and
property size, location, number of bedrooms, and number
of bathrooms
3-47
Associative Forecasting Techniques
Associative models assume that there is a causational
relationship between the variable of interest and
other variables called predictors
Examples:
Price of beef and price of chicken
Crop yields and soil condition
Crop yields and timing of water application
Profits and sales
Price of products and energy cost
3-48
Simple Linear Regression
Regression - a technique for fitting a line to a set of
data points
Simple linear regression - the simplest form of
regression that involves a linear relationship between
two variables
The object of simple linear regression is to obtain an
equation of a straight line that minimizes the sum of
squared vertical deviations from the line (i.e., the least
squares criterion)
3-49
Least Squares Line
minimizes sum of squared deviations around the line
yc = a + bx
where
yc = Predicted (dependent) variable
x = Predictor (independent) variable
b = Slope of the line
a = Value of yc when x = 0 (i.e., the height of the line at the y intercept)
and
n( xy ) − ( x )( y )
b=
( )
n x 2 − ( x )
2
a=
y − b x
or y − b x
n
where
n = Number of paired observatio ns
3-50
Simple Linear Regression
X Y
7 15 Computed
2 10
6 13
relationship
4 15 50
14 25 40
15 27 30
16 24 20
12 20 10
0
14 27 0 5 10 15 20 25
20 44
15 34 A straight line is fitted to a set of sample points.
7 17
3-51
Formulas
n (x.y) - x y
x y
b = (wins) (attendance, 1,000s) xy x2
2 2
n x - ( x) 4
6
36.3
40.1
145.2 16
240.6 36
6 41.2 247.2 36
8 53.0 424.0 64
y - bx 6
7
44.0
45.6
264.0 36
319.2 49
a= 5 39.0 195.0 25
n 7 47.5 332.5 49
49 346.7 2,167.7 311
Yx = a + bx
y =18.46 + 4.06 x
Attendance forecast for x = 7 wins is :
y =18.46 + 4.06(7) = 46.88 or 46,880
3-52
Choosing a Forecasting Technique
Factors to consider
Cost
Accuracy
Availability of historical data
Availability of forecasting software
Time needed to gather and analyze data
and prepare a forecast
Forecast horizon
3-53
Using Forecast Information
Reactive approach
View forecasts as probable future demand
React to meet that demand
Proactive approach
Seeks to actively influence demand
Advertising
Pricing
Product/service modifications
Generally requires either an explanatory model
or a subjective assessment of the influence on
demand
3-54
Operations Strategy
The better forecasts are, the more able
organizations will be to take advantage of future
opportunities and reduce potential risks
A worthwhile strategy is to work to improve short-term
forecasts
Accurate up-to-date information can have a
significant effect on forecast accuracy:
Prices
Demand
Other important variables
Reduce the time horizon forecasts have to cover
Sharing forecasts or demand data through the
supply chain can improve forecast quality
3-55