Demand Forecasting

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

Supply Chain Management

INDE 6641
Demand Forecasting

Dr. Narjes Sadeghiamirshahidi

Department of Mechanical and Industrial Engineering

1 Copyright © 2019, 2016, 2013 Pearson Education, Inc. All Rights Reserved
Role of Forecasting in a Supply Chain
 Forecasting: is the basis for all Planning Decisions in a Supply Chain

 Forecasting is useful for:


• Production Scheduling, Inventory Management, Aggregate Planning
• Sales, Promotions, New Production Development
• Plant/Equipment Investment
• Workforce Planning, Hiring, Layoffs

2
Characteristics of Forecasts
 Forecasts are always “inaccurate”.
• Therefore, Forecasts should include both the expected value of Forecast &
a measure of Forecast Error.

 The longer into the future the Forecast is, the less accurate it will be.

 Aggregate Forecasts are usually more accurate.

 Forecasts should consider all the Information available.

3
Forecasting Methods
Forecasting Methods are classified as:
1. Qualitative & Judgmental Method
2. Time Series Models
3. Explanatory or Causal Models

4
Forecasting Methods – Cont’d
1. Qualitative or Judgmental Method: Most appropriate when:
 No Historical Data are available or
 Human Expertise and Knowledge are required
Examples:
• Identifying future Opportunities and Threats as part of a SWOT Analysis (Strengths, Weakness, Opportunities, and
Threats)
• Incorporating Non-quantitative Information (such as impact of Government Regulations or Competitor Behavior)
in a Qualitative Forecast.

2. Time Series Model:


• We use Historical Time Series Data to Forecast.
• Are based on the assumption that Future is an extrapolation of the Past.

3. Explanatory or Causal Model:


Assumes the Forecast is highly correlated with certain Factors in the Environment (e.g., Economy
Condition, Interest Rate, etc.)
Example:
Product Pricing is strongly correlated with Demand. So, Companies can use Causal Models to determine
the impact of Price Promotion on Demand.
5
Forecasting Methods – Cont’d
 Which Forecasting Method?
• It is difficult for a Company to decide which Method is most appropriate for
Forecasting.
• Studies indicate that using multiple Forecasting Methods to create a
combined Forecast is more effective than using one Method alone.
 Focus of the Course:
Time-Series Methods, which are most appropriate when Future Data is related to:
• Historical Data
• Growth Patterns
• Seasonal Patterns

6
Important Points in Forecasting Process
Effective Forecasting involves:
1. Understand objective of Forecasting.

2. Integrate Demand Planning & Forecasting throughout Supply Chain.

3. Identify the major Factors that influence Demand Forecast.

4. Forecast at appropriate level of Aggregation.

5. Establish Performance & Error Measures for Forecast.

7
Time Series
 A Time Series is a stream of Historical Data
 Many Forecasts are based on analysis of Historical Time Series Data
 Assumption: Future is an extrapolation of the Past.
 Components of Time Series
• Randomness
• Trend
• Seasonal Effects
• Cyclical Effects

8
Forecast Notation
 : Observed Values at Period
• {, t>=1} is the Time Series we predict for

• : is Current Period

• Future Period (has not happened yet)

 : Forecast from Period until Period


( period into the Future)
• is Forecast Horizon

• When , we just use

• uses Data up to

9
Evaluating Forecasts (Forecast Accuracy)
Forecast Error is define as:
𝑬 𝒕= 𝑭 𝒕 − 𝑫 𝒕

Common Metrics of Forecast Accuracy are:


𝑛

∑ |𝐸𝑡|
Mean Absolute Error (MAE): 𝑀𝐴 𝐸 = 𝑡=1
𝑛

Mean Square Error (MSE): ∑ 𝐸 𝑡2


𝑀𝑆𝐸 = 𝑡 =1
𝑛


𝑛

Root Mean Square Error: ∑ 𝐸𝑡 2


𝑡=1
𝑅𝑀𝑆𝐸=
𝑛

[ | | ]
𝑛
𝐸𝑡
∑ 𝐷𝑡
Mean Absolute Percentage Error (MAPE): 𝑡 =1
𝑀𝐴𝑃𝐸= × 100
𝑛

10
Evaluating Forecasts (Forecast Accuracy) – Example 1

[ | | ]
𝑛
𝑛
𝐸𝑡

𝑛

∑ |𝐸𝑡| ∑ 𝐸 𝑡2
𝐸𝑡 = 𝐹 𝑡 − 𝐷𝑡 𝑀𝐴 𝐸 = 𝑡 =𝑡 𝑀𝑆𝐸 = 𝑡 =1 𝑀𝐴𝑃𝐸=
𝑡 =1 𝐷𝑡
× 100
𝑛 𝑛 𝑛

