Time Series Analysis
& Forecasting
CS5122 DESCRIPTIVE & PREDICTIVE ANALYTICS
DILUM BANDARA
DILUM.BANDARA@UOM.LK
Some slides adapted from business analytics: Methods, models, and
decisions, 1st edition by James R. Evans
Example - Monthly International
Airline Passengers
Source: Time Series Analysis: Forecasting and Control by Box and Jenkins (1976)
2
Example – Human
Electrocardiogram (ECG)
Source: Time Series Analysis by N. Janson
3
time
voltage ~ 1 sec
System, Process, & Signal
Source: Time Series Analysis by N. Janson
A collection of observations of state variables made sequentially in time
◦ Can be Univariate, Bivariate, or Multivariate
4
System
State variable 1
State variable 2
Signals
Time-Series Components
5
Time Series
Cyclical
Component
Irregular
Component
Trend
Component
Seasonal
Component
Overall,
persistent, long-
term movement
Regular periodic
fluctuations,
usually within a
day or 12-month
period
Repeating swings
or movements
over more than
one year
Erratic or residual
fluctuations
Trend Component
6
Sales
Time
Downward linear trend
Sales
Time
Upward nonlinear trend
Time
Sales
Seasonal Component
7
Sales
Time (Quarterly)
Winter
Spring
Summer
Fall
Winter
Spring
Summer
Fall
Cyclical Component
8
Sales
1 Cycle
Year
Forecasting
 Managers require good forecasts of future event(s)
 Business Analysts may choose from a wide range of
forecasting techniques to support decision making
 3 major forecasting approaches
1. Qualitative & judgmental techniques
2. Statistical time-series models
3. Explanatory/causal models
9
3 Major Forecasting Approaches
Used when historical data are
unavailable
Considered highly subjective and
judgmental
Common Approaches to
Forecasting
Causal
Quantitative forecasting methods
Qualitative forecasting methods
Time Series
Use past data to predict future
values
10
Qualitative & Judgmental
Forecasting
 Rely on experience & intuition
 They are necessary when historical data is not
available or when predictions are needed far into
the future
 Historical analogy approach obtains a forecast
through comparative analysis with prior situations
 Delphi method questions an anonymous panel of
experts 2-3 times in order to reach a convergence of
opinion on forecasted variable
11
Example – Predicting Price of
Oil
 Early 1988 – oil price was about $22 a barrel
 Mid-1988 – oil price dropped to $11 a barrel
 Price decrease due to oversupply/lower demand
 OPEC eventually reduced supply
 In 2000 – price rose to $27
 Late 2001 – price dropped to $23
12
Example – Natural Gas Usage
13
Statistical Forecasting Models
Simple Models
1. Simple Moving Average (SMA)
2. Simple Exponential Smoothing
Time Series with Linear Trends
1. Double moving average
2. Double exponential smoothing
3. Simple linear regression
 These are based on the linear trend equation Ft+k = at + bt k
 Forecast for k periods into the future is a function of level at and
the trend bt
 Models differ in their computations of at and bt
14
Simple Moving Average (SMA)
Method
A smoothing method
Averages random fluctuations in a times series
Assumes future observations will be similar to the recent past
A k-period (window) moving average averages the most recent k
observations
Larger k results in smoother forecast models
15
Example – Annual Data
16
Year Sales
1
2
3
4
5
6
7
8
9
10
11
etc…
23
40
25
27
32
48
33
37
37
50
40
etc…
Annual Sales
0
10
20
30
40
50
60
1 2 3 4 5 6 7 8 9 10 11
Year
Sales
Example – Annual Data (Cont.)
17
Each moving average is for a consecutive block
of 5 years
Year Sales
1 23
2 40
3 25
4 27
5 32
6 48
7 33
8 37
9 37
10 50
11 40
Average
Year
5-Year
Moving
Average
3 29.4
4 34.4
5 33.0
6 35.4
7 37.4
8 41.0
9 39.4
… …
5
5
4
3
2
1
3





5
32
27
25
40
23
29.4





Example – Annual Data (Cont.)
5-year moving average smoothers data & makes it easier to
see the underlying trend
18
Annual vs. 5-Year Moving Average
0
10
20
30
40
50
60
1 2 3 4 5 6 7 8 9 10 11
Year
Sales
Annual 5-Year Moving Average
Simple Exponential Smoothing
Method
α – smoothing constant between 0 and 1
α close to 0 – biased to past, capture long-term
trend
α close to 1 – biased to present, respond quickly
19
Error Metrics to Compare
Forecasts
20
Mean Absolute Deviation Root Mean Squared Error
Mean Squared Error Mean absolute % Error
Linear Trends Forecasting
21
Double Exponential Smoothing of Coal
Production data 1960-2007
Linear Regression of Coal Production data
X
b
b
Ŷ 1
0 

