You are on page 1of 72

Demand Forecasting

Dr. Zied BABAI


Kedge Business School
mohamed-zied.babai@kedgebs.com

Demand
Outline

⚫ Why do we need forecasts

⚫ Types of forecast

⚫ Forecasting approaches and methods


• Forecasting process
• Forecast performance evaluation
Outline

⚫ Why do we need forecasts

⚫ Types of forecast

⚫ Forecasting approaches and methods


Forecasting is needed to support most of supply chain decisions

Procurement Production Distribution


Supply chain design
Sourcing and Structure, focus Structure, focus
Long term
contract setting and design of and design of the
with suppliers the factory network distribution network

Supply chain planning (Sales and Operations Planning)


Adjustment/ Adjustment/ Adjustment/
Mid term
reservation of reservation of reservation of
supplier’s capacity production capacity distribution capacity

Production Planning and Flow management


Short term Procurement flow Production flow Distribution flow
management management management

Detailed management of physical flows


Very Order picking and
Transportation Production
short term transportation
management scheduling
management
Outline

⚫ Why do we need forecasts

⚫ Types of forecast

⚫ Forecasting approaches and methods


Types of Forecast

Two distinctive types:

⚫ Optimistic

⚫ Pessimistic
Optimistic Forecast

Company estimates sales of


⚫ 6 million product units

for a particular year, but only sells


⚫ 4.5 million.

What effect may this have on the business ?


• Excessive inventory of finished product
• Associated high storage costs
• Inventory becomes obsolescent
• Plant capacity is used unnecessarily
• Finished product must be sold at a loss
Pessimistic Forecast

Company estimates that it will sell


⚫ 6 million of its product units

for a particular year


⚫ Orders are received for 7.5 million.

What effect may this have on the business?


• Results in inadequate stock and lost orders
• Insufficient raw material stops production
• Excessive costs due to subcontracting
• Excessive costs due to overtime
• Excessive costs from the hire of part time labour
• Poor customer relationship’s, loses orders
Pessimistic versus Optimistic

Is it better to be Optimistic or Pessimistic?


Pessimistic versus Optimistic

It is considered better to be
Optimistic rather than Pessimistic when forecasting.
Pessimistic forecasts result in:
⚫ loss of customers due to inability to fill orders

⚫ demotivating effects on the staff

⚫ high costs idle production line due to insufficient


raw material
⚫ high costs of idle labour due to insufficient raw
material
Outline

⚫ Why do we need forecasts

⚫ Types of forecast

⚫ Forecasting approaches and methods


Different Forecasting Approaches

There are different methods roughly divided into two


groups
⚫ Qualitative methods (Judgemental methods)
• based on experience, judgement, knowledge
• e.g. Expert Judgement, Data gathering methods, etc..

⚫ Quantitative methods
• based on data, statistics
• e.g. Causal methods, Extrapolative methods
Different Forecasting Approaches

There are different methods roughly divided


into two groups
⚫ Qualitative methods (Judgemental methods)
• Expert Judgement, Data gathering methods, etc..
⚫ Quantitative methods
• Causal methods, Extrapolative methods
When do we use Judgemental
Methods

When little information is available, it is often


necessary to forecast, this often happens
because the company is:

⚫ launching a new product, and need to know


the likely demand

⚫ installing new design of automated production


line and need to know its reliability
Expert Judgement

It is normal to start by asking someone who is an expert in the


area to make an informed guess which may be
⚫ subjective
⚫ not based on a quantitative model

Example: Predicting government requirements for recycling of


packaging materials in fifteen years time, will be reliant on
subjective opinion.

Help is provided to the expert as additional information, this can


be done using different methods

What are these methods?


Data Gathering Methods

Market Research:
⚫ Assess the demand for a new product by survey
Historical Comparisons:
⚫ Review available information about similar products or
processes
Delphi Method:
⚫ Pool separate knowledge of different experts wait for an
agreement to emerge
etc.
Qualitative Methods : Advantages &
drawbacks

⚫ Advantages :
• Take into account intangible factors.
• Used when there is little demand information (new product, new
market, etc.)
⚫ Drawbacks :
• Long delay of the process
• Bias/subjectivity
• High cost (ex. Experts consulting)
• Not enough precision
Different Forecasting Approaches

There are different methods roughly divided