Absolute Error Absolute


Month Demand Forecast Error Error Squared Percent
Error
t || )
1 200 225 25 25 625 0.1250
2 240 220 -20 20 400 0.0833
3 300 285 -15 15 225 0.0500
4 270 290 20 20 400 0.0741
5 230 250 20 20 400 0.0870
6 260 240 -20 20 400 0.0769
7 210 250 40 40 1600 0.1905
8 275 240 -35 35 1225 0.1273
Total 15 195 5275 0.8140
= 195/8 =24.375 5275/8 = 659.375 (0.8140/8) *100 =10.18
MAE MSE MAPE

* Note: you have to divide the cumulative result by number of Observations


11
Evaluating Forecasts (Forecast Accuracy) – Example 2
Compare two Forecasts: (O1, F1 & O2, F2)

[ | | ] [ | | ]
𝑛 𝑛 𝑛
𝐸𝑡 𝑛
𝐸𝑡
Obs. Forecast
𝑛

∑ |𝐸𝑡|
𝑛

∑ 𝐸 𝑡2 ∑ 𝐷𝑡 Obs. Forecast ∑ |𝐸𝑡| ∑ 𝐸 𝑡2 ∑ 𝐷𝑡


𝑡=1 𝑡 =1
𝑀𝐴𝑃𝐸=
𝑡 =1
× 100 𝑀𝐴 𝐸 = 𝑀𝑆𝐸 = 𝑀𝐴𝑃𝐸=
𝑡 =1
× 100
𝑀𝐴 𝐸 = 𝑡=1 𝑀𝑆𝐸 = 𝑡 =1 𝑛 𝑛 𝑛 𝑛
𝑛 𝑛

Week O1 F1 |E1| |E1/O1| O2 F2 |E2| |E2/O2|


