Time series and forecasting
techniques
Lecturer: Ha Thi Xuan Chi,
PhD
1-2
General Information
Textbook:
Introduction to Time Series and Forecasting (2nd Edition).
P. J. Brockwell and R. A. Davis
Introduction to Time Series and Forecasting. Montgomery
et al., Publisher: J. Wiley & Sons
Grading:
– Midterm examination 30%
– Homework/Quizzes/Project 30%
– Final examination: 40%
Teaching Assistant:
2
1-3
General Information
Missed test/homework policy:
No make-up quiz
Unable to take a quiz: notify the instructor in advance
with acceptable excuse and arrange time to take it
prior to the quiz
No late homework. Submit homework at the beginning
of the class.
Attendance/Participation:
Regular attendance and active participation are
expected.
Regular check for attendance 3
1-4
Outline of the course
Lecture 1: Introduction
Lecture 2: Statistic overview for forecasting
Lecture 3: Regression analysis
Lecture 4: Stationary processes (basic AR, MA
models)
Lecture 5: Finite order ARMA Models
Lecture 6: Finite order ARIMA Models
Lecture 7: Non-stationary and seasonal models
Lecture 8: State-space models
4
Chapter 1
Introduction to Time
series and forecasting
1-6
Learning objectives
1. What is forecasting?
2. Characteristics of forecasts
3. Forecasting methods
4. What is time series?
5. Characteristics of time series data
6. Time series components
7. Forecasting process
6
1-7
Introduction to Forecasting
What is forecasting?
– Primary Function is to Predict the Future
Why are we interested?
– Affects the decisions we make today
1-8
Introduction to Forecasting
Examples: who uses forecasting in their
jobs?
– forecast demand for products and services
– forecast availability of manpower
– forecast inventory and material needs daily
– Strategic planning (long range planning)
– Marketing (future sales, new products)
– Production and operations
1-9
What is forecasting all about?
Demand for Mercedes E Class
We try to predict the future
by looking back at the past
Predicted
demand
looking
Time back six
Jan Feb Mar Apr May Jun Jul Aug months
Actual demand (past sales)
Predicted demand
1-10
What is forecasting all about?
From the March 10, 2006 WSJ:
Ahead of the Oscars, an economics professor, at the
request of Weekend Journal, processed data about
this year's films nominated for best picture through
his statistical model and predicted with 97.4%
certainty that "Brokeback Mountain" would win.
Oops. Last year, the professor tuned his model until
it correctly predicted 18 of the previous 20 best-
picture awards; then it predicted that "The Aviator"
would win; "Million Dollar Baby" won instead.
Sometimes models tuned to prior results don't have
great predictive powers.
1-11
What is forecasting all about?
2020 Election Predictions | Who will be the
next president?
1-12
Characteristics of Forecasts
They are usually wrong! (Why do we use it ?)
A good forecast is more than a single number
– mean and standard deviation
– range (high and low)
More accurate for groups or families of items
More accurate for shorter time periods
Every forecast should include an error estimate
Forecasts are no substitute for calculated demand.
1-14
What Makes a Good Forecast
It should be timely
It should be as accurate as possible
It should be reliable
It should be in meaningful units
It should be presented in writing
The method should be easy to use and understand
in most cases.
– Ease of updating as new data becomes available.
1-15
Key issues in forecasting
A forecast is only as good as the
information included in the forecast (past
data)
History is not a perfect predictor of the
future (i.e.: there is no such thing as a
perfect forecast)
1-16
Key issues in forecasting
REMEMBER: Forecasting is based on the
assumption that the past predicts the future!
When forecasting, think carefully whether
or not the past is strongly related to what
you expect to see in the future…
Example: Mercedes E-class vs. 1-17
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 ? ?
Question: Can we predict the new model
M-class sales based on the data in the the
table?
Example: Mercedes E-class vs. 1-18
M-class Sales
Answer: Maybe... We need to consider
how much the two markets have in common
1-19
Some Important Questions
What is the purpose of the forecast?
Which systems will use the forecast?
How important is the past in estimating the future?
Answers will help determine time horizons,
techniques, and level of detail for the forecast.
1-20
Forecast Horizons in Operation Planning
1-21
Forecasting Methods
Subjective Methods Objective Methods
– Rely on subjective – Forecasts made based
opinions from one on past history and a
or more experts model.
1-22
Subjective Forecasting Methods
Sales Force Composites
– Aggregation of sales personnel estimates
Customer Surveys
» To understand future trends, change in customer view
Jury of Executive Opinion
» Maybe there is a new product etc.
The Delphi Method
– Individual opinions are compiled and reconsidered.
Repeat until and overall group consensus is (hopefully)
reached.
1-23
Objective Forecasting Methods
Two primary methods: causal models and time
series methods
Time Series Models: use only past history.
Easy to incorporate into computer models.
Regression: Causal Model to predict
Quantitative Forecasting 1-24
Methods
Quantitative Forecasting 1-25
Methods
Quantitative
Forecasting
Quantitative Forecasting 1-26
Methods
Quantitative
Forecasting
Time Series
Models
Quantitative Forecasting 1-27
Methods
Quantitative
Forecasting
Time Series Causal
Models Models
Quantitative Forecasting 1-28
Methods
Quantitative
Forecasting
Time Series Causal
Models Models
Moving Exponential Trend
Average Smoothing Models
Quantitative Forecasting 1-29
Methods
Quantitative
Forecasting
Time Series Causal
Models Models
Naive Moving Exponential Trend
Regression
Average Smoothing Models
Quantitative Forecasting 1-30
Methods
Quantitative
Forecasting
Time Series Causal
Models Models
Naive Moving Exponential Trend
Regression
Average Smoothing Models
1-31
What is a Time Series?
A time series is a sequence of observations
taken sequentially in time
Example
– Year: 1995 1996 1997 1998 1999
– Sales: 78.7 63.5 89.7 93.2 92.1
1-32
Time Series data
Time series data is a sequence of
observations:
– collected from a process
– with equally spaced periods of time
– dynamic (change over time)
1-33
Time Series Data
Time series is dynamic, it does
change over time.
1-34
Time Series Data
Data is plotted so the researcher can
view the data
1-35
Time Series Components
1-36
Time Series Components
Trend
1-37
Time Series Components
Trend Cyclical
1-38
Time Series Components
Trend Cyclical
Seasonal
1-39
Time Series Components
Trend Cyclical
Seasonal Irregular
1-40
Trend Component
Overall upward or downward pattern over
time
Response
Mo., Qtr., Yr.
1-41
Trend Component
Overall Upward or Downward Movement
Data Taken Over a Period of Years
d t r en d
Upwa r
Sales
Time
1-42
Cyclical Component
Repeating up & down movements
Due to interactions of factors influencing
economy
Usually 2-10 years duration
Cycle
Response
Mo., Qtr., Yr.
1-43
Cyclical Component
Upward or Downward Swings
May vary in Length
Usually Lasts 2 - 10 Years
Sales Cycle
Time
1-44
Seasonal Component
Seasonality: a regularly repeating pattern
of highs and lows related to calendar time.
EX: seasons, quarters, months, days of the
week, and so on.
Summer
Response
Mo., Qtr.
1-45
Seasonal Component
Upward or Downward Swings
Regular Patterns
Observed Within One Year
Sales Winter
Time (Monthly or Quarterly)
1-46
Irregular Component
Erratic, unsystematic, ‘residual’ fluctuations
Due to random variation or unforeseen
events: War
Short duration & nonrepeating
Random or Irregular 1-47
Component
Erratic, Nonsystematic, Random,
‘Residual’ Fluctuations
Due to Random Variations of
– Nature
– Accidents
Short Duration and Non-repeating
1-48
1-49
Example of Time Series
• no consistent trend
(upward or
downward)
• no seasonality as the
data are annual data.
• no obvious outliers.
• It’s difficult to judge
whether the variance
is constant or not.
49
1-50
Example of Time Series
• upward trend, possibly a curved
one.
• seasonality (regularly repeating
pattern of highs and lows,
quarters )
• no obvious outliers.
• There might be increasing
variation as we move across time,
although that’s uncertain.
50
1-51
Forecasting process
NO
Problem Data Data Model Selection
Definition Collection Analysis and Fitting
YES
Monitoring Forecasting Model
Forecasting Model Validation
Model Development
Performance
1-52
Homework
Design the forecasting process in supply
chain, production, marketing,…