into two groups
⚫ Qualitative methods (Judgemental methods)
• Expert Judgement, Data gathering methods, etc..
⚫ Quantitative methods
• Causal methods, Extrapolative methods
How to forecast a future demand ?

▪ Analyse the time series


▪ Select an accurate method (Performance)
▪ Apply the forecasting method
How to identify outliers ?

▪ How to identify this outlier ?


Analysis of time series: detection of
outliers

▪ There are methods that can be used to detect the outliers in a time series:
Confidence interval method, Student test, etc.
▪ Confidence interval method :

▪ Principle:
1 n 
▪ Calculate the mean of the time series:
x =   xi 
n  t =1 
n
1
▪ Calculate the standard deviation:  =
x 
n − 1 t =1
( xi − x ) 2
▪ Calculate the confidence interval: IC = x  1.96
x

▪ An outlier is an observation outside the confidence interval

▪ NB: 1.96 is the value of the Normal distribution at 5% of risk


Confidence interval method: Example of
calculations
▪ Let's consider the following time series:
Time Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

Demand 28 37 29 32 49 38 29 36 21 35 14 31

▪ By considering the confidence interval method with a risk of 5%, which


observations are outliers?

▪ Calculations :
• Mean = 31.58

• Standard Deviation = 8.80

• Confidence Interval = [ 14.32 ; 48.84 ]

 The demand in November and May are outliers


Analysis of time series: demand
components

Seasonnality

Cyclic
demand
Analysis of a temporal series:
variation and trend analysis

⚫ Propose a 'simple' method that can be used to identify


and to analyse the two demand patterns (simple
variation, trend, etc.) given in the following table:

Month 1 2 3 4 5 6 7 8 9 10
Demand 1 19 20 20 22 17 22 20 21 21 18
Demand 2 11 12 15 17 18 21 23 24 28 31
Analysis of a temporal series:
Forecasting Performance

How good is the forecast?

Month (t) 1 2 3 4 5 6 7 8 9 10
Forecast (Ft) 10 13 18 15 17 22 20 21 17 18
Actual Demand (Dt) 11 12 15 17 18 21 23 20 16 19

⚫ How to measure the performance of a forecasting method ?


• Mean Forecast Error (MFE or Bias)
• Mean Absolute Deviation (MAD)
• Mean Absolute Percentage Error (MAPE)
• Mean Squared Error (MSE)
Mean Forecast Error (MFE or Bias)

⚫ Also called forecast BIAS Texte

⚫ Want MFE to be as close to zero as possible --


minimum bias
⚫ A large positive (negative) MFE means that the
forecast is undershooting (overshooting) the actual
observations
⚫ Note that zero MFE does not imply that forecasts are
perfect (no error) - only that mean is “on target”
Mean Absolute Deviation
(MAD) - the smaller the MAD value, the better
- the MAD value measures the amount of error
https://www.researchgate.net/publication/235312797_Forecasting_performance_measures_-_What_are_their_practical_meaning

n
1
MAD =  Dt − Ft
n t =1
⚫ Measures absolute error
⚫ Positive and negative errors thus do not cancel out
(as with MFE)
⚫ Want MAD to be as small as possible
⚫ No way to know if MAD error is large or small in
relation to the actual data
Mean Absolute Percentage Error
(MAPE)

⚫ Same as MAD, except ...


⚫ Measures deviation as a percentage of actual data
Mean Squared Error (MSE)

- the smaller MSE the value, the better

⚫ Measures squared forecast error - error variance


⚫ Recognizes that large errors are disproportionately
more “expensive” than small errors
⚫ But is not as easily interpreted as MAD, MAPE - not as
intuitive
Different Forecasting Approaches

There are different methods roughly divided


into two groups
⚫ Qualitative methods (Judgemental methods)
• Expert Judgement, Data gathering methods, etc..
⚫ Quantitative methods
• Causal methods, Extrapolative methods
Causal Methods

Causal methods are based on a known or perceived relationship


between the factor to be forecast and other external or internal
factors

Knowledge of variables used in forecast development:


• Quantity to be forecast is the dependant variable
• Other variables are independent

Simple linear regression assumes a linear relationship exists


between the dependent variable y, and a single independent x.
The relationship may be expressed as y=ax+b

To forecast future values of y, values of a, b are estimated based


on previously acquired data
Example of Causal Method