1 92 88 4 16 0.0435 96 91 5 25 0.0521
2 87 88 1 1 0.0115 89 89 0 0 0.0000
3 95 97 2 4 0.0211 92 90 2 4 0.0217
4 90 83 7 49 0.0778 93 90 3 9 0.0323
5 88 91 3 9 0.0341 90 86 4 16 0.0444
6 93 93 0 0 0.0000 85 89 4 16 0.0471
Total 17 79 0.1879 Total 18 70 0.1976
=17/6 =79/6 =[(0.1879)/6]*100 = 18/6 =70/6 =[(0.1976/6]*100
=2.833 =13.167 = 3.1316 =3 =11.667 = 3.2931
MAE MSE MAPE MAE MSE MAPE

=2.833 =13.167 =3.1316 =3 =11.667 =3.2931

12
Forecasting Stationary Time Series
Stationary Time Series:
Time Series are Stationary if they do not have Trend or Seasonal Effects. (The only Component
is Randomness)
Forecasting Methods for Stationary Time Series are:
• Simple Moving Average
• Weighted Moving Average
• Exponential Smoothing

13
Forecasting Stationary Time Series – Simple Moving Average

Simple Moving Average: Arithmetic Average of the N most recent Observations

Assumption: Future Observations will be similar to recent Past Observations

t 1

D i
Dt  1  Dt  2    Dt  N
Ft  i t  N

N N

14
Simple Moving Average – Example 3
t 1

D i
Dt  1  Dt  2    Dt  N Arithmetic Average of the N most Recent Observations
Ft  i t  N

N N

If N=3 : Take Arithmetic Average of the 3 most Recent Observations: SMA(3)


If N=6 : Take Arithmetic Average of the 6 most Recent Observations: SMA(6)
Engine SMA(3) Error SMA(6) Error
Quarter
Failure Predict Predict
1 200
2 250
3 175
4 186 208.33 22.33
5 225 203.67 -21.33
6 285 195.33 -89.67
7 305 232.00 -73.00 220.17 -84.83
8 190 271.67 81.67 237.67 47.67
SMA(3): SMA(6):
Quarter 4: (200+250+175)/3=208.33 Quarter 7: (200+250+175+186+225+285)/6=220.17
Quarter 5: (250+175+ 186)/3=203.67 Quarter 8: (250+175+186+225+285+305)/6=237.67
15
Forecasting Stationary Time Series – Weighted Moving Average

Note:
In Simple Moving Average approach, Data are equally weighted, which is not desirable.
• Because we might wish to assign more Weights on Recent Observation than the Older ones.

Alternative Method:
Weighted Moving Average:
Weights are adjusted to reflect fluctuations in Data.
We assign more Weights on Recent Observations.
t 1
WMAt   Wi Di
i t  N

 W 1 i

16
Weighted Moving Average – Example 4
Three-Month Weighted Moving Average: WMA (3)
Weights are:

∑ 𝒘𝒊=𝟏
• 0.5 for the most Recent Period (the last period)
• 0.33 for the next most Recent Period 𝒘 𝟐 =𝟎 .𝟑𝟑 𝒘 𝟑 =𝟎 .𝟏𝟕
𝒘 𝟏 =𝟎 .𝟓
• 0.17 for the least Recent Period
Three-Month
Three-Month Weighted
Weighted
Month
Month
Orders
Orders per
per Moving
Moving Average
Average
April:
Month
Month WMA(3)
WMA(3) March 0.5
January 120
January
February 120
90 February 0.33
February
March 90
100 January 0.17
April
March 75
100
May
April 110
75 100.10 (0.5)(100)+(0.33)(90)+(0.17)(120)=100.10
June
May 50
110 85.80
July
June
75
50 96.75 May:
August 130
July
September 75
110 74.05 April 0.5
August
October 130
90 72.70 March 0.33
November
September -
110 98.25
February 0.17
October 90 110.65
November - 103.40 (0.5)(75)+(0.33)(100)+(0.17)(90)=85.80
17
Weighted Moving Average – Example 4 – Cont’d

Errors Calculation : Mean Absolute Error (MAE) & Mean Square Error (MSE)

Three-Month Weighted Error |Error| Error^2


Month Orders per Moving Average
Month
WMA(3)
January 120
February 90
March 100
April 75 100.10 25.10 25.1 630.01
May 110 85.80 -24.20 24.2 585.64
June 50 96.75 46.75 46.75 2185.56
July 75 74.05 -0.95 0.95 0.90
August 130 72.70 -57.30 57.3 3283.29
September 110 98.25 -11.75 11.75 138.06
October 90 110.65 20.65 20.65 426.42
November 103.40 186.70 7249.89 Total
𝑛 𝑛

∑ |𝐸𝑡| ∑ 𝐸 𝑡2 𝟕𝟐𝟒𝟗 . 𝟖𝟗
𝟏𝟖𝟔 . 𝟕𝟎 𝑀𝑆𝐸 = 𝑡 =1 = =1035.70
𝑀𝐴 𝐸 = 𝑡=1 = =26.67 𝑛 𝟕
𝑛 𝟕
18
Forecasting Stationary Time Series – Exponential Smoothing
Exponential Smoothing (unequal Weight to Data points)

New Forecast = (Last Observation) + () (Last Forecast)

𝐹 𝑡 =𝜶 𝐷𝒕 − 𝟏+(𝟏 − 𝜶) 𝐹 𝒕 −𝟏 0 <𝜶 ≤ 1
a is called “Smoothing" Constant

Note: If is not given, we assume

19
Exponential Smoothing – Example 5
The Observed number of Engine Failures for eight Quarters is given in table below.
Forecast the Engine Failure using Exponential Smoothing Method.
Assume: & F1 = 200

Quarter Failures Forecast 𝐹 𝑡 =𝛼 𝐷𝑡 −1 +(1− 𝛼)𝐹 𝑡 − 1


1 200 200
2 250 200
200
𝐹 1=200
3 175 205
205 𝐹 2=( 0.1 ) 𝐷1 + ( 0.9 ) 𝐹 1= ( 0.1 )( 200 ) + ( 0.9 ) ( 𝟐𝟎𝟎 )=𝟐𝟎𝟎
4 186 202
5 225 200
𝐹 3=( 0.1 ) 𝐷 𝟐+ ( 0.9 ) 𝐹 𝟐= ( 0.1 )( 250 ) + ( 0.9 )( 𝟐𝟎𝟎 )=𝟐𝟎𝟓
6 285 203
7 305 211
8 190 220

20
Effect of a – Example
Demand for Personal Computers
Forecast • The Smoothing Constant α is usually chosen
Period Month Demand α=0.30 α=0.50 by Experimentation.
1 January 37 37.00 37.00
• Different values of α, affect "how quickly"
2 February 40 37.00 37.00
3 March 41 37.90 38.50
the Forecast Model responds to changes in
4 April 37 38.83 39.75 Time Series Data.
5 May 45 38.28 38.38 For Example:
6 June 50 40.30 41.69 • For a value of α = 0, Forecast will be the
7 July 43 43.21 45.84 same as last Period’s Forecast.
8 August 47 43.15 44.42
9 September 56 44.30 45.71 • For a value of α = 1, Forecast will be the last
10 October 52 47.81 50.86 Period’s Actual Observation
11 November 55 49.07 51.43 α=0
12 December 54 50.85 53.21 𝐹 𝑡 =𝐹 𝑡 −1
𝐹 𝑡 =𝛼 𝐷𝑡 −1 + ( 1− 𝛼 ) 𝐹 𝑡 −1 α=1 𝐹 𝑡 =𝐷𝑡 −1

21
Effect of a – Example
• The closer α is to 1, the quicker the Forecast Model responds to changes in Time Series Data.
Because it assigns more Weights on recent Actual Observation than the Forecast.
• The closer α is to 0, more Weight is put on prior Forecast. Therefore, Forecast Model will
respond to changes more slowly.
General Rule: The closer α is to 1 the better
Exponential Smoothing Forecasts 𝐹 𝑡 =𝛼 𝐷𝑡 −1 + ( 1− 𝛼 ) 𝐹 𝑡 −1
60

50 α=1 𝐹 𝑡 =𝐷𝑡 −1
40
α=0
Demand

30
𝐹 𝑡 =𝐹 𝑡 −1
20

10

0
0 2 4 6 8 10 12 14

Period
Demand Alpha=0.3 Alpha=0.5

22
Forecasting Stationary Time Series – Practice (Class Activity)
The Observed number of Demands for seven Periods is given in table below.
Period Demand
1 50
2 52
3 54
4 67
5 42
6 51
7

a) Forecast Demand for all Periods using following Methods:


i) Simple Moving Average (Three-Period Moving Average: SMA (3))
ii) Weighted Moving Average (Four-Period Weighted Moving Average: WMA (4))
Assume:
iii) Exponential Smoothing (Assume: & F1 = 200)

b) Calculate Mean Squared Error (MSE) for all Methods. Please explain which Method performs
better and why.
23
Forecasting Models With Linear Trends
Time Series with Trends: Data points are Random & have Trend Effect but they do not
have Seasonal Effect.
Common Forecasting Models with Trends are:
• Double Exponential Smoothing (Holt’s Trend/Model)
• Regression Analysis: Regression-Based Forecasting

24
Double Exponential Smoothing (Holt’s Trend/Model)
Two Exponential Smoothing Constants ():
• one for Intercept ()(value of series)
• one for Slope ()
𝑺 𝒕 =𝛼 𝐷 𝑡 +(1 −𝛼)( 𝑆𝑡 − 1+ 𝐺𝑡 −1) Intercept (level)

𝑮𝒕 = 𝛽( 𝑆𝑡 − 𝑆𝑡 −1 )+(1 − 𝛽) 𝐺𝑡 − 1 Slope (Trend)


: Forecast Value at Time
𝐹 𝑡 , 𝒕+𝝉 =𝑺 𝒕 +𝜏 . 𝑮𝒕
: Level Value at Time
: Trend Value at Time
: Forecast Time Horizon

Note: If Forecast Time Horizon it is not given, =1 =1


𝐹 𝒕 , 𝑡 +1 =𝑺 𝒕 + 𝑮𝒕
So, we are forecasting for the next Period (one Period a head)

Period 1: we are forecasting for , using information from previous Period () 𝐹 0 ,𝟏=𝑺 𝟎 + 𝑮𝟎

Period 2: we are forecasting for , using information from previous Period () 𝐹 1 ,𝟐=𝑺 𝟏+ 𝑮𝟏
25
Double Exponential Smoothing (Holt’s Trend/Model) – Example 6
Use Double Exponential Smoothing (Holt’s Trend/Model):
• Find Forecast Values for the given Series (Actual Data) in Table.
• Calculate Errors: Mean Absolute Deviation (MAD) & Mean Square Error (MSE)
• Assume = 0.1, = 0.1 & S0=200, G0=10.
Period Actual
1 200
2 250
3 175
4 186
5 225
6 285
7 305
8 190

