CH03 - Forecasting Part 1
CH03 - Forecasting Part 1
1
Learning Objectives of
chapter 3
2
Budgeting & Cost Control
Dependent demand:
the demand for a product or service caused by
the demand for other products or services.
it is demand that must be met.
Independent demand
Independent demand:
the demand for a product or service that
cannot be derived directly from that of other
products.
4
Examples:
Independent demand Dependent demand
Bicycle Wheels
Pizza Flour
5
Types of Forecasting
Main types of forecasts
Qualitative
Mathematical model
Quantitative: Time series analysis
It is a quantitative approach
One can construct time series regarding any
data collected over time:
demand, temperature, population, etc. Computing
Time series analysis is based on the idea that
data relating to past demand can be used to
predict future demand.
In this course we will focus on time series
for demand.
6
Examples of time series
Treasury bill
7
Examples of time series
e-retail [B2C e-commerce]
is retail through Internet
Source: https://www.businessinsider.sg/ecommerce-percent-retail-sales-charts-2018-5/ 8
Examples of time series
Apple stock share price over time Apple stock share
Source: https://bit.ly/2kDlZBf 9
Quantitative Demand Forecasting
Source: https://youtu.be/kKm8noEnl5w 10
Characteristics of time series
[decomposition]
Average
demand for
Trend
a period of
time
Cyclical
Seasonality
elements
Random Autocorrelat
variation ion
11
Example 1
Average
demand for
Trend
a period of
time
Cyclical
Seasonality
elements
Random Autocorrelat
variation ion
Source: https://www.yinglinglow.com/blog/2018/08/09/An-Intro-To-TimeSeries-Decomposition 12
Example 2
Observed Data
Average
demand for Trend Seasonality
a period of
time
Source: https://serialmentor.com/dataviz/visualizing-trends.html 13
Trends
Identification of trend lines is a common starting point when
developing a forecast
A trend exists when
there is a long-term increase or decrease in the data. Trend
14
Seasonal and cyclical
patterns
A seasonal pattern exists when a time series is
• influenced by seasonal factors
• Examples: the quarter of the year, the month, or day of Seasonality
the week.
Cyclical
A cyclic pattern exists when data exhibit elements
• rises and falls that are not of fixed period.
Random variation:
Random
• Variability of a process
Variation
• caused by many irregular and erratic
fluctuations or chance factors that, in practical
terms,
• cannot be anticipated, detected, identified or 16
Further Reading
Source: http://www.grroups.com/blog/components-of-time-series-data 17
How to perform
decomposition ? ANSWER:
Specialized
functions
Ex:
seasonal_decomp
ose()
in Pandas Python
library
Source: https://www.cbcity.de/timeseries-decomposition-in-python-with-statsmodels-and-pandas
18
Example: Time series prediction (using
BigML)
Observed data
Prediction
Source: http://ertekprojects.com/ftp/cet2018/CET_2018_Dubai_Dr_Gurdal_Ertek.pdf 19
Time Series Analysis
Using the past to predict the future
Short term – forecasting less than three
months
• Used mainly for tactical decisions
Stationary,
Short to
Linear regression 10 to 20 observations trend, and
Medium
seasonality 21
Terminology and notation
Terminology and notation
t period index
Example:
On Tuesday, the temperature forecast for Wednesday
is 25C.
On Wednesday, the temperature turns out to be 27C.
In this case, F
wed=25C, but Awed=27C.
22
Forecasting methods for
stationary data
A data is said stationary when demand is
not growing or declining rapidly and there is
no seasonality or trend
Most commonly used methods with
stationary data are:
Simple moving average
Weighted moving average
Exponential smoothing Stationary Demand
demand
time
23
Simple Moving Average
Forecast in future period (t) is the average of
the realized values in the past n periods (periods
)
Notation
: period index
forecasted value (predicted value) for period t
24
Simple Moving Average –
Example
Demand
Week (realized)
1 800
2 1400
3 1000
When we are in week 5, the real demand turns out to be 1500, hence
=1500. 26
Simple Moving Average –
Example
Continuing with simple moving averages with n=3, and
registering the demand as we advance in time, we obtain:
Demand
Week (realized) Forecasted
1 800
2 1400
3 1000
4 1500 1067
5 1500 1300
6 1300 1333
7 1800 1433
8 1700 1533
9 1300 1600
10 1700 1600
11 1700 1567
12 1500 1567
13 2300 1633
14 2300 1833 27
Simple Moving Average –
Exercise
Assume: We start with the data for the first 9 weeks and forecast
the demand
for week 10 with a simple moving average with 9 periods (weeks)
Check whether you obtain theForecasted
values in the table below (rounded to
Week
the nearest Demand (realized)
integer) demand
1 800
2 1400
3 1000
4 1500
5 1500
6 1300
7 1800
8 1700
9 1300
10 1700 1367
11 1700 1467
12 1500 1500
13 2300 1556
14 2300 1644 28
Selecting the length of the period
Longer periods • 3-week forecast follows better • Choosing short periods alway
provide smoother forecasts
the changes in demand, is not advisable:
Shorter periods • 9-week forecast is smoother. • One may react too strongly
react to trends more quickly
to temporary variations.
29
Weighted Moving Average
Disadvantage of simple moving
average:
All periods are equally important
𝑤𝑛
that are considered in the forecast
Remark:
weights
31
Weighted Moving Average
Example:
If =6 then
33
34
35
Homework Part 1
8,
11,
13 (only a and b),
15 (only a, b and c)
36
Thank you.
Your
Questions?
37