A company manufactures a successful range of products,


it wants to:
⚫ Forecast product demand for the next year, knowing that :
- Product sales are affected by the advertising budget.

- Sales and advertising budgets for 8 quarters (2 years) are


shown in the following table. Product advertising/sales
relationships is shown in the following chart.
Table for Example Forecast
Quarter Advertising Sales
budget (m€)
1 15.0 153 Product Sales
250
2 17.5 198 200

Sales
3 12.0 147 150

4 8.5 104 100

50
5 9.5 131
0
6 12.5 159 0 5 10 15 20
Advertising
7 14.5 160
8 11.0 124
Calculate the Sales Forecast

The budget for advertising in quarters 9, 10,


11 and 12 is 12.0, 17.0. 20.0 and 14.0
respectively.

What will the sales forecast be for quarters ?


9,10,11 and 12 ?
Calculate the values for
Quarters 9, 10, 11 & 12
Quarter Advertising budget (m€) Sales
1 15 153
2 17.5 198
3 12 147
4 8.5 104
5 9.5 131
6 12.5 159
7 14.5 160
8 11 124
9 12 ?
10 17 ?
11 20 ?
12 14 ?
Linear regression methodes
▪ Coefficients of the regression line:
n

 ( y − y )( x − x )
t t
a= t =1
n
and b = y −ax
 t
( x
t =1
− x ) 2

▪ These parameters can be obtained by using Excel


▪ Correlation coefficient (R2) :
Var ( forecast errors)
R2 = 1 −
Var (actual sales )
▪ For a good regression model, this coefficient should be close to 1
Forecast: Example Chart

250

200
y = 8.78 x + 36.74
R2=0,8653
150
Sales

100

50

0
0 5 10 15

Advertising budget
Example Calculation

Values obtained are displayed in the equation, on the chart,


a = 36.74
and
b = 8.78,
so that yt , the forecast sales quarter is given by
yt = 8.7773z + 36.735.
This relationship can be used to forecast the sales in the next
four quarters on the basis of the budgeted advertising in these
quarters as follows
⚫ Quarter 9 = 8.78 x 12.0 + 36.74 = 142
⚫ Quarter 10 = 8.78 x 17.0+ 36.74 = 186
⚫ Quarter 11 = 8.78 x 20.0+ 36.74 = 212
⚫ Quarter 12 = 8.78 x 14.0+ 36.74 = 160
Extrapolative Methods

They do not take into account the external factors but they
look at a series of past values to predict what will happen
in the future

There are many different kinds of extrapolative


methods:
• Naïve method
• Simple average
• Moving average
• Weighted moving average
• Exponential smoothing
Naïve method

This approach assumes that:


⚫ Data from the immediately preceding past can be used
to forecast needs for the next period
Month Jan Fév Mar Avr Mai Jui Juil Aou Sep Oct

Demand 12 23 25 15 32 42 26 21 18

Forecast 12 23 25 15 32 42 26 21 18

The average: based on one set of data, assumes that


⚫ historical data from period to period shows changes are
insignificant and need not be considered
Simple Average

⚫ It consists in calculating the average of all the past


demands to forecast the future demand
Month Demand
⚫ Example:
January 45
February 38
March 29
April 35
May 31
June ?

The forecast in June is :


(45 + 38 + 29 + 35 +31) / 5 = 36
Moving Averages (of order n)

Historical data from past n time periods are used to forecast


future activity

Dt −1 + Dt −2 + Dt −3 + ..... + Dt −n
Ft =
n
Dt : Actual demand at time t

Ft : Forecast at time t
Moving Averages of order 3: Example

Month Demand Moving


Average
(n=3)
January 45 NA
February 38 NA
March 29 NA
April 35 ?
May 31 ?
June 30 ?
Moving Averages of order 3: Example

Month Demand Demand Sum Moving


(n=3) Average
(n=3)
January 45 NA NA
February 38 NA NA
March 29 NA NA
April 35 45+38+29=112 112/3 = 37
May 31
June NA
Moving Averages (of order n)

Month Demand Demand Sum Moving


(n=3) Average
(n=3)
January 45 NA NA
February 38 NA NA
March 29 NA NA
April 35 45+38+29=112 112/3 = 37
May 31 38+29+35=102 102/3 = 34
June NA
Moving Averages (of order n)