26
Double Exponential Smoothing (Holt’s Trend/Model) – Example 6
Period 1: 𝑭 𝟎, 𝟏=𝑺𝟎+𝑮𝟎
𝑺 𝟏=𝛼 𝐷1 +(1− 𝛼)( 𝑆0 + 𝐺0)
S1 = (0.1) (200) + (0.9) (200 + 10) = 209
=1 𝑮𝟏= 𝛽 ( 𝑆1 − 𝑆0 )+(1− 𝛽) 𝐺 0
G1= (0.1) (209-200) + (0.9) (10) = 9.90
Forecast
Period Actual |Error| Error^2
1 200 210 Period 2:
209.00
209 9.90 10.00 100.00
𝑺 𝟐=𝛼 𝐷2 +(1 −𝛼)( 𝑆1 +𝐺1 )
2 250 222.01
222.01 10.21
10.21 218.90 31.10 967.21
S2 = (0.1) (250) + (0.9) (209 + 9.9) = 222.01
3 175 226.50
226.50 9.64
9.64 232.22
232.22 57.22 3274.24 𝑮𝟐= 𝛽 ( 𝑆2 − 𝑆1 )+(1− 𝛽) 𝐺1
4 186 231.12 9.14 236.14 50.14 2513.79 G2 = (0.1) (222.01-209) + (0.9) (9.9) = 10.21
5 225 238.74 8.98 240.26 15.26 232.91
Period 3:
6 285 251.45 9.36 247.72 37.28 1389.80
𝑺 𝟑=𝛼 𝐷3 +(1 −𝛼)( 𝑆2 + 𝐺2)
7 305 265.23 9.80 260.81 44.19 1953.14 S3= (0.1) (175) + (0.9) (222 + 10.2) = 226.50
8 190 266.52 8.95 275.02 85.02 7229.18 𝑮𝟑= 𝛽 ( 𝑆3 −𝑆 2)+(1 − 𝛽) 𝐺2
G3= (0.1) (226.5-222) + (0.9) (10.2) = 9.64
27
Double Exponential Smoothing (Holt’s Trend/Model) – Example 6
Calculate Errors: Mean Absolute Error (MAE) & Mean Square Error (MSE)
Forecast
Period Actual |Error| Error^2

1 200 209.00 9.90 210 10.00 100.00


2 250 222.01 10.21 218.90 31.10 967.21
3 175 226.50 9.64 232.22 57.22 3274.24
4 186 231.12 9.14 236.14 50.14 2513.79
5 225 238.74 8.98 240.26 15.26 232.91
6 285 251.45 9.36 247.72 37.28 1389.80
7 305 265.23 9.80 260.81 44.19 1953.14
8 190 266.52 8.95 275.02 85.02 7229.18
330.22 17660.27 Total

𝑛
𝑛
∑ 𝐸 𝑡2
∑ |𝐸𝑡| 330.22 𝑀𝑆𝐸 = 𝑡 =1 =
17660.27
= 2207.53
𝑀𝐴 𝐸 = 𝑡=1
= = 41.28 𝑛 8
𝑛 8
28
Double Exponential Smoothing (Holt’s Trend/Model) – Example 6

What is Forecast Values for Periods 9 and 10?


Forecast
Period Actual |Error| Error^2

1 200 209.00 9.90 210 10.00 100.00


2 250 222.01 10.21 218.90 31.10 967.21
3 175 226.50 9.64 232.22 57.22 3274.24
Period 9: 4 186 231.12 9.14 236.14 50.14 2513.79
5 225 238.74 8.98 240.26 15.26 232.91
𝐹 8 , 9=266.52+ 8 .95= 275.47
6 285 251.45 9.36 247.72 37.28 1389.80
7 305 265.23 9.80 260.81 44.19 1953.14
Period 10:
=2 𝐹 𝑡 , 𝒕+𝝉 =𝑺𝒕 +2 𝑮𝒕 8 190 266.52 8.95 275.02 85.02 7229.18
9 ?
275.47
𝐹 8 ,10 = 266.52+2( 8 .95)=284.42 10 ?
284.42

29
Double Exponential Smoothing (Holt’s Trend/Model) – Practice
(Class Activity)
The Actual Demands for eight Periods is given in table below.
a) Use Double Exponential Smoothing (Holt’s Trend/Model) to forecast Demand for all Periods.
Assume: = 0.1, = 0.1 & S0 = 200, G0 = 10.
b) Calculate Errors using Mean Absolute Deviation (MAD) & Mean Square Error (MSE) Methods.
Period Actual Demand
1 200
2 250
3 175
4 186
5 225
6 285
7 305
8 190
9
10

30
Forecasting Models With Seasonality (No Trend)
Time Series with Seasonality: Data points are Random & have Seasonality Effect but
they do not have Trend Effect.

When Time Series show Seasonality (no Trend: no ), different Techniques provides better
Forecasting.
Seasonal Factors can be used for Forecasting by adjusting level () in two different ways:

1- Additive Model: 𝐹 𝑡+𝜏 =𝑺𝒕 +𝑪𝒕 +𝝉 − 𝑵


Seasonal Factors
2- Multiplicative Model: 𝐹 𝑡 +𝜏 =𝑺𝒕 𝐶 𝑡 +𝜏 − 𝑁
31
Multiplicative Model – Seasonal Adjustment
Multiplicative Model: 𝐹 𝑡 +𝜏 =𝑺𝒕 𝐶 𝑡 +𝜏 − 𝑁
• Ci : Multiplicative Seasonal Factor