Forecasting Models with
Seasonality
1. Linear Regression using dummy variables
2. Holt-Winters models
1. Additive – stable seasonality
2. Multiplicative – amplitude changes over time
3 parameters are use to smooth:
 level, α
 trend, β
 seasonality, γ
22
Forecasting Natural Gas Usage Using Holt-Winters No-Trend Model
Capturing Seasonality & Trend
23
Autoregressive Modeling
Takes advantage of autocorrelation
◦ 1st order - correlation between consecutive values
◦ 2nd order - correlation between values 2 periods apart
pth order Autoregressive model
24
i
p
-
i
p
2
-
i
2
1
-
i
1
0
i Y
A
Y
A
Y
A
A
Y δ





 
Random Error
Forecasting with
Causal Variables
Sales of fuel is influenced by fuel price
Predict gasoline sales using both time & price per gallon
◦ Price per gallon is a causal variable
◦ Causal or explanatory variables may influence the time series
25
Forecasting in Practice
Judgmental & Qualitative methods are used for forecasting
sales of product lines & broad company & industry
forecasts.
Simple time-series models are used for short- & medium-
range forecasts.
Regression methods are typically used for long-term
forecasts
Beware of:
◦ Assuming mechanism that governs the time series behavior in the past will
still hold in the future
◦ Using mechanical extrapolation of trend to forecast future without
considering personal judgments, business experiences, changing
technologies, & habits
26

More Related Content

PPT
Time series mnr
PPT
Applied Statistics Chapter 2 Time series (1).ppt
PDF
Industrial engineering sk-mondal
PPTX
Forecasting and methods of forecasting
PPTX
Forecasting techniques for operations.pptx
PPT
Ch3. Demand Forecasting.ppt
PDF
Supply, Production and Cost Analysis
PPTX
Module 3 - Time Series.pptx
Time series mnr
Applied Statistics Chapter 2 Time series (1).ppt
Industrial engineering sk-mondal
Forecasting and methods of forecasting
Forecasting techniques for operations.pptx
Ch3. Demand Forecasting.ppt
Supply, Production and Cost Analysis
Module 3 - Time Series.pptx

Similar to Time Series Analysis and Forecasting in Practice (20)

PPTX
Trend analysis and time Series Analysis
PPTX
Time series data analysis - Introduction to
PPTX
Inflation transmission mechanism of inflation in ecuador after
PPT
Managerial_Economics_Ch4_1.ppt
PPT
Managerial_Economics_Ch4_1 (1).ppt
PPT
Forecasting
PPTX
Time Series Analysis.pptx
PPTX
Models Of The Short Rate
PPT
Wavelet Multi-resolution Analysis of High Frequency FX Rates
PPTX
Chapter-3_Heizer_S1.pptx
PPT
Lesson08_static11
PPTX
forecasting.pptx
PPT
OPM101Chapter.ppt
PPTX
Multivariate analysis
PPT
Lesson08_new
PPTX
SRAS SFLS
PPT
MACROECONOMICS-CH9
ZIP
Demand forecasting
PPTX
Demand forecasting.
Trend analysis and time Series Analysis
Time series data analysis - Introduction to
Inflation transmission mechanism of inflation in ecuador after
Managerial_Economics_Ch4_1.ppt
Managerial_Economics_Ch4_1 (1).ppt
Forecasting
Time Series Analysis.pptx
Models Of The Short Rate
Wavelet Multi-resolution Analysis of High Frequency FX Rates
Chapter-3_Heizer_S1.pptx
Lesson08_static11
forecasting.pptx
OPM101Chapter.ppt
Multivariate analysis
Lesson08_new
SRAS SFLS
MACROECONOMICS-CH9
Demand forecasting
Demand forecasting.
Ad

More from Dilum Bandara (20)

