Upload
lambert-stephens
View
226
Download
3
Embed Size (px)
Citation preview
4-1
Operations Operations ManagementManagement
ForecastingForecastingChapter 4 - Part 2Chapter 4 - Part 2
4-2
Trend is increasing or decreasing pattern.
First, plot data to verify trend.
If trend exists, then moving averages and exponential smoothing will always lag.
Forecasting a TrendForecasting a Trend
4-3
Plot DataPlot Data
Period
Actual
4 532 1 6
8
4
12
16
20
4-4
MA = 3 period Moving Average
Moving Averages for a TrendMoving Averages for a Trend
Period MA
1 8 2 11 3 13 4 15 10.67 4.33 5 19 13.00 6.00
MAError
6 15.67 ?
Sales
4-5
Trend Graph – Moving AverageTrend Graph – Moving Average
Period
Actual
MA Forecast
4 532 1 6
8
4
12
16
20
4-6
ES = Exponential Smoothing with =0.5 (F2=11)
Exponential Smoothing for a Exponential Smoothing for a TrendTrend
?
Period ES
1 8 2 11 3 13 11 4 15 12 3.0 5 19 13.5 5.5
ESError
6
11
16.25
Sales
4-7
Trend Graph – Exponential Trend Graph – Exponential Smoothing and Moving AverageSmoothing and Moving Average
Period
Actual
MA Forecast
4 532 1 6
8
4
12
16
20ES Forecast
4-8
Moving Averages and (simple) Exponential Smoothing are always poor.
For a linear trend can use: Exponential Smoothing with Trend Adjustment
(pp. 115-117). Linear Trend Projection (linear regression).
For non-linear trend can use: Non-linear regression techniques.
Forecasting a TrendForecasting a Trend
4-9
Used for forecasting linear trend line.
PLOT TO VERIFY LINEAR RELATIONSHIP
Assumes linear relationship between response variable, Y, and time, X.
Y = a + bX
a = y-axis intercept; b = slope
Estimated by least squares method.
Minimizes sum of squared errors.
Linear Trend ProjectionLinear Trend Projection
4-10
Plot of X,Y DataPlot of X,Y Data
Time (x)
Valu
es o
f Dep
ende
nt V
aria
ble
(Y)
Actual observation
4-11
Least SquaresLeast Squares
Deviation
Deviation
Deviation
Deviation
Deviation
Deviation
Deviation
Time (x)
Valu
es o
f Dep
ende
nt V
aria
ble
(Y)
bxaY ˆ
Actual observation
Point on regression line
4-12
Least SquaresLeast Squares
Least squares line minimizes sum of squared deviations. This reduces large errors. Similar to MSE.
Deviations around least squares line are assumed to be random.
4-13
Least Squares EquationsLeast Squares Equations
Equation: y = a + bx
Slope (p. 119):
xnx
yxnyxb
i
n
i
ii
n
i
Y-Intercept: xbya
4-14
Linear Trend Projection ExampleLinear Trend Projection Example
5
Period
(x) 1 8 2 11 3 13 4 15
19
Sales(y)
Given the sales for last 5 periods, forecast future sales using trend projection.
4-15
Linear Trend Projection ExampleLinear Trend Projection Example
5
4.55
156.2
5
666.2
3555
2.13352242
ab
Period
(x) 1 8 2 11 3 13 4 15
19
Sales(y) xy
6095
8 22 39
xy=224
x2
9 16 25
4 1
x2=55x=3 y=13.2
4-16
TP = Trend Projection: Y = 5.4 + 2.6x
Linear Trend Projection ExampleLinear Trend Projection ExamplePeriod
(x) MA ES
1 2 3 4 5
811131519
MAErr.
6
10.6713.0015.67
11 12
13.5
11
16.25
4.336.00
Sales(y)
3.05.5
ESErr.
TPErr.TP
21.018.415.8 -0.8
0.6
Small errors!
4-17
Trend GraphTrend Graph
MA Forecast
ES Forecast
Period
Actual
4 532 1 6
8
4
12
16
20
TP Forecast
4-18
Models with SeasonalityModels with Seasonality
Use if data exhibits seasonal patterns.
Daily, weekly, monthly, yearly.
Compute seasonal component.
Remove seasonality and forecast.
Factor in seasonal component.
See pages 120-124.
4-19
Identify Independent and Dependent variables. Dependent variable (y): Entity to be forecast (demand). Independent variable (x): Used to predict (or explain)
dependent variable. Determine relationship.
Plot data. Consider time lags.
Calculate parameters. Forecast. Monitor.
Associative Forecasting Methods Associative Forecasting Methods
4-20
Linear relationship between dependent & explanatory variables. Example: Sales in month i (Yi ) depends on advertising
in month i (Xi ) (eg. number of ads)
Sales may also depend on advertising in previous months!
Independent variable (number of ads).
Y Xi i= +a b
Dependent variable (sales).
Linear RegressionLinear Regression
4-21
Least SquaresLeast Squares
Deviation
Deviation
Deviation
Deviation
Deviation
Deviation
Deviation
Values of Independent Variable (x)
Valu
es o
f Dep
ende
nt V
aria
ble
(Y)
bxaY ˆ
Actual observation
Point on regression line
4-22
Linear Regression EquationsLinear Regression Equations(same as before)(same as before)
Equation: ii bxaY
Slope:
xnx
yxnyxb
i
n
i
ii
n
i
Y-Intercept: xbya
4-23
Slope (b): Y changes by b units for each 1 unit increase in X. If b = +2, then sales (Y) is forecast to increase by 2
for each 1 unit increase in advertising (X).
Y-intercept (a): Average value of Y when X = 0. If a = 4, then average sales (Y) is expected to be 4
when advertising (X) is 0.
Interpretation of CoefficientsInterpretation of Coefficients
4-24
Least SquaresLeast Squares Plot data to verify linearity!
If curve is present, use non-linear regression.
Forecast only in (or near) range of observed values!
May need future values of independent variable to make forecast. Example: Summer hotel demand may depend on
summer gasoline price.
4-25
Monthly Sales vs. Number of AdsMonthly Sales vs. Number of Ads
Number of TV ads per month
Sale
s
0
4-26
Least Squares LineLeast Squares Line
Number of TV ads per month
Sale
s
bxaY ˆ0
What is sales forecast for small number of ads?
4-27
Forecasting Outside Range of Forecasting Outside Range of Observed Values is UnreliableObserved Values is Unreliable
Number of TV ads per month
Sale
s
bxaY ˆ0
Forecast is for negative sales!
4-28
Answers: ‘How strong is the linear relationship between the variables?’
Coefficient of correlation - r Measures degree of association; ranges from -1 to +1
Coefficient of determination - r2
Amount of variation explained by regression equation
CorrelationCorrelation
4-29
Sample Coefficient of CorrelationSample Coefficient of Correlation
n
i
n
iii
n
i
n
iii
n
i
n
i
n
iiiii
yynxxn
yxyxnr
4-30
r = +1 r = -1
r = .89 r = 0
Y
X
Y
X
Y
XX
Coefficient of CorrelationCoefficient of Correlation
Y
4-31
A good forecast has: No pattern or direction in forecast error.
Error = Actual - Forecast
A small forecast error. Mean square error (MSE). Mean absolute deviation (MAD). Mean absolute percentage error (MAPE).
Guidelines for Selecting Guidelines for Selecting Forecasting ModelForecasting Model
4-32
Time
Error
0
Desired Pattern
Time
Error
0
Trend Not Fully Accounted for
Pattern of Forecast ErrorPattern of Forecast Error
4-33
Suppose you have forecast sales with a linear regression model & exponential smoothing. Which model do you use?
Linear Regression Exponential Actual Model Smoothing
Year Sales Forecast Forecast (.9)1 1 0.6 1.002 1 1.3 1.003 2 2.0 1.004 2 2.7 1.905 4 3.4 1.99
Selecting Forecasting Model Selecting Forecasting Model ExampleExample
4-34
MSE = Σ Error2 / n = 1.10 / 5 = 0.220MAD = Σ |Error| / n = 2.0 / 5 = 0.400MAPE = Σ[|Error|/Actual]/n = 1.2/5 = 0.24 = 24%
Linear Regression ModelLinear Regression Model
1.10
Year Actual F’cast
1 1 0.6 0.4 0.16 0.4 2 1 1.3 -0.3 0.09 0.3 3 2 2.0 0.0 0.00 0.0 4 2 2.7 -0.7 0.49 0.7 5 4 3.4 0.6 0.36 0.6Total 0.0 2.0
Error Error2 |Error|
4-35
1.99
MSE = Σ Error2 / n = 5.05 / 5 = 1.01
MAD = Σ |Error| / n = 3.11 / 5 = 0.622
MAPE = Σ[|Error|/Actual]/n = 1.0525/5 = 0.2105 = 21%
Exponential Smoothing ModelExponential Smoothing Model
Year Y i F’cast
1 1 1.00 0.0 0.00 0.0 2 1 1.00 0.0 0.00 0.0 3 2 1.00 1.0 1.00 1.0 4 2 1.90 0.1 0.01 0.1 5 4 2.01 4.04 2.01Total 0.3 5.05 3.11
Error Error2 |Error|
4-36
Which is Better???Which is Better???
Linear Regression Model:MSE = Σ Error2 / n = 1.10 / 5 = 0.220MAD = Σ |Error| / n = 2.0 / 5 = 0.400MAPE = Σ[|Error|/Actual]/n = 1.2/5 = 0.24 = 24%
Exponential Smoothing Model:MSE = Σ Error2 / n = 5.05 / 5 = 1.01MAD = Σ |Error| / n = 3.11 / 5 = 0.622MAPE = Σ[|Error|/Actual]/n = 1.0525/5 = 0.2105 = 21%
4-37
Measures how well the forecast is predicting actual values.
To use: Calculate tracking signal each time period.
Ratio of running sum of forecast errors (RSFE) to mean absolute deviation (MAD).
Plot tracking signal on graph. Signal should be within upper and lower control
limits based on MAD.
Tracking SignalTracking Signal
4-38
Plot of a Tracking SignalPlot of a Tracking Signal
Time
Lower control limit
Upper control limit
Signal exceeded limit
Tracking signal
Acceptable rangeMAD
+
0
-
4-39
Tracking Signal EquationTracking Signal Equation
MAD
error
MAD
yy
MAD
RSFETS
n
iii
1
ˆ
)(
4-40
Based on Normal Distribution of forecast errors: 1 MAD = approximately 0.8 standard deviations. Limits at ±3 MAD (±2.4 std. dev.) mean that 98% of
values should be within limits. Limits at ±4 MAD (±3.2 std. dev.) mean that 99.9% of
values should be within limits.
Use smaller limits to better control important items. (For example: ±2 MAD)
Patterns, even if within limits, indicate better forecasts can be made.
Tracking Signal LimitsTracking Signal Limits
4-41
Tracking Signal - Month 1Tracking Signal - Month 1
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
CumCum|Error||Error|
4-42
Tracking Signal - Month 1Tracking Signal - Month 1
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090 -10-10 -10-10
CumCum|Error||Error|
RSFE = Errors = -10RSFE = Errors = -10
Error = Actual - Forecast = 90 - 100 = -10
Error = Actual - Forecast = 90 - 100 = -10
4-43
Tracking Signal - Month 1Tracking Signal - Month 1
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090 -10-10 -10-10 1010
CumCum|Error||Error|
Cum |Error| = |Errors| = 10
Cum |Error| = |Errors| = 10
4-44
Tracking Signal - Month 1Tracking Signal - Month 1
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090 -10-10 -10-10 1010 10.010.0
CumCum|Error||Error|
MAD = |Errors|/n = 10/1 = 10
MAD = |Errors|/n = 10/1 = 10
4-45
Tracking Signal - Month 1Tracking Signal - Month 1
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090 -10-10 -10-10 1010 10.010.0 -1-1
CumCum|Error||Error|
TS = RSFE/MAD = -10/10 = -1
TS = RSFE/MAD = -10/10 = -1
4-46
Tracking Signal - Month 2Tracking Signal - Month 2
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 99 99 9494
-10-10 -10-10 1010 10.010.0 -1-1
CumCum|Error||Error|
4-47
Tracking Signal - Month 2Tracking Signal - Month 2
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 9999 9494
-10-10 -10-10 1010 10.010.0 -1-1
-5-5
CumCum|Error||Error|
Error = Actual - Forecast = 94 - 99 = -5
Error = Actual - Forecast = 94 - 99 = -5
4-48
Tracking Signal - Month 2Tracking Signal - Month 2
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 9999 9494
-10-10 -10-10 1010 10.010.0 -1-1
-5-5 -15-15
CumCum|Error||Error|
RSFE = Errors = (-10) + (-5) = -15
RSFE = Errors = (-10) + (-5) = -15
4-49
Tracking Signal - Month 2Tracking Signal - Month 2
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 9999 9494
-10-10 -10-10 1010 10.010.0 -1-1
-5-5 -15-15 1515
CumCum|Error||Error|
Cum Error = |Errors| = 10 + 5 = 15
Cum Error = |Errors| = 10 + 5 = 15
4-50
Tracking Signal - Month 2Tracking Signal - Month 2
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 9999 9494
-10-10 -10-10 1010 10.010.0 -1-1
-5-5 -15-15 1515 7.57.5
CumCum|Error||Error|
MAD = |Errors|/n = 15/2 = 7.5
MAD = |Errors|/n = 15/2 = 7.5
4-51
Tracking Signal - Month 2Tracking Signal - Month 2
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 9999 9494
-10-10 -10-10 1010 10.010.0 -1-1
-5-5 -15-15 1515 7.57.5 -2-2
CumCum|Error||Error|
TS = RSFE/MAD = -15/7.5 = -2
TS = RSFE/MAD = -15/7.5 = -2
4-52
Tracking Signal - Month 3Tracking Signal - Month 3
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 9999 9494
33 9898 113113
-10-10 -10-10 1010 10.010.0 -1-1
-5-5 -15-15 1515 7.57.5 -2-2
1515 00 3300
1100
00
CumCum|Error||Error|
4-53
Tracking Signal - Months 4-6Tracking Signal - Months 4-6
MoMo F’cstF’cst ActAct ErrorError RSFERSFE MADMAD TSTS
11 100100 9090
22 9999 9494
33 9898 113113
44 105105 9595
55 104104 119119
66 110110 140140
-10-10 -10-10 1010 10.010.0 -1-1
-5-5 -15-15 1515 7.57.5 -2-2
1515 00 3300
1100
00
-10-10 -10-10 4400
1010 -1-1
1515 55 5555
1111
.45.45
3030 3535 8855
14.214.2 2.472.47
CumCum|Error||Error|
4-54
Demand and ForecastDemand and Forecast
708090
100110120130140
0 1 2 3 4 5 6 7
Month
Forecast
Actual demand
4-55
Tracking SignalTracking Signal
0 1 2 3 4 5 6 7
Time
-3
-2
-1
0
1
2
3
Tra
ckin
g Si
gnal
98% of points should be between these limits.
4-56
Suppose you have forecast sales with a linear regression model & exponential smoothing. Which model do you use?
Linear Regression Exponential Actual Model Smoothing
Year Sales Forecast Forecast (.9)1 1 0.6 1.002 1 1.3 1.003 2 2.0 1.004 2 2.7 1.905 4 3.4 1.99
Selecting Forecasting Model Selecting Forecasting Model Example - RevisitedExample - Revisited
4-57
Linear Regression Model Linear Regression Model Tracking SignalTracking Signal
Year Y i F’cast
1 1 0.6 0.4 0.4 1.0 2 1 1.3 -0.3 0.35 0.29 3 2 2.0 0.0 0.233 0.43 4 2 2.7 -0.7 0.35 -1.71 5 4 3.4 0.6 0.40 0.0
Error MAD TS
4-58
Exponential Smoothing Model Exponential Smoothing Model Tracking SignalTracking Signal
1.99
Year Y i F’cast
1 1 1.00 0.0 0.0 0.0 2 1 1.00 0.0 0.0 0.0 3 2 1.00 1.0 0.33 3.0 4 2 1.90 0.1 0.275 4.0 5 4 2.01 0.622 5.0
Error MAD TS
4-59
Tracking SignalsTracking Signals
50 1 2 3 4
Year
-3
-2
-1
0
1
2
3
Tra
ckin
g Si
gnal
Exponential Smoothing
Linear Regression
4-60
Forecasting in the Service SectorForecasting in the Service Sector
Examples: For staffing hospitals, fast-food restaurants, banking, etc.
Presents unusual challenges: Large variability (during day, week, etc.). Special need for short term forecasting. Needs differ greatly as function of industry and
product. Issues of holidays and calendar.
4-61
Forecasting SummaryForecasting Summary
Determine purpose of forecast first.
Plot data.
Use several appropriate methods.
Continually monitor, evaluate and adjust methods to improve forecasts.