• Season repeats every N Periods (at least 3)

Note: We should identify N

• We represent Seasonality using Seasonal Factors () as:

𝑪𝒊 𝑓𝑜𝑟 1≤𝑖≤𝑁 and ∑ 𝐂𝐢=𝑵


32
Finding Seasonal Factors
Steps for finding Seasonal Factors
1. Calculate the Sample Mean of all Data (Overall Average of all Observations)
T N Di , j
D 
j 1 i 1 N T
2. Divide each Data by the Sample Mean (Overall Average:)
3. Take average of Factors for similar Periods within each Season. This gives N
Seasonal Factors () that sum up to N
4. Calculate Forecast as:
¯
𝐶𝑖 ⋅ 𝐷
33
Forecasting Models With Seasonality – Example 7
Given Daily Demand for four Weeks, we want to forecast Daily Demand for Week 5.

Week 1 Week 2 Week 3 Week 4


Monday 16.2 17.3 14.6 16.1
Tuesday 12.1 11.5 13.1 11.8
Wednesday 14.2 15 13 12.9
Thursday 17.3 17.6 16.9 16.6
Friday 22.5 23.5 21.9 24.3

34
Forecasting Models With Seasonality – Example 7
Given Daily Demand for four Weeks, we want to forecast Daily Demand for Week 5.
Plot Time Series Data:
Week 1 Week 2 Week 3 Week 4
Monday 16.2 17.3 14.6 16.1
Tuesday 12.1 11.5 13.1 11.8
Wednesday 14.2 15 13 12.9
Thursday 17.3 17.6 16.9 16.6
Friday 22.5 23.5 21.9 24.3
Total 82.4 84.9 79.5 81.7 25

20

86
84.9 15

Demand per day


85
84 10
Total Demand (per week)

83 82.4
81.7 5
82
81 79.5
0
80 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
79
78 Days of Week
77
Week 1 Week 2 Week 3 Week 4
76
0 1 2 3 4 5
1: Monday 2: Tuesday 3: Wednesday 4: Thursday 5: Friday
Period (week) There is Seasonality: each Day of Week is a Season
There is No Trend each Day of Week is a Season: N=5
35
Forecasting Models With Seasonality – Example 7
Given Daily Demand for four weeks, we want to forecast Daily Demand for week 5.

Step 1: Calculate Overall Average of all Observations


Week 1 Week 2 Week 3 Week 4 Total
Monday 16.2 17.3 14.6 16.1 16.2 + 17.3+ 14.6 + 16.1 = 64.2
Tuesday 12.1 11.5 13.1 11.8 12.1 + 11.5 + 13.1 + 11.8= 48.6
Wednesday 14.2 15 13 12.9 14.2 + 15 + 13 + 12.9 = 55.1
Thursday 17.3 17.6 16.9 16.6 17.3 + 17.6 + 16.9 + 16.6 = 68.4
Friday 22.5 23.5 21.9 24.3 22.5 + 23.5 + 21.9 + 24.3 = 92.2
Total 64.2 + 48.6 + 55.1 + 68.4 + 92.2 = 328.5

Overall Average = (328.5)/(5*4) =16.425

36
Forecasting Models With Seasonality – Example 7
Step 2: Divide each Observation by the Sample Mean (Overall Average )

Overall Average = 16.425

𝟏𝟔 . 𝟐 Week 1 Week 2 Week 3 Week 4


=𝟎 . 𝟗𝟗
𝟏𝟔 . 𝟒𝟐𝟓
Monday 0.99 1.05 0.89 0.98

Tuesday 0.74 0.70 0.80 0.72

Wednesday 0.86 0.91 0.79 0.79

Thursday 1.05 1.07 1.03 1.01

Friday 1.37 1.43 1.33 1.48

37
Forecasting Models With Seasonality – Example 7
Step 3: Take average of Factors for similar Periods within each Season.
Take average of Factors corresponding to the same day of week (same Season).
Seasonal
Week 1 Week 2 Week 3 Week 4
Factor
0.99+1.05+ 0.89+ 0.98
Monday 0.99 1.05 0.89 0.98 0.98 =𝟎 . 𝟗𝟖
4

Tuesday 0.74 0.70 0.80 0.72 0.74

Wednesday 0.86 0.91 0.79 0.79 0.84

Thursday 1.05 1.07 1.03 1.01 1.04

Friday 1.37 1.43 1.33 1.48 1.40

∑ 𝐂𝐢=𝑵 0.98 + 0.74 + 0.84 + 1.04 + 1.40 = 5

38
Forecasting Models With Seasonality – Example 7
Step 4: Calculate Forecast: multiply Overall Average by appropriate Seasonal Factor.

