Lecture 18
Forecasting (Continued)
Books• Introduction to Materials Management, Sixth Edition, J. R. Tony Arnold, P.E., CFPIM, CIRM, Fleming
College, Emeritus, Stephen N. Chapman, Ph.D., CFPIM, North Carolina State University, Lloyd M. Clive, P.E., CFPIM, Fleming College
• Operations Management for Competitive Advantage, 11th Edition, by Chase, Jacobs, and Aquilano, 2005, N.Y.: McGraw-Hill/Irwin.
• Operations Management, 11/E, Jay Heizer, Texas Lutheran University, Barry Render, Graduate School of Business, Rollins College, Prentice Hall
Objectives
When you complete this chapter you should be able to :
Compute three measures of forecast accuracy
Develop seasonal indexes Conduct a regression and correlation
analysis Use a tracking signal
Common Measures of Error
Mean Absolute Deviation (MAD)
MAD =∑ |Actual - Forecast|
n
Mean Squared Error (MSE)
MSE =∑ (Forecast Errors)2
n
Common Measures of Error
Mean Absolute Percent Error (MAPE)
MAPE =∑100|Actuali - Forecasti|/Actuali
n
n
i = 1
Comparison of Forecast Error
Rounded Absolute Rounded AbsoluteActual Forecast Deviation Forecast Deviation
Tonnage with for with forQuarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.002 168 175.5 7.50 177.50 9.503 159 174.75 15.75 172.75 13.754 175 173.18 1.82 165.88 9.125 190 173.36 16.64 170.44 19.566 205 175.02 29.98 180.22 24.787 180 178.02 1.98 192.61 12.618 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error
Rounded Absolute Rounded AbsoluteActual Forecast Deviation Forecast Deviation
Tonnage with for with forQuarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.002 168 175.5 7.50 177.50 9.503 159 174.75 15.75 172.75 13.754 175 173.18 1.82 165.88 9.125 190 173.36 16.64 170.44 19.566 205 175.02 29.98 180.22 24.787 180 178.02 1.98 192.61 12.618 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD =∑ |deviations|
n
= 82.45/8 = 10.31For a = .10
= 98.62/8 = 12.33For a = .50
Comparison of Forecast Error
Rounded Absolute Rounded AbsoluteActual Forecast Deviation Forecast Deviation
Tonnage with for with forQuarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.002 168 175.5 7.50 177.50 9.503 159 174.75 15.75 172.75 13.754 175 173.18 1.82 165.88 9.125 190 173.36 16.64 170.44 19.566 205 175.02 29.98 180.22 24.787 180 178.02 1.98 192.61 12.618 182 178.22 3.78 186.30 4.30
82.45 98.62MAD 10.31 12.33
= 1,526.54/8 = 190.82For a = .10
= 1,561.91/8 = 195.24For a = .50
MSE =∑ (forecast errors)2
n
Comparison of Forecast Error
Rounded Absolute Rounded AbsoluteActual Forecast Deviation Forecast Deviation
Tonnage with for with forQuarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.002 168 175.5 7.50 177.50 9.503 159 174.75 15.75 172.75 13.754 175 173.18 1.82 165.88 9.125 190 173.36 16.64 170.44 19.566 205 175.02 29.98 180.22 24.787 180 178.02 1.98 192.61 12.618 182 178.22 3.78 186.30 4.30
82.45 98.62MAD 10.31 12.33MSE 190.82 195.24
= 44.75/8 = 5.59%For a = .10
= 54.05/8 = 6.76%For a = .50
MAPE =∑100|deviationi|/actuali
n
n
i = 1
Comparison of Forecast Error
Rounded Absolute Rounded AbsoluteActual Forecast Deviation Forecast Deviation
Tonnage with for with forQuarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.002 168 175.5 7.50 177.50 9.503 159 174.75 15.75 172.75 13.754 175 173.18 1.82 165.88 9.125 190 173.36 16.64 170.44 19.566 205 175.02 29.98 180.22 24.787 180 178.02 1.98 192.61 12.618 182 178.22 3.78 186.30 4.30
82.45 98.62MAD 10.31 12.33MSE 190.82 195.24MAPE 5.59% 6.76%
Exponential Smoothing with Trend Adjustment
When a trend is present, exponential smoothing must be modified
Forecast including (FITt) = trend
Exponentially Exponentiallysmoothed (Ft) + (Tt) smoothedforecast trend
Exponential Smoothing with Trend Adjustment
Ft = a(At - 1) + (1 - a)(Ft - 1 + Tt - 1)
Tt = b(Ft - Ft - 1) + (1 - b)Tt - 1
Step 1: Compute Ft
Step 2: Compute Tt
Step 3: Calculate the forecast FITt = Ft + Tt
Exponential Smoothing with Trend Adjustment Example
ForecastActual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.002 173 204 195 246 217 318 289 36
10
Exponential Smoothing with Trend Adjustment Example
ForecastActual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.002 173 204 195 246 217 318 289 36
10
F2 = aA1 + (1 - a)(F1 + T1)
F2 = (.2)(12) + (1 - .2)(11 + 2)
= 2.4 + 10.4 = 12.8 units
Step 1: Forecast for Month 2
Exponential Smoothing with Trend Adjustment Example
ForecastActual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.002 17 12.803 204 195 246 217 318 289 36
10
T2 = b(F2 - F1) + (1 - b)T1
T2 = (.4)(12.8 - 11) + (1 - .4)(2)
= .72 + 1.2 = 1.92 units
Step 2: Trend for Month 2
Exponential Smoothing with Trend Adjustment Example
ForecastActual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.002 17 12.80 1.923 204 195 246 217 318 289 36
10
FIT2 = F2 + T1
FIT2 = 12.8 + 1.92
= 14.72 units
Step 3: Calculate FIT for Month 2
Exponential Smoothing with Trend Adjustment Example
ForecastActual Smoothed Smoothed Including
Month(t) Demand (At) Forecast, Ft Trend, Tt Trend, FITt
1 12 11 2 13.002 17 12.80 1.92 14.723 204 195 246 217 318 289 36
10
15.18 2.10 17.2817.82 2.32 20.1419.91 2.23 22.1422.51 2.38 24.8924.11 2.07 26.1827.14 2.45 29.5929.28 2.32 31.6032.48 2.68 35.16
Exponential Smoothing with Trend Adjustment Example
| | | | | | | | |1 2 3 4 5 6 7 8 9
Time (month)
Prod
uct d
eman
d
35 –
30 –
25 –
20 –
15 –
10 –
5 –
0 –
Actual demand (At)
Forecast including trend (FITt)with a = .2 and b = .4
Trend Projections
Fitting a trend line to historical data points to project into the medium to long-range
Linear trends can be found using the least squares technique
y = a + bx^
where y = computed value of the variable to be predicted (dependent variable)a = y-axis interceptb = slope of the regression linex = the independent variable
^
Least Squares Method
Time period
Valu
es o
f Dep
ende
nt V
aria
ble
Deviation1
(error)
Deviation5
Deviation7
Deviation2
Deviation6
Deviation4
Deviation3
Actual observation (y value)
Trend line, y = a + bx^
Least Squares Method
Time period
Valu
es o
f Dep
ende
nt V
aria
ble
Deviation1
Deviation5
Deviation7
Deviation2
Deviation6
Deviation4
Deviation3
Actual observation (y value)
Trend line, y = a + bx^
Least squares method minimizes the sum of the squared errors
(deviations)
Least Squares Method
Equations to calculate the regression variables
b = Sxy - nxySx2 - nx2
y = a + bx^
a = y - bx
Least Squares Example
b = = = 10.54∑xy - nxy∑x2 - nx2
3,063 - (7)(4)(98.86)140 - (7)(42)
a = y - bx = 98.86 - 10.54(4) = 56.70
Time Electrical Power Year Period (x) Demand x2 xy
2001 1 74 1 742002 2 79 4 1582003 3 80 9 2402004 4 90 16 3602005 5 105 25 5252005 6 142 36 8522007 7 122 49 854
∑x = 28 ∑y = 692 ∑x2 = 140 ∑xy = 3,063x = 4 y = 98.86
Least Squares Example
b = = = 10.54Sxy - nxySx2 - nx2
3,063 - (7)(4)(98.86)140 - (7)(42)
a = y - bx = 98.86 - 10.54(4) = 56.70
Time Electrical Power Year Period (x) Demand x2 xy
1999 1 74 1 742000 2 79 4 1582001 3 80 9 2402002 4 90 16 3602003 5 105 25 5252004 6 142 36 8522005 7 122 49 854
Sx = 28 Sy = 692 Sx2 = 140 Sxy = 3,063x = 4 y = 98.86
The trend line is
y = 56.70 + 10.54x^
Least Squares Example
| | | | | | | | |2001 2002 2003 2004 2005 2006 2007 2008 2009
160 –150 –140 –130 –120 –110 –100 –
90 –80 –70 –60 –50 –
Year
Pow
er d
eman
d
Trend line,y = 56.70 + 10.54x^
Seasonal Variations In Data
The multiplicative seasonal model can adjust trend data for seasonal variations in demand
Seasonal Variations In Data
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 demand5. Divide this estimate of total demand by the
number of seasons, then multiply it by the seasonal index for that season
Steps in the process:
Seasonal Index Example
Jan 80 85 105 90 94Feb 70 85 85 80 94Mar 80 93 82 85 94Apr 90 95 115 100 94May 113 125 131 123 94Jun 110 115 120 115 94Jul 100 102 113 105 94Aug 88 102 110 100 94Sept 85 90 95 90 94Oct 77 78 85 80 94Nov 75 72 83 80 94Dec 82 78 80 80 94
Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index
Seasonal Index Example
Jan 80 85 105 90 94Feb 70 85 85 80 94Mar 80 93 82 85 94Apr 90 95 115 100 94May 113 125 131 123 94Jun 110 115 120 115 94Jul 100 102 113 105 94Aug 88 102 110 100 94Sept 85 90 95 90 94Oct 77 78 85 80 94Nov 75 72 83 80 94Dec 82 78 80 80 94
Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index
0.957
Seasonal index = average 2005-2007 monthly demand
average monthly demand
= 90/94 = .957
Seasonal Index Example
Jan 80 85 105 90 94 0.957Feb 70 85 85 80 94 0.851Mar 80 93 82 85 94 0.904Apr 90 95 115 100 94 1.064May 113 125 131 123 94 1.309Jun 110 115 120 115 94 1.223Jul 100 102 113 105 94 1.117Aug 88 102 110 100 94 1.064Sept 85 90 95 90 94 0.957Oct 77 78 85 80 94 0.851Nov 75 72 83 80 94 0.851Dec 82 78 80 80 94 0.851
Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index
Seasonal Index Example
Jan 80 85 105 90 94 0.957Feb 70 85 85 80 94 0.851Mar 80 93 82 85 94 0.904Apr 90 95 115 100 94 1.064May 113 125 131 123 94 1.309Jun 110 115 120 115 94 1.223Jul 100 102 113 105 94 1.117Aug 88 102 110 100 94 1.064Sept 85 90 95 90 94 0.957Oct 77 78 85 80 94 0.851Nov 75 72 83 80 94 0.851Dec 82 78 80 80 94 0.851
Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index
Expected annual demand = 1,200
Jan x .957 = 961,200
12
Feb x .851 = 851,200
12
Forecast for 2008
Seasonal Index Example
140 –
130 –
120 –
110 –
100 –
90 –
80 –
70 –| | | | | | | | | | | |J F M A M J J A S O N D
Time
Dem
and
2008 Forecast2007 Demand 2006 Demand2005 Demand
San Diego Hospital
10,200 –
10,000 –
9,800 –
9,600 –
9,400 –
9,200 –
9,000 –| | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec67 68 69 70 71 72 73 74 75 76 77 78
Month
Inpa
tient
Day
s
9530
9551
9573
9594
9616
9637
9659
9680
9702
9724
9745
9766
Trend Data
San Diego Hospital
1.06 –
1.04 –
1.02 –
1.00 –
0.98 –
0.96 –
0.94 –
0.92 – | | | | | | | | | | | |Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec67 68 69 70 71 72 73 74 75 76 77 78
Month
Inde
x fo
r Inp
atie
nt D
ays 1.04
1.021.01
0.99
1.031.04
1.00
0.98
0.97
0.99
0.970.96
Seasonal Indices
San Diego Hospital
10,200 –
10,000 –
9,800 –
9,600 –
9,400 –
9,200 –
9,000 –| | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec67 68 69 70 71 72 73 74 75 76 77 78
Month
Inpa
tient
Day
s
9911
9265
9764
9520
9691
9411
9949
9724
9542
9355
10068
9572
Combined Trend and Seasonal Forecast
Associative Forecasting
Used when changes in one or more independent variables can be used to predict the changes in the
dependent variable
Most common technique is linear regression analysis
We apply this technique just as we did in the time series example
Associative Forecasting
Forecasting an outcome based on predictor variables using the least squares technique
y = a + bx^
where y = computed value of the variable to be predicted (dependent variable)a = y-axis interceptb = slope of the regression linex = the independent variable though to predict the value of the dependent variable
^
Associative Forecasting Example
Sales Local Payroll($ millions), y ($ billions), x
2.0 13.0 32.5 42.0 22.0 13.5 7
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |0 1 2 3 4 5 6 7
Sale
s
Area payroll
Associative Forecasting Example
Sales, y Payroll, x x2 xy
2.0 1 1 2.03.0 3 9 9.02.5 4 16 10.02.0 2 4 4.02.0 1 1 2.03.5 7 49 24.5
∑y = 15.0 ∑x = 18 ∑x2 = 80 ∑xy = 51.5
x = ∑x/6 = 18/6 = 3
y = ∑y/6 = 15/6 = 2.5
b = = = .25∑xy - nxy∑x2 - nx2
51.5 - (6)(3)(2.5)80 - (6)(32)
a = y - bx = 2.5 - (.25)(3) = 1.75
Associative Forecasting Example
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |0 1 2 3 4 5 6 7
Sale
s
Area payroll
y = 1.75 + .25x^ Sales = 1.75 + .25(payroll)
If payroll next year is estimated to be $6 billion, then:
Sales = 1.75 + .25(6)Sales = $3,250,000
3.25
Standard Error of the Estimate
A forecast is just a point estimate of a future value
This point is actually the mean of a probability distribution
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |0 1 2 3 4 5 6 7
Sale
s
Area payroll
3.25
Standard Error of the Estimate
where y = y-value of each data pointyc = computed value of the dependent variable, from the regression equationn = number of data points
Sy,x =∑(y - yc)2
n - 2
Standard Error of the Estimate
Computationally, this equation is considerably easier to use
We use the standard error to set up prediction intervals around the point
estimate
Sy,x =∑y2 - a∑y - b∑xy
n - 2
Standard Error of the Estimate
4.0 –
3.0 –
2.0 –
1.0 –
| | | | | | |0 1 2 3 4 5 6 7
Sale
s
Area payroll
3.25
Sy,x = =∑y2 - a∑y - b∑xyn - 2
39.5 - 1.75(15) - .25(51.5)6 - 2
Sy,x = .306
The standard error of the estimate is $306,000 in sales
How strong is the linear relationship between the variables?
Correlation does not necessarily imply causality! Coefficient of correlation, r, measures degree of
association Values range from -1 to +1
Correlation
Correlation Coefficient
r = nSxy - SxSy
[nSx2 - (Sx)2][nSy2 - (Sy)2]
Correlation Coefficient
r = nSxy - SxSy
[nSx2 - (Sx)2][nSy2 - (Sy)2]
y
x(a) Perfect positive correlation: r = +1
y
x(b) Positive correlation: 0 < r < 1
y
x(c) No correlation: r = 0
y
x(d) Perfect negative correlation: r = -1
Coefficient of Determination, r2, measures the percent of change in y predicted by the change in x Values range from 0 to 1 Easy to interpret
Correlation
For the Nodel Construction example:r = .901r2 = .81
Multiple Regression Analysis
If more than one independent variable is to be used in the model, linear regression can be extended to
multiple regression to accommodate several independent variables
y = a + b1x1 + b2x2 …^
Computationally, this is quite complex and generally done on the computer
Multiple Regression Analysis
y = 1.80 + .30x1 - 5.0x2^
In the Nodel example, including interest rates in the model gives the new equation:
An improved correlation coefficient of r = .96 means this model does a better job of predicting the change in construction sales
Sales = 1.80 + .30(6) - 5.0(.12) = 3.00Sales = $3,000,000
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 Signal
Monitoring and Controlling Forecasts
Tracking signal
RSFEMAD=
Tracking signal =
∑(Actual demand in period i -
Forecast demand in period i)
(∑|Actual - Forecast|/n)
Tracking Signal
Tracking signal
+
0 MADs
–
Upper control limit
Lower control limit
Time
Signal exceeding limit
Acceptable range
Tracking Signal Example
CumulativeAbsolute Absolute
Actual Forecast Forecast ForecastQtr Demand Demand Error RSFE Error Error MAD
1 90 100 -10 -10 10 10 10.02 95 100 -5 -15 5 15 7.53 115 100 +15 0 15 30 10.04 100 110 -10 -10 10 40 10.05 125 110 +15 +5 15 55 11.06 140 110 +30 +35 30 85 14.2
CumulativeAbsolute Absolute
Actual Forecast Forecast ForecastQtr Demand Demand Error RSFE Error Error MAD
1 90 100 -10 -10 10 10 10.02 95 100 -5 -15 5 15 7.53 115 100 +15 0 15 30 10.04 100 110 -10 -10 10 40 10.05 125 110 +15 +5 15 55 11.06 140 110 +30 +35 30 85 14.2
Tracking Signal Example
TrackingSignal
(RSFE/MAD)
-10/10 = -1-15/7.5 = -2
0/10 = 0-10/10 = -1
+5/11 = +0.5+35/14.2 = +2.5
The variation of the tracking signal between -2.0 and +2.5 is within acceptable limits
Adaptive Forecasting
It’s possible to use the computer to continually monitor forecast error and adjust the values of the a and b coefficients used in exponential smoothing to continually minimize forecast errorThis technique is called adaptive smoothing
Focus Forecasting
Developed at American Hardware Supply, focus forecasting is based on two principles:
1. Sophisticated forecasting models are not always better than simple ones
2. There is no single technique that should be used for all products or services
This approach uses historical data to test multiple forecasting models for individual itemsThe forecasting model with the lowest error is then used to forecast the next demand
Forecasting in the Service Sector
Presents unusual challenges Special need for short term records Needs differ greatly as function of industry
and product Holidays and other calendar events Unusual events
Fast Food Restaurant Forecast
20% –
15% –
10% –
5% –
11-12 1-2 3-4 5-6 7-8 9-1012-1 2-3 4-5 6-7 8-9 10-11
(Lunchtime) (Dinnertime)Hour of day
Perc
enta
ge o
f sal
es
FedEx Call Center Forecast
12% –
10% –
8% –
6% –
4% –
2% –
0% –
Hour of dayA.M. P.M.
2 4 6 8 10 12 2 4 6 8 10 12
Measuring Forecast Errors
• Mean Absolute Deviation (MAD) The sum of the absolute value of the individual forecast errors divided by the number of periods
Bias
• Bias exists when the cumulative actual demand varies from the cumulative forecast.
Seasonal Index
Seasonal Index = period average demandavg. demand for all periods
End of Lecture 18