Month Demand Demand Sum Moving


(n=3) Average
(n=3)
January 45 NA NA
February 38 NA NA
March 29 NA NA
April 35 45+38+29=112 112/3 = 37
May 31 38+29+35=102 102/3 = 34
June NA 29+35+31=95 95/3 = 32
Weighted Moving Averages

Weighted moving average models apply


⚫ Weighting to period data.
and considers
⚫ Some periods more important than others.

Ft = wt −1Dt −1 + wt −2 Dt −2 + wt −3Dt −3 + ..... + wt −n Dt −n


Example
Weighted Moving Averages
Month Demand
January 45

February 38
March 29
April 35

May 31

Calculate the forecasts in April, May and June by using the weighted
moving averages (over 3 periods) knowing that the weight of the
demand of the last month is twice important than the two previous
months ?
Example
Weighted Moving Averages
Exponential Smoothing

⚫ Single Exponential Smoothing (Brown's Model)

⚫ Double Exponential Smoothing (Holt's Model)

⚫ Triple Exponential Smoothing (Winters's Model)


Single Exponential Smoothing

⚫ Models are developed using a single weighting


or smoothing factor, named alpha (a)
⚫ 0<a<1
⚫ The mathematical model is:
Ft = a Dt-1 + (1- a) Ft-1
Ft = Forecast at time t
Dt = Actual demand at time t
a = smoothing constant
Single Exponential Smoothing
Example

Motor car dealer predicted sales of 23000


vehicles in March
⚫ Actual sales were 22150

⚫ Alpha (a) factor is 0.40

⚫ Calculate forecast sales for April ?

Forecast sales for April is


FApril = 23000 + 0.40(22150 -23000) = 22660 vehicles
Ft = a Dt-1 + (1- a) Ft-1 = Ft-1 + a (Dt-1 - Ft-1 )
Forecast Error
Exponentiel smoothing: Example

Month Demand Forecast


January 45

February 38
March 29
April 35 37.33

May 31 ?
June 30 ?

Calculate the forecasts in May and June by using the exponential


smoothing. The initial forecast for April (obtained at the end of March)
is equal to 37.33 and the smoothing constant is a = 0.1?
Exponentiel smoothing: Example

Month Demand Forecast


January 45

February 38

March 29

April 35 37.33
May 31 = 0.1×35 + (1-0.1)×37.33
= 37.09
June 30 ?
Exponentiel smoothing: Example

Month Demand Forecast


January 45

February 38

March 29
April 35 37.33
May 31 37.09
June 30 = 0.1×31 + (1-0.1)×37.09
= 36.49
Why is it called Exponential
Smoothing ?

weight
Decreasing weight given
to older observations

today
Limitations of the Single Exponential
Smoothing !!!

⚫ The single exponential smoothing does not take into


account the trend and seasonality of the demand.
Consequently, this model should be amended to be
adapted in these contexts to give good performance

 Holt's Model of exponential smoothing (taking into


account the trend)

 Winters's Model of exponential smoothing (taking into


account the trend and seasonality)
Exponential smoothing with Trend (Holt's
Model)
Exponential smoothing with Trend (Holt's
Model)
Exponential smoothing with Trend (Holt's
Model): Example

Month Demand Base (B) Trend (T) Trend Adjusted


Forecast (F)
Dec 1020 1020 0 ?
Jan 940 ? ? ?
Feb 920 ? ? ?
Mar 950 ? ? ?
Apr
May
June
Smoothing Coefficients: a = 0.8 and  = 0.5

Initialize in December the Trend TDec=0 and the Base BDec=1020

Calculate the Trend Adjusted Forecasts for the months Jan, Feb and Mar
Exponential smoothing with Trend (Holt's
Model): Example

⚫ Calculate in January:
BJan = (0.8) (DDec) + (1 – 0.8) (FDec)
Since: FDec = BDec + TDec , then: FDec = 1020 + 0 = 1020

⚫ Consequently: BJan = (0.8) (1020) + (0.2) (1020) = 1020

⚫ Now, estimate the trend in January:


TJan = (0.5) (BJan – BDec) + (1 – 0.5) (TDec) = (0.5)(1020 – 1020)+(0.5) (0) = 0

⚫ The adjusted forecast in January is:


FJan = BJan + TJan = 1020 + 0 = 1020
Exponential smoothing with Trend (Holt's
Model): Example

⚫ Calculate in February:
BFeb = (0.8) (DJan) + (1 – 0.8) (FJan)
FJan = BJan + TJan = 1020 + 0 = 1020.
BFeb = (0.8) (940) + (0.2) (1020) = 956

⚫ Now, estimate the trend in February:


TFeb = (0.5) (BFeb – BJan) + (1 – 0.5) (TJan)
= (0.5) (956 – 1020) + (0.5) (0) = -32 (negative trend)

⚫ The adjusted forecast in February is:


FFeb = BFeb + TFeb = 956 - 32 = 924
Exponential smoothing with Trend (Holt's
Model): Example

Month Demand Base Trend F


Dec 1020 1020 0 1020
Jan 940 1020 0 1020
Feb 920 956 -32 924
Mar 950 920.8 -33.6 887.2
Apr
May
June
Exponential smoothing with Trend (Holt's
Model): Example

⚫ One can use the same trend to estimate the forecasts after k months
(this assumes that the trend remains the same).
Ft+k = Ft + k Tt = Bt + (k+1)Tt
⚫ Adjusted Forecast for June (consider k = 3) :
FJuin = BMar + 4 * TMar = 920.8 + (4) * (-33.6) = 786.4
Month Demand Base Trend F
Dec 1020 1020 0 1020
Jan 940 1020 0 1020
Feb 920 956 -32 924
Mar 950 920.8 -33.6 887.2
Apr
May
June 786.4
Exponential Smoothing with Trend and
Seasonality (Holt-Winters Model)
Exponential Smoothing with Trend and
Seasonality (Holt-Winters Model)

⚫ Algorithm at time period t :


• Initialization of the seasonality
The seasonal coefficients in the first time periods (t=1..m)
can be estimated as: the demand at t (Dt) divided by the
average of the m first demands ( D ) :

St = Dt / D for t=1..m

• Initialization of the trend (Tt -1) and the base (Bt -1)
• Calculation of Bt , Tt , St
• Calculation of the adjusted forecast at time period t is :
Ft = ( B t + Tt )S t−m
Exponential Smoothing with Trend and
Seasonality (Holt-Winters Model): Example

⚫ Apply the Holt-Winters model to the following data:

Month Demand Base (B) Trend (T) Seasonality (S) Forecast (F)
1 990 ?
2 970 ?
3 1010 990 0 ?
4 1020 ? ? ? ?
5 980 ? ? ? ?
6 960 ? ? ? ?
7 1000 ? ? ? ?

Smoothing coefficients: a = 0.8;  = 0.5 et g = 0.2


The three first periods are used to initialize the base and the seasonality (m = 3).
Initialize the trend in period 3 as T3=0 and the base B3=990.
Calculate the adjusted forecasts for the periods 4 to 7
Exponential Smoothing with Trend and
Seasonality (Winters Model): Example

⚫ The results are given in the following table:

Month Demand Base (B) Trend (T) Seasonality (S) Forecast (F)
1 990 1,000
2 970 0,980
3 1010 990 0 1,020
4 1020 1006 8 1,003 1014
5 980 1035,625 18,812 0,973 1033,135
6 960 979,363 -18,725 1,012 980,045
7 1000 957,996 -20,046 1,011 940,561
Example of a time series: Forecasting results

Single exponentiel smoothing

Holt's Model Winters's Model


Quantitative Methods :
Advantages and drawbacks
Advantages :
⚫ They are quick to use if the model is already developed

⚫ The data gathering does not require a high cost since the historical data
are often stored in the information systems

Drawbacks :
⚫ They don't take into account the new effects :

« Manage a company by only considering the time series methods in


forecasting is like driving a car by only looking at the rearview mirror»
When to use extrapolation and causal methods

Situation where future Yes


demand has strong Use extrapolation methods
enough similarity with
historical data
No

Situation where the variable to be Yes


forecasted has a strong enough link with Use causal
one more variables whose future values methods
are known or easier to forecast

No

Rely on qualitative
methods
For mid term and short term decisions, most companies use a forecasting approach
that relies on quantitative methods (mainly extrapolation methods) adjusted by
knowledge of marketing/sales

Quantitative Qualitative
approaches approaches

Expert
Extrapolation Causal
methods judgment
methods

Marketing/Sales

You might also like