Seasonal Forecast
Week 1 Week 2 Week 3 Week 4 Average = 16.425
Factor Week 5

Monday 0.99 1.05 0.89 0.98 0.98 16.05

Tuesday 0.74 0.70 0.80 0.72 0.74 12.15

Wednesday 0.86 0.91 0.79 0.79 0.84 13.78

Thursday 1.05 1.07 1.03 1.01 1.04 17.10

Friday 1.37 1.43 1.33 1.48 1.40 23.05

39
Forecasting Models With Seasonality – Example 7

Week 1 Week 2 Week 3 Week 4 Week 1 Week 2 Week 3 Week 4 Forecast


Week 5
Monday 16.2 17.3 14.6 16.1 Monday 16.2 17.3 14.6 16.1 16.05
Tuesday 12.1 11.5 13.1 11.8 Tuesday 12.1 11.5 13.1 11.8 12.15
Wednesday 14.2 15 13 12.9 Wednesday 14.2 15 13 12.9 13.78
Thursday 17.3 17.6 16.9 16.6 Thursday 17.3 17.6 16.9 16.6 17.10
Friday 22.5 23.5 21.9 24.3 Friday 22.5 23.5 21.9 24.3 23.05

25 25

20 20

Demand per day


Demand per day

15 15

10 10

5 5

0 0
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

Days of Week Days of Week

Week 1 Week 2 Week 3 Week 4 Week 1 Week 2 Week 3 Week 4 Week 5

40
Forecasting Models with Trend & Seasonality
Time Series with Trend & Seasonality: Data Points are Random & have Trend & Seasonality
Effects.

Two common Forecasting Models with Trend & Seasonality are:

• Holt-Winters Additive Model: 𝐹 𝑡 +𝜏 =𝑆𝑡 + 𝐺𝑡 + 𝐶 𝑡 +𝜏 − 𝑁


• Holt-Winters Multiplicative Model: 𝐹 𝑡 +𝜏 =(𝑆 𝑡 +𝐺𝑡 )𝐶 𝑡 +𝜏 − 𝑁
41
Forecasting Models with Trend & Seasonality – Example 8
Consider following Data:
Demand per Quarter for three Years is given.
We want to forecast Demand per Quarter for Year 2019.

Demand (1000s) per Quarter

Year 1 2 3 4

2016 12.6 8.6 6.3 17.5

2017 14.1 10.3 7.5 18.2

2018 15.3 10.6 8.1 19.6

42
Forecasting Models with Trend & Seasonality – Example 8
Plot Time Series Data:
Demand (1000s) per Quarter
Year 1 2 3 4 Total
2016 12.6 8.6 6.3 17.5 45
2017 14.1 10.3 7.5 18.2 50.1
2018 15.3 10.6 8.1 19.6 53.6
25

Demand (1000s) per Quarter


60 20
58
56 15
Total Demand (1000)

53.6
54
10
52
50.1
50 5
48
0
46 45 0 1 2 3 4 5
44
0 1 2 3 4 Quarter of Year

Period (Year) 2016 2017 2018

1: Quarter 1 2: Quarter 2 3: Quarter 3 4: Quarter 4


Trend exists: Total Demand per year is increasing
There is Seasonality: each Quarter of Year is a Season
43
Forecasting Models with Trend & Seasonality – Example 8
Consider given Data: Demand (1000s) per Quarter
Year 1 2 3 4 Total
Step 1: Calculate overall 2016 12.6 8.6 6.3 17.5 45
average of all Observations Average = 12.39
2017 14.1 10.3 7.5 18.2 50.1
2018 15.3 10.6 8.1 19.6 53.6

Step 2: Divide each Demand (1000s) per Quarter 𝟏𝟐 . 𝟔


=𝟏 . 𝟎𝟐
Observation by Sample Year 1 2 3 4 𝟏𝟐 .𝟑𝟗
Mean (Overall Average ) 2016 1.02 0.69 0.51 1.41
2017 1.14 0.83 0.61 1.47
2018 1.23 0.86 0.65 1.58
Step 3: Take the Average of
Factors within each Season
(here: Quarter), which results
Demand (1000s) per Quarter
in N Seasonal Factor . Year 1 2 3 4
𝑵 Average 1.13 0.79 0.59 1.49 Seasonal Factors:
𝟒
∑ 𝑪 𝒊=𝑵 1.13 + 0.79 + 0.59 + 1.49 = 4 𝑪 𝒊=𝟒 ∑
𝒊=𝟏
Demand (1000s) per Quarter 𝒊=𝟏
Step 4: Normalize Seasonal Year 1 2 3 4
Factors to get . 𝑠𝑖 = 𝑁𝐶 𝑖 Normalized Seasonal Factors:
Normalize 0.28 0.20 0.15 0.37
N ∑ 𝐶𝑖 4

