Chap2. Data Patterns
Chap2. Data Patterns
Data Patterns
Horizontal
When there is no trend in the data pattern, we deal
with horizontal data pattern.
Forecast Variable
Mean
Time
2.1. Data Pattern
Trend
the long-term component that represents the growth
or decline in the time series over an extended period
of time.
Trend Yt Trend
Yt
t t
Yt Trend Yt
Trend
t t
2.1. Data Pattern
Cyclical
• Observations
exhibit rises and
falls that are not
of a fixed period
• Occurs with
business and
economic
expansions and
contractions.
• Lasts longer
than 1 year.
• Correlated with
business cycles.
2.1. Data Pattern
Seasonal Pattern
A predictable
and repetitive
movement
observed around
a trend line
within a period
of 1 year or less.
2.1. Data Pa ern
Seasonal Pattern
2.1. Data Pattern
The monthly housing sales show strong seasonality within each year, as
well as some strong cyclic behaviour with a period of about 6–10 years.
There is no apparent trend in the data over this period
2.1. Data Pattern
The US treasury bill contracts show results from the Chicago market for 100 consecutive
trading days in 1981.
There is no seasonality, but an obvious downward trend.
Possibly, if we had a much longer series, we would see that this downward trend is
actually part of a long cycle, but when viewed over only 100 days it appears to be a
trend.
2.1. Data Pattern
The daily change in the Google closing stock price has no trend, seasonality or
cyclic behaviour.
There are random fluctuations which do not appear to be very predictable, and
no strong patterns that would help with developing a forecasting model.
2.1. Data Pattern
Autocorrelated Pa ern
• Data in one period are related to their values in the
previous period.
• Generally, if there is a high posi ve
autocorrela on, the value in the month of June, for
example, is posi vely related to the values in the
month of May.
• This pa ern is more fully discussed when we talk
about the Box–Jenkins methodology.
2.1. Data Pattern
Autocorrelated Pattern
2.1. Data Pattern
Autocorrelated Pa ern
2.1. Data Pattern
Autocorrelated Pattern
Covariance and correlation: measure extent of linear
relationship between two variables (y and x).
Autocovariance and autocorrelation: measure linear
relationship between lagged values of a time series
y.
We measure the relationship between:
yt and yt−1
yt and yt−2
yt and yt−3
etc.
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Artwork by @allison_horst
2.1. Data Pattern
Autocorrelated Pattern
The correlogram or autocorrelation function is a graph of the
autocorrelations for various lags of a time series.
2.1. Data Pattern
Autocorrelated Pa ern
Time series that show no autocorrela on are called white noise
Autocorrelated Pattern
Autocorrelation coefficients for different time lags for a
variable can be used to answer the following questions about
a time series:
1. Are the data random?
2. Do the data have a trend (nonstationary)?
3. Are the data seasonal?
4. Are the data stationary?
2.1. Data Pattern
Autocorrelated Pa ern
1. Are the data random?
• If a series is random, the autocorrela ons between Yt and
Yt-k for any me lag k are close to zero.
• The successive values of a me series are not related to
each other
2.1. Data Pattern
Autocorrelated Pattern
2. Do the data have a trend (nonstationary)?
• If a series has a trend, successive observations are highly
correlated.
• rk typically are significantly different from zero for the first several
time lags
• rk gradually drop toward zero as the number of lags k increases
2.1. Data Pattern
Autocorrelated Pa ern
3. Are the data seasonal?
• If a series is seasonal, a pa ern related to the calendar
repeats itself over a par cular interval of me (usually a
year).
• Observa ons in the same posi on for different seasonal
periods tend to be related.
• If quarterly data with a seasonal pa ern are analyzed, a significant
autocorrela on coefficient will appear at me lag 4.
• If monthly data are analyzed, a significant autocorrela on
coefficient will appear at me lag 12.
2.1. Data Pattern
Autocorrelated Pattern
Trend and seasonality in ACF plots
When data have a trend, the autocorrelations for
small lags tend to be large and positive.
When data are seasonal, the autocorrelations will
be larger at the seasonal lags (i.e., at multiples of
the seasonal frequency)
When data are trended and seasonal, you see a
combination of these effects.
2.1. Data Pattern
Autocorrelated
Pa ern
When data are seasonal,
the autocorrelations will be
larger at the seasonal lags
(i.e., at multiples of the
seasonal frequency)
• r4 higher than for the other lags. This is due to the seasonal pattern in the
data: the peaks tend to be 4 quarters apart and the troughs tend to be 2
quarters apart.
• r2 is more negative than for the other lags because troughs tend to be 2
quarters behind peaks
2.1. Data Pattern
Autocorrelated
Pa ern
When data have a
trend, the
autocorrelations for
small lags tend to be
large and positive.
2.1. Data Pattern
Autocorrelated
Pattern
2.1. Data Pa ern
Which is which?
2.1. Data Pattern
Autocorrelated Pattern
4. Are the data stationary?
• A stationary time series is one whose mean and variance remain
constant over time.
• Consequently, a stationary series that varies about a fixed level
(no growth or decline) over time.
2.1. Data Pa ern
Autocorrelated Pattern
4. Are the data stationary?
If {yt} is a stationary time series, then for all s, the
distribution of (yt, . . . , yt+s) does not depend on t.
A stationary series is:
roughly horizontal
constant variance
no patterns predictable in the long-term
2.1. Data Pattern
Autocorrelated Pa ern
4. Are the data sta onary?
How to identify non-stationary series?
time plot.
The ACF of stationary data drops to zero relatively
quickly
The ACF of non-stationary data decreases slowly.
For non-stationary data, the value of r1 is often
large and positive.
Note: Some cases can be confusing — a time series with cyclic behaviour (but with
no trend or seasonality) is stationary. This is because the cycles are not of a fixed
length, so before we observe the series we cannot be sure where the peaks and
troughs of the cycles will be.
2.1. Data Pattern
Autocorrelated Pa ern
4. Are the data sta onary?
Which of these series stationary?
2.1. Data Pattern
Error in Forecasting
ˆ
et Yt Yt
• Measures the average error that can be expected
over time.
• The average error concept has some problems with it.
The positive and negative values cancel each other
out and the mean is very likely to be close to zero.
2.2. Measures of Accuracy in Forecasting
• MAPE, MPE is scale independent but is only sensible if yt >> 0 for all i,
and y has a natural zero.
• MPE is used to determine whether a forecasting method is biased
(consistently forecasting low or high).
If the forecasting approach is unbiased, MPE ~ 0.
If the result is a large negative percentage, the forecasting
method is consistently overestimating.
If the result is a large positive percentage, the forecasting method
is consistently underestimating.
2.2. Measures of Accuracy in Forecasting
• Qualita ve Models
• Technological Approaches
2.3. Technique Selection
Quantitative Models
• Also known as statistical models.
• Quantitative Models
• An example of a quantitative model is shown below:
Yt 1 0 1Yt 2Yt 1
Y t 1 = Sales one time period into the future
Yt = Sales in the current period
Yt 1 = Sales in the last period
2.3. Technique Selection
Qualitative Models
• Non-statistical or judgment models
• Expert opinion
• Executive opinion
• Focus groups
• Delphi method
2.3. Technique Selection
Technological Approach
• Combines quan ta ve and qualita ve methods.
• Level of detail
Pa ern of data
Type of model
Examples:
the number of breakdowns per week on an assembly line having a
uniform production rate,
the unit sales of a product or service in the maturation stage of its life
cycle,
Examples:
changing income to per capita income
• moving averages,
Examples
the demands for electronic components, which increased with the
advent of the computer
Examples
the sales revenues of consumer goods,
Examples:
salaries,
production costs,
prices
2.3. Technique Selection
Examples:
salaries,
produc on costs,
Prices
Simple Regression,
Growth Curves,
Exponential Models,
30
25
20
15
Cumulative Error
10 Model A
5 Model B
0 Model C
-5 Model D
-10
-15
-20
-25
Time
2.4. Model Evaluation
Actual Change
Y
Actual Change
400
300
200
Forecast Change
100
0
-300 -200 -100 0 100 200 300 400
-100
-200
-300
-400
Chapter Summary
• Data Patterns
• Forecasting Methodologies
• Technique Selection
• Model Evaluation