Forecasting - Lecture
Forecasting - Lecture
Operations Management
Syed Sajjad Ahmed
Head of Supply Planning & Sourcing @ Shell Pakistan
Visiting Faculty - IBA
Chapter 4
Forecasting
Introduction to Forecasting
Forecasting
Process of estimating a future event
Underlying basis of all business
decisions
Production
Inventory
Personnel
Facilities
Applications of Forecasting
Accounting Cost/profit estimates
Medium-range forecast
3 months to 3 years Short-range forecasting
3+ years
New product planning, facility location, research
and development
Types of Forecasts
Economic forecasts
Address business cycle – inflation rate, money
supply, housing starts, etc.
Technological forecasts
Predict rate of technological progress
Impacts development of new products
Demand forecasts
Predict sales of existing products and services
Seven Steps in Forecasting
1 • Determine the use of the forecast
5
• Gather the data
Reliable
Based on Assumptions
Reality
Ideal
Accurate
Written
Accuracy decreases as time
horizon increases
Easy to use
Approaches to Forecast
Qualitative Methods
Used when situation is vague and little data exist; for example
New products, New technology
Quantitative Methods
Used when situation is ‘stable’ and historical data exist; for
example Existing products, Current technology
2. Delphi Method
Delphi method
What consumers say, and what they actually do are often different
2. Moving averages
time-series
models
3. Exponential smoothing
4. Trend projection
associative
5. Linear regression model
Time Series Forecasting
Time Series Forecasting
Set of evenly spaced numerical data
Seasonal Component
Number of
Regular pattern of up and down fluctuations Period Length Seasons
Week Day 7
Month Week 4-4.5
Due to weather, customs, etc. Month Day 28-31
Year Quarter 4
Year Month 12
Occurs within a single year Year Week 52
Time Series Forecasting
Cyclical Component
Repeating up and down movements
Random Component
Erratic, unsystematic, ‘residual’ fluctuations
Ranges from 0 to 1
Subjectively chosen
= A t - Ft
Common Measures of Error
Mean Absolute Deviation (MAD)
∑ |Actual - Forecast|
MAD =
n
n
∑100|Actuali - Forecasti|/Actuali
MAPE = i=1
n
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded = .10 = .10 = .50 = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error
∑ |deviations|
Rounded Absolute Rounded Absolute
MAD = Tonnage
Actual Forecast Deviation Forecast Deviation
n with for with for
Quarter Unloaded = .10 = .10 = .50 = .50
For1 = .10180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3
= 82.45/8
159
= 10.31
174.75 15.75 172.75 13.75
For45 = .50175
190
173.18
173.36
1.82
16.64
165.88
170.44
9.12
19.56
6 =205
98.62/8175.02
= 12.3329.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error
∑ (forecastRounded
errors)2Absolute Rounded Absolute
MSE = Actual Forecast Deviation Forecast Deviation
Tonnage n with for with for
Quarter Unloaded = .10 = .10 = .50 = .50
For1 = .10180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3
= 1,526.54/8
159
= 190.82
174.75 15.75 172.75 13.75
For45 = .50175
190
173.18
173.36
1.82
16.64
165.88
170.44
9.12
19.56
6 = 1,561.91/8
205 = 195.24
175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error
n
∑100|deviation
Rounded i|/actual
Absolutei Rounded Absolute
MAPE = i =Tonnage
1
Actual Forecast
with
Deviation Forecast Deviation
Quarter Unloaded
n
= .10
for
= .10
with
= .50
for
= .50
1 = .10
For 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3
=
159
44.75/8 =
174.75
5.59%
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
For
5
= .50
190 173.36 16.64 170.44 19.56
6 = 54.05/8
205 = 6.76%
175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded = .10 = .10 = .50 = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
MAPE 5.59% 6.76%
Comparison of Forecast Error
0.1 0.2 0.3 0.4 0.5
Actial F Dev. F Dev. F Dev. F Dev. F Dev.
1 180 175 5 175 5 175 5 175 5 175 5
2 168 175.5 7.5 176 8 176.5 8.5 177 9 177.5 9.5
3 159 174.75 15.75 174.4 15.4 173.95 14.95 173.4 14.4 172.75 13.75
4 175 173.18 1.82 171.32 3.68 169.465 5.535 167.64 7.36 165.88 9.12
5 190 173.36 16.64 172.056 17.944 171.1255 18.8745 170.584 19.416 170.44 19.56
6 205 175.05 29.95 175.6448 29.3552 176.7879 28.21215 178.3504 26.6496 180.22 24.78
7 180 178.02 1.98 181.5158 1.51584 185.2515 5.251495 189.0102 9.01024 192.61 12.61
8 182 178.22 3.78 181.2127 0.787328 183.676 1.676047 185.4061 3.406144 186.3 4.3
82.42 81.68237 87.99919 94.24198 98.62
MAD 10.3025 10.2103 10.9999 11.78025 12.3275
MAPE 5.591537 5.545828 5.992131 6.436648 6.755313
Effect of Smoothing Constants
Weight Assigned to
Most 2nd Most 3rd Most 4th Most 5th Most
Recent Recent Recent Recent Recent
Smoothing Period Period Period Period Period
Constant () (1 - ) (1 - ) 2 (1 - ) 3 (1 - )4
Actual = .5
200 – demand
Demand
175 –
= .1
150 – | | | | | | | | |
1 2 3 4 5 6 7 8 9
Quarter
Exponential Smoothing with Trend Adjustment
When a trend is present, exponential
smoothing must be modified
Forecast Exponentially Exponentially
including (FITt) = smoothed (Ft) + smoothed (Tt)
trend forecast trend
Ft = (At - 1) + (1 - )(Ft - 1 + Tt - 1)
Tt = (Ft - Ft - 1) + (1 - )Tt - 1
Step 1: Compute Ft
Step 2: Compute Tt
Step 3: Calculate the forecast FITt = Ft + Tt
Exponential Smoothing with Trend Adjustment
Example
Forecast
Actual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.00
2 17
3 20
4 19
5 24
6 21
7 31
8 28
9 36
10
Exponential Smoothing with Trend Adjustment
Example
Forecast
Actual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.00
2 17
3 20
4 19
5 24 Step 1: Forecast for Month 2
6 21
7 31 F2 = A1 + (1 - )(F1 + T1)
8 28 F2 = (.2)(12) + (1 - .2)(11 + 2)
9 36
10 = 2.4 + 10.4 = 12.8 units
Exponential Smoothing with Trend Adjustment
Example
Forecast
Actual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.00
2 17 12.80
3 20
4 19
5 24 Step 2: Trend for Month 2
6 21
7 31 T2 = (F2 - F1) + (1 - )T1
8 28 T2 = (.4)(12.8 - 11) + (1 - .4)(2)
9 36
10 = .72 + 1.2 = 1.92 units
Exponential Smoothing with Trend Adjustment
Example
Forecast
Actual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.00
2 17 12.80 1.92
3 20
4 19
5 24 Step 3: Calculate FIT for Month 2
6 21
7 31 FIT2 = F2 + T2
8 28 FIT2 = 12.8 + 1.92
9 36
10 = 14.72 units
Exponential Smoothing with Trend Adjustment
Example
Forecast
Actual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.00
2 17 12.80 1.92 14.72
3 20 15.18 2.10 17.28
4 19 17.82 2.32 20.14
5 24 19.91 2.23 22.14
6 21 22.51 2.38 24.89
7 31 24.11 2.07 26.18
8 28 27.14 2.45 29.59
9 36 29.28 2.32 31.60
10 32.48 2.68 35.16
Exponential Smoothing with Trend Adjustment
Example
35 –
25 –
20 –
15 –
0 – | | | | | | | | |
1 2 3 4 5 6 7 8 9
Time (month)
4 - Trend Projections
Fitting a trend line to historical data points to project
into the medium to long-range
Deviation5 Deviation6
Deviation3
Deviation4
Deviation1
(error) Deviation2
Trend line, y^ = a + bx
Time period
Linear Regression Method
Equations to calculate the regression variables
y^ = a + bx
xy - nxy
b=
x2 - nx2
a = y - bx
Linear Regression Method - Example
Time Electrical Power
Year Period (x) Demand x2 xy
2003 1 74 1 74
2004 2 79 4 158
2005 3 80 9 240
2006 4 90 16 360
2007 5 105 25 525
2008 6 142 36 852
2009 7 122 49 854
∑x = 28 ∑y = 692 ∑x2 = 140 ∑xy = 3,063
x=4 y = 98.86
160 –
Trend line,
150 – y^ = 56.70 + 10.54x
140 –
Power demand
130 –
120 –
110 –
100 –
90 –
80 –
70 –
60 –
50 –
| | | | | | | | |
2003 2004 2005 2006 2007 2008 2009 2010 2011
Year
5 - Seasonal Variations In Data
The multiplicative seasonal model can adjust trend
data for seasonal variations in demand
5 - Seasonal Variations In Data
Steps in the process:
1. Find average historical demand for each season
2. Compute the average demand over all seasons
3. Compute a seasonal index for each season
4. Estimate next year’s total demand
5. Divide this estimate of total demand by the number
of seasons, then multiply it by the seasonal index for
that season
5 - Seasonal Variations In Data
San Diego Hospital
Demand Average Average Seasonal
Month 2015 2016 2017 2015-2017 Monthly Index
Jan 80 85 105 90 94
Feb 70 85 85 80 94
Mar 80 93 82 85 94
Apr 90 95 115 100 94
May 113 125 131 123 94
Jun 110 115 120 115 94
Jul 100 102 113 105 94
Aug 88 102 110 100 94
Sept 85 90 95 90 94
Oct 77 78 85 80 94
Nov 75 72 83 80 94
Dec 82 78 80 80 94
5 - Seasonal Variations In Data
San Diego Hospital
Demand Average Average Seasonal
Month 2015 2016 2017 2015-2017 Monthly Index
Jan 80 85 105 90 94 0.957
Feb 70 85 85 80 94
Mar 80 93 Average
82 85 monthly 94
2015-2017 demand
Seasonal90index95= 115
Apr 100 94
Average monthly demand
May 113 125 131 123 94
= 90/94 = .957
Jun 110 115 120 115 94
Jul 100 102 113 105 94
Aug 88 102 110 100 94
Sept 85 90 95 90 94
Oct 77 78 85 80 94
Nov 75 72 83 80 94
Dec 82 78 80 80 94
5 - Seasonal Variations In Data
San Diego Hospital
Demand Average Average Seasonal
Month 2015 2016 2017 2015-2017 Monthly Index
Jan 80 85 105 90 94 0.957
Feb 70 85 85 80 94 0.851
Mar 80 93 82 85 94 0.904
Apr 90 95 115 100 94 1.064
May 113 125 131 123 94 1.309
Jun 110 115 120 115 94 1.223
Jul 100 102 113 105 94 1.117
Aug 88 102 110 100 94 1.064
Sept 85 90 95 90 94 0.957
Oct 77 78 85 80 94 0.851
Nov 75 72 83 80 94 0.851
Dec 82 78 80 80 94 0.851
5 - Seasonal Variations In Data
San Diego Hospital
Demand Average Average Seasonal
Month 2015 2016 2017 2015-2017 Monthly Index
Jan 80 85 105 90 94 0.957
Feb 70 85 85 80 94 0.851
Forecast for 2018
Mar 80 93 82 85 94 0.904
Apr 90 95 annual
Expected 115 100 = 1,20094
demand 1.064
May 113 125 131 123 94 1.309
Jun 110 115 120 1,200 115 94 1.223
Jul 100 Jan
102 113 x .957
105 = 96 94 1.117
12
Aug 88 102 110 100 94 1.064
Sept 85 90 1,200
95 90 94 0.957
Feb x .851 = 85
Oct 77 78 8512 80 94 0.851
Nov 75 72 83 80 94 0.851
Dec 82 78 80 80 94 0.851
5 - Seasonal Variations In Data
2018 Forecast
140 – San Diego Hospital 2017 Demand
130 – 2016 Demand
2015 Demand
120 –
Demand
110 –
100 –
90 –
80 –
70 –
| | | | | | | | | | | |
J F M A M J J A S O N D
Time
Associative Forecasting
Associative Forecasting
Forecasting an outcome based on predictor
variables using the least squares technique
Sales 2.0 –
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll
Associative Forecasting - Example
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
Associative Forecasting - Example
^
y = 1.75 + .25x Sales = 1.75 + .25(payroll)
Sales
Sales = 1.75 + .25(6)
2.0 –
Sales = $3,250,000
1.0 –
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll
Monitoring and Controlling Forecasts
Tracking
Measures how well the forecast is predicting actual
values
Ratio of running sum of forecast errors (RSFE) to
mean absolute deviation (MAD)
Good tracking signal has low values
If forecasts are continually high or low, the forecast
has a bias error
Monitoring and Controlling Forecasts
Tracking RSFE
signal =
MAD
∑(Actual demand in
period i -
Forecast demand
Tracking in period i)
signal =∑|Actual - Forecast|/n)
Tracking Signal
0 MADs Acceptabl
e range
–
Lower control limit
Time
Tracking Signal - Example
Cumulative
Absolute Absolute
Actual Forecast Forecast Forecast
Qtr Demand Demand Error RSFE Error Error MAD
(AD) (FD) (AD-FD) |RSFE| (CAFÉ) CAFÉ/Qtr