∑ 𝑠 𝑖=1 ∑ 𝑠 𝑖=1
𝑖 =1
𝟏 .𝟏𝟑 0.28 + 0.20 + 0.15 + 0.37 = 1
=𝟎 .𝟐𝟖
i=1 𝟒 i=1

44
Forecasting Models with Trend & Seasonality – Example 8
Demand (1000s) per Quarter Normalized seasonal factors
Year 1 2 3 4 Total Year 1 2 3 4
2016 12.6 8.6 6.3 17.5 45
0.28 0.20 0.15 0.37
2017 14.1 10.3 7.5 18.2 50.1
2018 15.3 10.6 8.1 19.6 53.6

Step 5: Calculate a Linear Trend Line for Periods of Data (Observations) in table to get a rough Forecast estimate for the
Period that we want to forecast for (in this example: Linear Trend Line for three Years of Data to get estimate for Year 4)
We need to calculate Slope & Intercept for the Linear Trend Line
Demand (1000s) per
Quarter =INTERCEPT(known_ys,known_x’s) Intercept = 40.97
Year 1 2 3 4 Total
1 2016 12.6 8.6 6.3 17.5 45 =SLOPE(known_ys,known_x’s) Slope = 4.30
2 2017 14.1 10.3 7.5 18.2 50.1
3 2018 15.3 10.6 8.1 19.6 53.6

Linear Trend Line:𝒚 =𝟒𝟎 . 𝟗𝟕+𝟒 . 𝟑𝟎 (𝒚𝒆𝒂𝒓 ) rough estimate for Year 4: 𝒚 =𝟒𝟎 . 𝟗𝟕+𝟒 . 𝟑𝟎 ( 𝟒 )=𝟓𝟖 . 𝟏𝟕

𝐹 1=𝑠1 𝑦=𝟎.𝟐𝟖×(𝟓𝟖.𝟏𝟕)=16.28
Now, we can calculate forecast for each Quarter Forecast for Quarter 1 for Year 4
(Quarters 1 to 4) of Year 4 via: Forecast for Quarter 2 for Year 4
multiplying the rough Forecast estimate by Forecast for Quarter 3 for Year 4
corresponding Normalized Seasonal Factor
Forecast for Quarter 4 for Year 4
45
Forecasting Models with Trend & Seasonality – Example 8

𝐹 1=𝑠1 𝑦=𝟎.𝟐𝟖×(𝟓𝟖.𝟏𝟕)=16.28
Forecast for Quarter 1 for Year 4
Forecast for Quarter 2 for Year 4
Forecast for Quarter 3 for Year 4
Forecast for Quarter 4 for Year 4

60
[Y VALUE]
Demand (1000s) per Quarter 58

Year 1 2 3 4 Total 56

Total Demand (1000)


53.6
1 2016 12.6 8.6 6.3 17.5 45 54
2 2017 14.1 10.3 7.5 18.2 50.1 52
50.1
3 2018 15.3 10.6 8.1 19.6 53.6 50
4 2019 58.17 48

46 45
44
0 1 2 3 4 5

If we sum Forecasts for all Quarters in Year 4, 2016 2017 2018 2019

It gives us Forecast of Total Demand in Year 4 Period (Year)

46
Forecasting Models with Trend & Seasonality – Example 8
Demand (1000s) per Quarter
Demand (1000s) per Quarter
Year 1 2 3 4 Total
Year 1 2 3 4 Total
2016 12.6 8.6 6.3 17.5 45 1 2016 12.6 8.6 6.3 17.5 45
2017 14.1 10.3 7.5 18.2 50.1 2 2017 14.1 10.3 7.5 18.2 50.1
2018 15.3 10.6 8.1 19.6 53.6 3 2018 15.3 10.6 8.1 19.6 53.6
4 2019 58.17
60
60 [Y VALUE]
58
Total Demand (1000)

58

Total Demand (1000)


56 53.6 56 53.6
54
54
52 50.1 52 50.1
50 50
48 48
46 45 45
46
44 44
0 1 2 3 4 0 1 2 3 4 5
Period (Year) 2016 2017 2018 2019
Period (Year)

25 25

Demand (1000s) per Quarter


Demand (1000s) per Quarter

20 20

15 15

10 10

5 5

0
0 0 1 2 3 4 5
0 1 2 3 4 5
Quarter of Year Quarter of Year
47 2016 2017 2018 2016 2017 2018 2019
Model Choice

48

You might also like