Professional Documents
Culture Documents
2
Objectives
3
Demand Management
4
Definition (Tersine)
??
• Forecasting is the prediction, projection, or
estimation of the occurrences of uncertain future
events or levels of activity or to predictor estimate
future demand
• Fortunately, many item produced by an organization
do not need forecasts.
• Dependent demand items such as components,
subassemblies can be calculated from the forecasts
for the end item. Forecasts should be made only
for end items (independent demand) that have an
uncertain demand.
5
Why is forecasting important?
• Demand for products and services is usually uncertain.
• Forecasting can be used for…
• Strategic planning (long range planning)
• Finance and accounting (budgets and cost controls)
• Marketing (future sales, new products)
• Production and operations
Predicted
demand
looking
Time back six
Jan Feb Mar Apr May Jun Jul Aug months
Actual demand (past sales)
Predicted demand
7
Some general
characteristics of forecasts
10
Example: Mercedes E-class vs. M-class Sales
Month E-class Sales M-class Sales
Jan 23,345 -
Feb 22,034 -
Mar 21,453 -
Apr 24,897 -
May 23,561 -
Jun 22,684 -
Jul ? ?
12
Types of Forecasting Models
Qualitative Quantitative
(technological) (statistical) methods:
methods: • Forecasts generated
• Forecasts generated through mathematical
subjectively by the modeling, rely on data
forecaster and analytical techniques
13
Qualitative Methods
14
Quantitative Method
Intrinsic methods Time Extrinsic methods/Causal
Series Models: Models:
– Assumes the future will – Explores cause-and-effect
follow same patterns as the relationships
past – Uses leading indicators to
– Last period demand, predict the future
Arithmetic average – Simple Linear Regression,
(average methods), Moving Multiple Linear Regression
average, Exponential – E.g. housing starts and
smoothing, regression appliance sales
analysis
15
Time Series
Forecasting
• Anything that is
observed sequentially
over time is a time series
• Examples of time series
data include:
– Daily IBM stock
prices
– Monthly rainfall
– Quarterly sales
results for Amazon
– Annual Google
profits
16
Causal Method
17
Linear regression in forecasting
Alcohol Sales
Average Monthly
Temperature
19
The best line is the one that minimizes the error
20
Least Squares Method of Linear Regression
21
What does that mean?
Alcohol Sales ε ε
ε
So LSM tries to
minimize the distance
between the line and
the points!
Average Monthly
Temperature
22
Time Series Forecasting
23
Time Series Components
Trend Cyclical
Seasonal Random
24
Components
Trend
component
Demand for product or service
Seasonal peaks
Actual
demand
Average
demand over
Random four years
variation
| | | |
1 2 3 4
Year
25
Trend Component (linear, non linear)
• Persistent, overall upward or downward pattern
• Changes due to population, technology, age,
culture, etc.
• Typically several years duration
Sales
Time Time
Downward linear trend Upward nonlinear trend
26
Seasonal Component (additive,
multiplicative)
• Regular, relatively short-term pattern of up and
down fluctuations
• Due to weather, customs, etc.
• Occurs within a single year
Number of
Period Length Seasons
Week Day 7
Month Week 4-4.5
Month Day 28-31
Year Quarter 4
Year Month 12
Year Week 52
27
Cyclical Component
• Repeating up and down movements
• Affected by business cycle, political, and economic factors
• Multiple years duration
• Often causal or associative relationships
• normally not included in short-term forecasting models
but do play a role in long-range forecasting.
1 Cycle
Sales
Year 28
Irregular/Random Component
• Erratic, unsystematic, ‘residual’ fluctuations
• Due to random variation or unforeseen events
• Short duration and nonrepeating
M T W T F
29
Time Series Plot
A time-series plot (time plot) is a two-dimensional
plot of time series data
30
Time Series: Moving average
• The moving average model uses the last t periods in order to
predict demand in period t+1 by averaging the actual demand
for the last N time periods
• There can be two types of moving average models: simple
moving average and weighted moving average
• The moving average model assumption is that the most accurate
prediction of future demand is a simple (linear) combination of
past demand.
• The choice of the value of N should be determined by
experimentation and often lies within the range of 3 to 8
(Tersine) and 5 to 7 (Smith)
Large N for stable demand (response to change will be slow);
Small N for demand subject to frequent significant change
(response to change will be fast) 31
Naïve Model/Last Period Demand
32
Example for the Naïve Model
Similar to the naïve model, this model uses part of the historical
data to make a forecast.
In the simple moving average models the forecast value is
𝑑 𝑡 − 1 + 𝑑𝑡 − 2 +… . + 𝑑𝑡 − 𝑁 ∑ 𝑑𝑡 − 𝑖
dt ′= = 𝑖=1
𝑁 𝑁
35
Example: forecasting sales at Kroger
Month Bottles
Jan 1,325
Feb 1,353
Mar 1,305 What will
the sales be
Apr 1,275
for July?
May 1,210
Jun 1,195
Jul ?
36
What if we use a 3-month simple moving average?
37
5-month
MA forecast
3-month
MA forecast
What do we observe?
40
Last Period Demand Arithmetic Average Moving Average (2)
Month Demand Forecast Absolut Forecast Absolut Forecast Absolut
Demand Deviation Demand Deviation Demand Deviation
1 34 - - - - - -
2 44 34 10 - - - -
3 42 44 2 39 3 39 3
4 30 42 12 40 10 43 13
5 46 30 16 38 8 36 10
6 44 46 2 39 5 38 6
7 56 44 12 40 16 45 11
8 50 56 6 42 8 50 0
9 38 50 12 43 5 53 15
10 44 38 6 43 1 44 0
11 36 44 8 43 7 41 5
12 46 36 10 42 4 40 6
13 42 46 4 43 1 41 1
14 30 42 12 42 12 44 14
15 52 30 22 42 10 36 16
16 48 52 4 42 6 41 7
17 58 48 10 43 15 50 8
18 54 58 4 44 10 53 1
19 46 54 8 44 2 56 10
20 48 46 2 44 4 50 2
21 40 48 8 44 4 47 7
22 50 40 10 44 6 44 6
23 58 50 8 44 14 45 13
24 60 58 2 45 15 54 6
25 - 60 - 46 - 59 -
190 166 160
41
160/22=7,2
MAD= 190/23=8,26 MAD= 166/22=7,55 MAD= 7
Data Plot
70
60
50
40
30
20
10
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
42
Time series: Weighted Moving Average
𝐶 𝑡 − 1 𝑑𝑡 −1+ 𝐶 𝑡 − 2 𝑑𝑡 −2 +… . +𝐶 𝑡 − 𝑁 𝑑 𝑡 − 𝑁
∑ 𝐶 𝑡 −𝑖 𝑑 𝑡 −𝑖
′ 𝑖 =1
dt = =
∑𝐶 ∑𝐶
t is the current period.
Ft+1 is the forecast for next period
n is the forecasting horizon (how far back we look),
A is the actual sales figure from each period.
w is the importance (weight) we give to each period 43
Why do we need the WMA models?
Because of the ability to give more importance to what
happened recently, without losing the impact of the past.
For a 6-month
SMA, attributing
equal weights to all
past data we miss
Time the downward trend
Jan Feb Mar Apr May Jun Jul Aug
44
Example: Kroger sales of bottled water
Month Bottles
Jan 1,325
Feb 1,353
What will
Mar 1,305
be the sales
Apr 1,275 for July?
May 1,210
Jun 1,195
Jul ?
45
6-month simple moving average…
46
What if we use a weighted moving average?
Make the weights for the last three months more than the first
three months…
Average demand of the first three-months = 1,328
Average demand of the last three-months = 1,227
48
Another Example: WMA (4)
Mo(t) Demand (dt) Forecast Demand(dt') WMA (4)
1 280
2 270
3 330
4 250
5 340 {(4)(250) + (3)(330)+ (2)(270) + (1)(280)} / 10 = 284
6 330 {(4)(340) + (3)(250)+ (2)(330) + (1)(270)} / 10 = 304
7 350 {(4)(330) + (3)(340)+ (2)(250) + (1)(330)} / 10 = 317
8 300 {(4)(350) + (3)(330)+ (2)(340) + (1)(250)} / 10 = 332
9 330 {(4)(300) + (3)(350)+ (2)(330) + (1)(340)} / 10 = 325
10 350 {(4)(330) + (3)(300)+ (2)(350) + (1)(330)} / 10 = 325
11 270 {(4)(350) + (3)(330)+ (2)(300) + (1)(350)} / 10 = 334
12 290 {(4)(270) + (3)(350)+ (2)(330) + (1)(300)} / 10 = 309
13 {(4)(290) + (3)(270)+ (2)(350) + (1)(330)} / 10 = 300
14 {(4)(?) + (3)(290)+ (2)(270) + (1)(350)} / 10 = ?
49
Time Series: Double Moving
Average
50
Procedure
1.Calculate Single Moving Average (SMA) as St’
2.Calculate the second moving average using
moving average St’ and denotated as St’’
3. Calculate difference between 2 MAs (at):
4. Compute trend bt :
51
Example (DMA (4))
t Demand MA (4) MA at bt Forecast Demand(dt’)
(dt) S t' (4x4) Ft+m = at + bt (m)
St''
1 140
2 159
3 136
4 157 148
5 173 156,25
6 131 149,25
7 177 159,5 153,25 165,75 4,17 d7’=F6+1=a6+b6(1)=-
8 188 167,25 158,06 176,43 6,13 d8’=F7+1=a7+b7(1)=165,75+4,17(1)=169,92
9 154 162,5 159,62 165,37 1,92 d9’=F8+1=a8+b8(1)=176,43+6,13(1)=182,56
10 179 174,5 165,93 183,06 5,71 d10’=F9+1=a9+b9(1)=165,37+1,92(1)=167,29
11 180 175,25 169,87 180,62 3,58 d11’=F10+1=a10+b10(1)=183,06+5,71(1)=188,77
12 160 168,5 170,12 166,37 -1,25 d12’=F11+1=a11+b11(1)=180,62+3,58(1)=184,2
13 d13’=F12+1=a12+b12(1)=166,37-1,25(1)=165,12
14 d14’=F12+2=a12+b12(2)=166,37-1,25(2)=163,87
52
Time Series: Exponential Smoothing (ES)
Smoothing
constant
Denotes the importance
alpha α of the past error
53
Time Series: Exponential Smoothing (ES)
54
Time Series: Exponential Smoothing (ES)
• Several approaches are followed in selecting the
smoothing constant.
– If a great amount of smoothing is desired, a small
alpha should be chosen.
– The choice of alpha is affected by the characteristics
of the time series. If sharp ups and downs are
noticed in the data, the best smoothing constant is
0.1. That is alpha chosen should equal 0.1.
– If the data show that the past is very different from
the present, then alpha of 0.9 is appropriate.
55
Exponential smoothing: the method
Assume that we are currently in period t. It is calculated the
forecast for the last period (dt-1’) and we know the actual demand
last period (dt-1) …
56
Example: bottled water at Kroger
Jun ? 1,309
57
Example: bottled water at Kroger
Jun ? 1,225
58
Impact of the smoothing constant
59
Trend..
60
Impact of trend
Sales
Actual
Regular exponential
Data smoothing will always lag
Forecast behind the trend.
Can we include trend
analysis in exponential
smoothing?
Month
61
Double Exponential Smoothing
• Similar to the double moving average model.
• Also known as Brown’s double exponential smoothing
model.
• The model is represented as:
63
Example of DES (BROWN)
t Demand St ' St'' at bt Forecast Demand
(dt) (dt’)
Ft+m = at + bt (m)
1 143 143 143
2 152 144,8 143,36 146,24 0,36
3 161 148,04 144,3 151,784 0,936 146,6
4 139 146,23 144,68 147,781 0,387 152,72
5 137 144,39 144,62 144,148 -0,06 148,17
6 174 150,31 145,76 154,856 1,137 144,09
7 142 148,65 146,34 150,956 0,577 155,99
8 141 147,12 146,49 147,741 0,156 151,53
9 162 150,09 147,21 152,974 0,72 147,9
10 180 156,08 148,99 163,164 1,772 153,69
11 164 157,66 150,72 164,599 1,735 164,94
12 171 160,33 152,64 168,014 1,921 166,33
13 169,935
14 171,856
64
Holt’s Exponential Smoothing (DES-Holt)
• To handle linear trend, similar to the Brown’s Method.
• The difference is that in this method we smooth the
trend and the slope in the time series by using different
constants for each.
• How do we find the best combination of smoothing
constant?
• Low values of alpha and gamma should be used when
there are frequent random fluctuations in the data.
• High values of alpha and gamma should be used when
there is a pattern such as trend in the data.
65
Holt’s Exponential Smoothing (DES-Holt)
66
Example DES-Holt α=0,2; γ=0,3
t Demand Pemulusan St Trend St Ramalan Permintaan (dt')
(dt) Nilai Ft+m = at + bt (m)
1 143 143 9
2 152 152 9
3 161 161 9 161
4 139 163,8 7,14 170
5 137 164,15 5,1 170,94
6 174 170,2 5,38 169,25
7 142 168,87 3,37 175,59
8 141 165,99 1,49 172,24
9 162 166,39 1,16 167,49
10 180 170,05 1,91 167,56
11 164 170,37 1,43 171,96
12 171 171,64 1,38 171,8
13 173,02
14 174,4
67
Winters’ Seasonal Exponential Smoothing
• Allows for both trend and seasonal patterns to be taken
into account.
• This is an extension of the Holt’s method of smoothing.
• In computing the forecast, we add an equation for
seasonality as an index.
• The forecast model is:
68
Winters’ Seasonal Exponential Smoothing
Trend estimate
Seasonality estimate
69
Example of Winter’s ES
70
• S1 = 0,2 (146/I-3) + 0,8 (S0 + b0)
• Initialization b0:
– Average demand 1992 = 108,5
– Average demand 1993 = 146
– Trend difference = 146 – 108,5 = 37,5 for 1 year or for 1
quarter = 37,5/4 = 9,38 = b0
• Initialization S0:
For Quarterly: S0 = average demand – b0 (2,5)
For Monthly: S0 = average demand – b0 (6,5)
71
Determination of Initial Value
Trend Line Sales Estimates
1992 1993
Quarter 1 85,05 + 9,38 = 94,43 122,57 + 9,38 = 131,95
Quarter 2 94,43 + 9,38 = 103,81 131,95 + 9,38 = 141,33
Quarter 3 103,81 + 9,38 = 113,19 141,33 + 9,38 = 150,71
Quarter 4 113,19 + 9,38 = 122,57 150,71 + 9,38 = 160,09
Seasonal Index Estimates = demand/ trend line estimates
1992 1993 Average Adjustment
Quarter 1 146/ 94,43 = 1,55 1,46 (1,55+1,46)/ 2 = 1,51 1,51 * (4/4,07) = 1,48 = I-3
Quarter 2 96/ 103,81 = 0,92 0,9 0,91 0,91 * (4/4,07) = 0,89 = I-2
Quarter 3 0,52 0,52 0,52 0,51 = I-1
Quarter 4 1,09 1,16 1,13 1,11 = I0
4,07 4
72
73
S1 = 0,2 (146/1,48) + 0,8 (85,05 + 9,38) = 95,27
b1 = 0,1 (95,27 – 85,05) + 0,9 (9,38) = 9,46
F2 = (95,27 + 9,46)*0,89 = 93,21
I1 = 0,05 (146/95,27) + 0,95 (1,48) = 1,48
S2 = 0,2 (96/0,89) + 0,8 (95,27+9,46) = 105,36
b2 = 0,1 (105,36-95,27) + 0,9 (9,46) = 9,52
F3 = (105,36+9,52)*0,51 = 58,59
I2 = 0,05 (96/105,36) + 0,95 (0,89) = 0,89
74
Time Series: Regression Analysis
• Linier pattern
75
Time Series: Regression Analysis – Cyclical pattern
• MAD
• Mean Squared Error (MSE)
• Standard Error of Estimation (SEE)
• Mean Absolute Percentage Error (MAPE)
• Mean Forecast Error (MFE) or Mean Error (ME) or Bias
78
Measuring Accuracy: MAD
79
Measuring Accuracy: MSE, SEE
Where:
• dt = actual demand at period t
• dt’ = forecast demand at period t
• n = number of periods
80
Measuring Accuracy: MAPE
• PE = percengahe of error
81
Measuring Accuracy: MFE/ME
83
An Analogy (cont’d)
On average, the
arrows hit the
bullseye (so much
for averages!)
84
MFE & MAD:
An Analogy
The forecasts
are inaccurate &
biased
85
Key Point
86
Validation: Tracking signal
The tracking signal is a measure of how often our estimations
have been above or below the actual value. It is used to decide
when to re-evaluate using a model.
MAD TS
Exponential
Smoothing 70 - 6.0
Forecast
Including Trend 33 - 2.0
0.4
70
0.2
Percent
60
0.0 50
40
-0.2 30
20
-0.4
10
-0.6
5
-0.8
-1.0 1
-100 -50 0 50 100
1 2
Re sidual
Lag
92
GROUP ASSIGNMENT (use
Excel)
• Find the time series data for the
website (secondary data) for at least
60 periods (daily, weekly, quarterly or
monthly data). Provide the website
link.
• Present the data as Excel table and
draw the data pattern
• Determine the 2 appropriate
forecasting methods that fit to the
data pattern
• Evaluate accuracy of the forecasting
Note: every group should and choose the best one and do the
present the different data validation 93