PPTX
Designing for Multiple Blockchains in Industry Ecosystems
PPTX
Introduction to Machine Learning
PPTX
Introduction to Dimension Reduction with PCA
PPTX
Introduction to Descriptive & Predictive Analytics
PPTX
Introduction to Concurrent Data Structures
PPTX
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
PPTX
Introduction to Map-Reduce Programming with Hadoop
PPTX
Embarrassingly/Delightfully Parallel Problems
PPTX
Introduction to Warehouse-Scale Computers
PPTX
Introduction to Thread Level Parallelism
PPTX
CPU Memory Hierarchy and Caching Techniques
PPTX
Data-Level Parallelism in Microprocessors
PDF
Instruction Level Parallelism – Hardware Techniques
PPTX
Instruction Level Parallelism – Compiler Techniques
PPTX
CPU Pipelining and Hazards - An Introduction
PPTX
Advanced Computer Architecture – An Introduction
PPTX
High Performance Networking with Advanced TCP
PPTX
Introduction to Content Delivery Networks
PPTX
Peer-to-Peer Networking Systems and Streaming
PPTX
Mobile Services
Designing for Multiple Blockchains in Industry Ecosystems
Introduction to Machine Learning
Introduction to Dimension Reduction with PCA
Introduction to Descriptive & Predictive Analytics
Introduction to Concurrent Data Structures
Hard to Paralelize Problems: Matrix-Vector and Matrix-Matrix
Introduction to Map-Reduce Programming with Hadoop
Embarrassingly/Delightfully Parallel Problems
Introduction to Warehouse-Scale Computers
Introduction to Thread Level Parallelism
CPU Memory Hierarchy and Caching Techniques
Data-Level Parallelism in Microprocessors
Instruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Compiler Techniques
CPU Pipelining and Hazards - An Introduction
Advanced Computer Architecture – An Introduction
High Performance Networking with Advanced TCP
Introduction to Content Delivery Networks
Peer-to-Peer Networking Systems and Streaming
Mobile Services
Ad

Recently uploaded (20)

PDF
Decision Optimization - From Theory to Practice
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Streamline Vulnerability Management From Minimal Images to SBOMs
PPTX
How to Convert Tickets Into Sales Opportunity in Odoo 18
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PPTX
How to use fields_get method in Odoo 18
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
Altius execution marketplace concept.pdf
PDF
NewMind AI Journal Monthly Chronicles - August 2025
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PPTX
Presentation - Principles of Instructional Design.pptx
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PDF
substrate PowerPoint Presentation basic one
PDF
Launch a Bumble-Style App with AI Features in 2025.pdf
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Decision Optimization - From Theory to Practice
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Streamline Vulnerability Management From Minimal Images to SBOMs
How to Convert Tickets Into Sales Opportunity in Odoo 18
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
How to use fields_get method in Odoo 18
NewMind AI Weekly Chronicles – August ’25 Week IV
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
Altius execution marketplace concept.pdf
NewMind AI Journal Monthly Chronicles - August 2025
Data Virtualization in Action: Scaling APIs and Apps with FME
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
A symptom-driven medical diagnosis support model based on machine learning te...
Presentation - Principles of Instructional Design.pptx
Report in SIP_Distance_Learning_Technology_Impact.pptx
substrate PowerPoint Presentation basic one
Launch a Bumble-Style App with AI Features in 2025.pdf
Co-training pseudo-labeling for text classification with support vector machi...
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf

