Time Series
Learning Objectives
Describe what forecasting is
Explain time series & its components
Smooth a data series
Moving average
Exponential smoothing
Forecast using trend models
Simple Linear Regression
Auto-regressive
Time Series Analysis and Forecasting
Forecasting Methods
Time Series Patterns
Forecast Accuracy
Moving Averages and Exponential Smoothing
Forecasting Methods: Qualitative
Forecasting methods can be classified as qualitative or
quantitative.
Qualitative methods generally involve the use of expert
judgment to develop forecasts.
Such methods are appropriate when historical data on
the variable being forecast are either not applicable or
unavailable.
We will focus exclusively on quantitative forecasting
methods in this chapter.
Forecasting Methods: Quantitative
Quantitative forecasting methods can be used when:
past information about the variable being forecast
is available,
the information can be quantified, and
it is reasonable to assume that the pattern of the
past will continue into the future.
In such cases, a forecast can be developed using a time
series method or a causal method.
What Is Forecasting?
Process of predicting a
future event
Provides guidance for
decisions in all areas of
business
Production
Inventory
Personnel
Facilities
Forecasting Approaches
Qualitative Methods Quantitative Methods
Used when situation is Used when situation is
vague & little data exist ‘stable’ & historical data
New products exist
New technology Existing products
Involve Current technology
intuition,
experience Involve mathematical
e.g., forecasting sales on techniques
Internet e.g., forecasting sales,
inflation and housing
starts.
Quantitative Forecasting
Select several forecasting methods
‘Forecast’ the past
Evaluate forecasts
Select best method
Forecast the future
Monitor continuously forecast accuracy
Forecasting Methods: Quantitative
Quantitative methods are based on an analysis of
historical data concerning one or more time series.
A time series is a set of observations measured at
successive points in time or over successive periods of
time.
If the historical data used are restricted to past values
of the series that we are trying to forecast, the
procedure is called a time series method.
If the historical data used involve other time series that
are believed to be related to the time series that we are
trying to forecast, the procedure is called a causal
method.
Quantitative Forecasting
Methods
Quantitative
Forecasting
Time Series Causal
Models Models
Moving Exponential Trend
Regression
Average Smoothing Models
What is a Time Series?
Set of numeric data of a random variable that is gathered over time at
regular intervals and arranged in chronological order.
The Forecast based only on past values of the variable and/or past
forecast errors
Assumes that factors influencing past, present, & future will continue
Example
Year: 1995 1996 1997 1998 1999
Sales: 78.7 63.5 89.7 93.2 92.1
Time Series
The major purpose of forecasting with time
series is to discover a pattern in the
historical data or time series and then
extrapolate beyond the range of
the explanatory
variables.
Time Series Patterns
A time series is a sequence of measurements taken
every hour, day, week, month, quarter, year, or at any
other regular time interval.
The pattern of the data is an important factor in
understanding how the time series has behaved in the
past.
If such behavior can be expected to continue in the
future, we can use it to guide us in selecting an
appropriate forecasting method.
Time Series Plot
A useful first step in selecting an appropriate
forecasting method is to construct a time series plot.
A time series plot is a graphical presentation of the
relationship between time and the time series variable.
Time is on the horizontal axis, and the time series
values are shown on the vertical axis.
Time Series Components
Trend Cyclical
Seasonal Irregular
These four environmental forces, individually and collectively determine the value of a time series
Random variable(such as sales, share price)
Trend Component(T)
A time series may show gradual shifts or movements
to relatively higher or lower values over a longer
period of time.
Trend is usually the result of long-term factors such as
changes in the population, demographics, technology,
or consumer preferences.
A systematic increase or decrease might be linear or
nonlinear.
A trend pattern can be identified by analyzing
multiyear movements in historical data.
Response
Mo., Qtr., Yr. © 1984-1994 T/Maker Co.
Cyclical Component(C)
A cyclical pattern exists if the time series plot shows an alternating
sequence of points below and above the trend line lasting more than one
year.
Cycles are medium to long-term deviations from the trend
Repeating up & down movements
Due to interactions of factors influencing economy
Usually 2-10 years duration
Cycles are sometimes caused by mass psychological hysteria
Cycle
Response
Mo., Qtr., Yr.
Seasonal Component
• Seasonal patterns are recognized by seeing the
same repeating pattern of highs and lows over
successive periods of time within a year.
• A seasonal pattern might occur within a day, week,
month, quarter, year, or some other interval no
greater than a year.
• A seasonal pattern does not necessarily refer to the
four seasons of the year (spring, summer, autumn,
and winter).
Irregular Component
Erratic, unsystematic, ‘residual’ fluctuations
Due to random variation or unforeseen events
© 1984-1994 T/Maker Co.
Union strike
War
Short duration &
nonrepeating
Random or Irregular
Component
Erratic, Nonsystematic, Random, ‘Residual’ Fluctuations
Due to Random Variations of
Nature
Accidents
Short Duration and Non-repeating
Decomposition of a time series
Time series analysis aims to
A multiplicative time series states
isolate the influence of each of
that:
the four components on the
‘the actual values of a time series,
actual time series
represented by y, can be found by
Time series model used as the multiplying the trend component
basis for analysing the (measured in actual units, e.g money,
influence of these four quantity) by cyclical index, C (expressed
components assumes a relative to the trend), by a seasonal index, S
multiplicative relationship (expressed relative to T and C), by an
between the four components irregular measure, I.’
The multiplicative time series model is defined, algebraically as:
Actual y = Trend * Cyclical * Seasonal *Irregular
y = T *C * S * I
TREND ANALYSIS
The long-term trend in a time series can be isolated by
removing the medium and short-term fluctuations in the
series. This results in either a smooth curve or a straight line
depending on the method chosen.
The two methods for trend analysis isolation include:
Moving average which produces a smooth curve
Regression analysis which results in a straight line trend
Moving Average Method
Moving Average Method
The moving average method ranks among the most popular techniques
for processing time series.
It is based on computing the average from a fixed number m of the most
recent observations.
Example: a 3-period moving average is formed by averaging the
three most recent observations.
The term ‘moving’ is used because as a new observation becomes
available, the average is updated by including the newest and dropping
the oldest observation
Series of arithmetic means
Used only for smoothing
Provides overall impression of data over time
Moving Average Method
Steps in computing a 3-period moving average series
Step 1: Sum the first three periods observations and position the total
opposite the middle time period.
Step 2: Repeat the summing of the three periods observations by removing
the first period(period 1) and include the next period(period4).
Step 3: continue producing these moving totals until the end of the series is
reached.
Step 4: The moving average series is now computed by dividing each
moving total(i.e m=3)
Note: the process of positioning each moving total opposite the middle time
period of each sum of three observations is called centering
Moving Average
The table below shows the number of insurance claims in
each four-month period, from 2003 to 2006, received by
Hollard Insurance. Compute a 3-period moving average for
the number of fire insurance clams received
Period Claims(y)
2003 P1 7
P2 3
P3 5
2004 P1 9
P2 7
P3 9
2005 P1 12
P2 4
P3 10
2006 P1 13
P2 9
P3 10
Moving Average
Period Claims(y) Centred Moving Avg
2003 P1 7 - -
P2 3 7+3+5=15 5
P3 5 3+5+9=17 5.67
2004 P1 9 5+9+7=21 7
P2 7 9+7+9=25 8.33
P3 9
2005 P1 12
P2 4
P3 10
2006 P1 13
P2 9
P3 10
Exercise: Compute a 5-period moving average from the same example
Linear Time-Series
Forecasting Model
Linear Time-Series
Used for forecasting trend component only
It shows the general direction in which the series is moving.
It is best represented by a straight line
Relationship between response variable Y & time X is a linear function
The dependent variable Y, is the actual time series(e.g sales, breakdowns, output) while the
independent variable x, is time.
To use time as an independent variable in regression analysis, it must be numerically coded.
Coding can be a set of natural numbers
Coded X values used often
Year X: 1995 1996 1997 1998 1999
Coded year: 0 1 2 3 4
Sales Y: 78.7 63.5 89.7 93.2 92.1
Linear Time-Series
Model
Period Houses The number of houses sold quarterly by Valley Estates in the
2003 Q1 54 Cape Peninsula is recorded for the 16 quarters from 2003 to 2006
Q2 58 As shown in the table. The sales director has requested:
Q3
Q4
94
•a trend analysis of the sales data to determine the general
70
2004 Q1 55 direction of quarterly housing sales, and
Q2 61 •an estimate of house sales for the first quarter of 2007
Q3 87
Q4 66
2005 Q1 49
Q2 55 1. Find the trend line for the quarterly house sales data(2003-200
Q3 95 or Valley Estates.
Q4 74
2006 Q1 60
2. Then estimate the likely level of hose sales for the quarter of
Q2 64 2007
Q3 99
Q4 80
Solution
Period House sales Time
x2 xy
n = 16 y x Use sequential natural numbering
2003 Ql 54 1 1 54 system
Q2 58 2 4 116
Q3 94 3 9 282
Q4 70 4 16 280
2004 Ql 55 5 25 275
Q2 61 6 36 366
Q3 87 7 49 609
Q4 66 8 64 528
2005 Ql 49 9 81 441
Q2 55 10 100 550
Q3 95 11 121 1045
Q4 74 12 144 888
2006 Ql 60 13 169 780
Q2 64 14 196 896
Q3 99 15 225 1485
Q4 80 16 256 1280
Totals 1121 136 1496 9 875
Linear Time-Series - Example
For the trend regression line use the following
Note: the numerical coding scheme used to code x must always
Be shown together with the trend line equation
Solution …continued
To estimate the trend value of house sales for quarter 1 of 2007,
identify the value of x that corresponds to 2007 quarter 1. it is the next
sequential value after x=16, corresponding to 2006 quarter 4.
Hence x =17
Trend y = b+bx