Time Series Analysis and Forecasting in Practice

  • 1. Time Series Analysis & Forecasting CS5122 DESCRIPTIVE & PREDICTIVE ANALYTICS DILUM BANDARA [email protected] Some slides adapted from business analytics: Methods, models, and decisions, 1st edition by James R. Evans
  • 2. Example - Monthly International Airline Passengers Source: Time Series Analysis: Forecasting and Control by Box and Jenkins (1976) 2
  • 3. Example – Human Electrocardiogram (ECG) Source: Time Series Analysis by N. Janson 3 time voltage ~ 1 sec
  • 4. System, Process, & Signal Source: Time Series Analysis by N. Janson A collection of observations of state variables made sequentially in time ◦ Can be Univariate, Bivariate, or Multivariate 4 System State variable 1 State variable 2 Signals
  • 5. Time-Series Components 5 Time Series Cyclical Component Irregular Component Trend Component Seasonal Component Overall, persistent, long- term movement Regular periodic fluctuations, usually within a day or 12-month period Repeating swings or movements over more than one year Erratic or residual fluctuations
  • 6. Trend Component 6 Sales Time Downward linear trend Sales Time Upward nonlinear trend Time Sales
  • 9. Forecasting  Managers require good forecasts of future event(s)  Business Analysts may choose from a wide range of forecasting techniques to support decision making  3 major forecasting approaches 1. Qualitative & judgmental techniques 2. Statistical time-series models 3. Explanatory/causal models 9
  • 10. 3 Major Forecasting Approaches Used when historical data are unavailable Considered highly subjective and judgmental Common Approaches to Forecasting Causal Quantitative forecasting methods Qualitative forecasting methods Time Series Use past data to predict future values 10
  • 11. Qualitative & Judgmental Forecasting  Rely on experience & intuition  They are necessary when historical data is not available or when predictions are needed far into the future  Historical analogy approach obtains a forecast through comparative analysis with prior situations  Delphi method questions an anonymous panel of experts 2-3 times in order to reach a convergence of opinion on forecasted variable 11
  • 12. Example – Predicting Price of Oil  Early 1988 – oil price was about $22 a barrel  Mid-1988 – oil price dropped to $11 a barrel  Price decrease due to oversupply/lower demand  OPEC eventually reduced supply  In 2000 – price rose to $27  Late 2001 – price dropped to $23 12
  • 13. Example – Natural Gas Usage 13
  • 14. Statistical Forecasting Models Simple Models 1. Simple Moving Average (SMA) 2. Simple Exponential Smoothing Time Series with Linear Trends 1. Double moving average 2. Double exponential smoothing 3. Simple linear regression  These are based on the linear trend equation Ft+k = at + bt k  Forecast for k periods into the future is a function of level at and the trend bt  Models differ in their computations of at and bt 14
  • 15. Simple Moving Average (SMA) Method A smoothing method Averages random fluctuations in a times series Assumes future observations will be similar to the recent past A k-period (window) moving average averages the most recent k observations Larger k results in smoother forecast models 15
  • 16. Example – Annual Data 16 Year Sales 1 2 3 4 5 6 7 8 9 10 11 etc… 23 40 25 27 32 48 33 37 37 50 40 etc… Annual Sales 0 10 20 30 40 50 60 1 2 3 4 5 6 7 8 9 10 11 Year Sales
  • 17. Example – Annual Data (Cont.) 17 Each moving average is for a consecutive block of 5 years Year Sales 1 23 2 40 3 25 4 27 5 32 6 48 7 33 8 37 9 37 10 50 11 40 Average Year 5-Year Moving Average 3 29.4 4 34.4 5 33.0 6 35.4 7 37.4 8 41.0 9 39.4 … … 5 5 4 3 2 1 3      5 32 27 25 40 23 29.4     
  • 18. Example – Annual Data (Cont.) 5-year moving average smoothers data & makes it easier to see the underlying trend 18 Annual vs. 5-Year Moving Average 0 10 20 30 40 50 60 1 2 3 4 5 6 7 8 9 10 11 Year Sales Annual 5-Year Moving Average
  • 19. Simple Exponential Smoothing Method α – smoothing constant between 0 and 1 α close to 0 – biased to past, capture long-term trend α close to 1 – biased to present, respond quickly 19
  • 20. Error Metrics to Compare Forecasts 20 Mean Absolute Deviation Root Mean Squared Error Mean Squared Error Mean absolute % Error
  • 21. Linear Trends Forecasting 21 Double Exponential Smoothing of Coal Production data 1960-2007 Linear Regression of Coal Production data X b b Ŷ 1 0  
  • 22. Forecasting Models with Seasonality 1. Linear Regression using dummy variables 2. Holt-Winters models 1. Additive – stable seasonality 2. Multiplicative – amplitude changes over time 3 parameters are use to smooth:  level, α  trend, β  seasonality, γ 22 Forecasting Natural Gas Usage Using Holt-Winters No-Trend Model
  • 24. Autoregressive Modeling Takes advantage of autocorrelation ◦ 1st order - correlation between consecutive values ◦ 2nd order - correlation between values 2 periods apart pth order Autoregressive model 24 i p - i p 2 - i 2 1 - i 1 0 i Y A Y A Y A A Y δ        Random Error
  • 25. Forecasting with Causal Variables Sales of fuel is influenced by fuel price Predict gasoline sales using both time & price per gallon ◦ Price per gallon is a causal variable ◦ Causal or explanatory variables may influence the time series 25
  • 26. Forecasting in Practice Judgmental & Qualitative methods are used for forecasting sales of product lines & broad company & industry forecasts. Simple time-series models are used for short- & medium- range forecasts. Regression methods are typically used for long-term forecasts Beware of: ◦ Assuming mechanism that governs the time series behavior in the past will still hold in the future ◦ Using mechanical extrapolation of trend to forecast future without considering personal judgments, business experiences, changing technologies, & habits 26