0% found this document useful (0 votes)
0 views

Chap2. Data Patterns

Chapter 2 discusses data patterns and the selection of forecasting techniques, emphasizing the importance of understanding data types such as univariate and multivariate, as well as qualitative forecasts. It outlines four primary data patterns: horizontal, trend, seasonal, and cyclical, and differentiates between stationary and nonstationary series. Additionally, it covers measures of forecasting accuracy including MAD, MSE, and MAPE, highlighting their relevance in evaluating forecasting performance.

Uploaded by

hieunhu2003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Chap2. Data Patterns

Chapter 2 discusses data patterns and the selection of forecasting techniques, emphasizing the importance of understanding data types such as univariate and multivariate, as well as qualitative forecasts. It outlines four primary data patterns: horizontal, trend, seasonal, and cyclical, and differentiates between stationary and nonstationary series. Additionally, it covers measures of forecasting accuracy including MAD, MSE, and MAPE, highlighting their relevance in evaluating forecasting performance.

Uploaded by

hieunhu2003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

Chapter 2

Data Patterns and Choice of


Forecasting Techniques
Trang, Ha Thi Thu (PhD)
SEM, HUST
CHAPTER 2

2.1. Data Patterns

2.2. Measures of Accuracy in Forecasting

2.3. Technique Selection

2.4. Model Evaluation


“He who sees the past as surprise-free is bound to
have a future full of surprises.”
(Amos Tversky)
Data Pattern and Choice of Technique

The pattern of data

The nature of the past relationship in the data

The level of subjectivity in making a forecast

 All of the above help us in how we classify the


forecasting technique.
Data Pa ern and Choice of Technique

Univariate forecasting techniques depend on:


-- Past data patterns.

Multivariate forecasting techniques depend on


-- Past relationships.

Qualitative forecasts depend on:


--- Subjectivity: Forecasters intuition.
2.1. Data Pa ern

Data Patterns

 Simple observation of the data will show the way that


data have behaved over time.

 Data pattern may suggest the existence of a


relationship between two or more variables.

 Four Patterns: Horizontal, Trend, Seasonal, Cyclical.


2.1. Data Pattern

Two types of data:


 Cross-sectional data
Data collected at a single point in time, be it an hour, a
day, a week, a month, or a quarter.
The objective is to examine such data and then to
extrapolate or extend the revealed relationships to the
larger population.
 Time series data:
A time series consists of data that are collected,
recorded, or observed over successive increments of
time.
 Four Patterns: Horizontal, Trend, Seasonal, Cyclical.
2.1. Data Pattern

 Time series data: Seasonal period data


The seasonal period is the number of observa ons before the seasonal
pa ern repeats.
 For quarterly, monthly and weekly data, there is only one seasonal
period — the number of observa ons within each year.
 If the data is observed more than once per week, then there is o en
more than one seasonal pa ern in the data.
2.1. Data Pattern

 Time series data: Seasonal period data


The seasonal period is the number of observations before the seasonal
pattern repeats.
 For quarterly, monthly and weekly data, there is only one seasonal
period — the number of observations within each year.
 If the data is observed more than once per week, then there is often
more than one seasonal pattern in the data.
For example,
 data with daily observations might have weekly (period =7) or annual
(period=365) seasonal patterns.
 data that are observed every minute might have
• hourly (period=60),
• daily (period=24×60=1440),
• weekly (period=24×60×7=10080),
• annual seasonality (period=24×60×365.25=525960).
2.1. Data Pattern

Four Patterns: Horizontal, Trend, Seasonal, Cyclical.

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

Differences between seasonal and cyclic patterns:


• Seasonal pattern constant length; cyclic pattern variable
length
• Average length of cycle longer than length of seasonal
pattern
• Magnitude of cycle more variable than magnitude of
seasonal pattern

The timing of peaks and troughs is predictable with seasonal


data, but unpredictable in the long term with cyclic data.
2.1. Data Pa ern
2.1. Data Pa ern

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 Australian monthly electricity production shows a strong increasing


trend, with strong seasonality.
There is no evidence of any cyclic behaviour here.
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

Question 1. Indicate whether each of the


following statements describes a stationary or a
nonstationary series.
a. A series that has a trend
b. A series whose mean and variance remain
constant over time
c. A series whose mean value is changing over time
d. A series that contains no growth or decline
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

White noise data is uncorrelated across time with zero


mean and constant variance.

• Sampling distribution of rk for white noise data is asymptotically N(0,1/T).


• 95% of all rk for white noise must lie within±1.96/√T.
• If this is not the case, the series is probably not WN.
• Common to plot lines at ±1.96/√T when plotting ACF. These are the critical
values.
2.1. Data Pattern
Autocorrelated Pa ern
Time series that show no autocorrela on are called white noise
2.1. Data Pattern
Autocorrelated Pattern
Time series that show no autocorrelation are called white noise

Monthly total number of pigs slaughtered in the state of


Victoria, Australia, from January 2014 through December
2018 (Source: Australian Bureau of Statistics.)

• ACF shows significant autocorrelation for lag 2 and 12.


• Indicate some slight seasonality.
• These show the series is not a white noise series.
2.1. Data Pattern

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

Question 2. Descriptions are provided for several types of series:


random, stationary, trending, and seasonal.
Identify the type of series that each describes.
a) The series has basic statistical properties, such as the mean and
variance, that remain constant over time.
b) The successive values of a time series are not related to each other.
c) A high relationship exists between each successive value of a series.
d) A significant autocorrelation coefficient appears at time lag 4 for
quarterly data.
e) The series contains no growth or decline.
f) The autocorrelation coefficients are typically significantly different
from zero for the first several time lags and then gradually decrease
toward zero as the number of lags increases
2.1. Data Pattern

Question 2. Descriptions are provided for several types of series:


random, stationary, trending, and seasonal.
Identify the type of series that each describes.
a) The series has basic statistical properties, such as the mean and
variance, that remain constant over time. (stationary)
b) The successive values of a time series are not related to each other.
(random)
c) A high relationship exists between each successive value of a series.
(trending)
d) A significant autocorrelation coefficient appears at time lag 4 for
quarterly data. (seasonal)
e) The series contains no growth or decline. (stationary)
f) The autocorrelation coefficients are typically significantly different
from zero for the first several time lags and then gradually decrease
toward zero as the number of lags increases (trending)
2.2. Measures of Accuracy in Forecas ng

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

MAD measures forecast accuracy


by averaging the magnitudes of
the forecast errors

MSE penalizes large


forecasting errors

MAD, MSE, RMSE are all scale dependent.


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

The five measures of forecast accuracy just described are


used
 To compare the accuracy of two (or more) different
techniques.
 To measure a particular technique’s usefulness or
reliability.
 To help search for an optimal technique.
2.3. Technique Selection

Forecas ng methodologies fall into three categories:


• Quan ta ve Models

• Qualita ve Models

• Technological Approaches
2.3. Technique Selection

Quantitative Models
• Also known as statistical models.

• Include time series and regression approaches.

• Forecast future values entirely on the historical


observation of a variable.
2.3. Technique Selection

• 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

• Sale force composite forecast

• Focus groups

• Delphi method
2.3. Technique Selection

Technological Approach
• Combines quan ta ve and qualita ve methods.

• The objec ve of the model is to combine technological,


societal, poli cal, and economic changes.
2.3. Technique Selection

Forecasters depend on:


• The characteristics of the decision-making situation which
may include:
• Time horizon

• Planning vs. control

• Level of detail

• Economic conditions in the market (stability vs. state of flux)


2.3. Technique Selection

Forecasters depend on:


• The characteris cs of the forecas ng method
 Forecast horizon

 Pa ern of data

 Type of model

 Costs associated with the model

 Level of accuracy and ease of applica on


2.3. Technique Selection

Forecasting Techniques for Stationary Data

When are Stationary forecasting techniques used?

• The forces generating a series have stabilized, and the


environment in which the series exists is relatively unchanging.

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,

 the number of sales resulting from a constant level of effort.


2.3. Technique Selection

Forecas ng Techniques for Sta onary Data

When are Sta onary forecas ng techniques used?

 A very simple model is needed because of a lack of data or for


ease of explana on or implementa on.

 Stability may be obtained by making simple correc ons for


factors such as popula on growth or infla on.

Examples:
 changing income to per capita income

 changing dollar sales to constant dollar amounts.


2.3. Technique Selection

Forecasting Techniques for Stationary Data

When are Stationary forecasting techniques used?

• The series may be transformed into a stable one.

Examples: transforming a series by taking logarithms, square


roots, or differences.

• The series is a set of forecast errors from a forecasting


technique that is considered adequate.
2.3. Technique Selection

Forecas ng Techniques for Sta onary Data


• naive methods,

• simple averaging methods,

• moving averages,

• autoregressive moving average (ARMA) models


2.3. Technique Selection

Forecasting Techniques for Data with a Trend

When are forecasting techniques for trending data used?

• Increased productivity and new technology lead to changes in


lifestyle.

Examples
 the demands for electronic components, which increased with the
advent of the computer

 railroad usage which decreased with the advent of the airplane.


2.3. Technique Selection

Forecas ng Techniques for Data with a Trend

When are forecas ng techniques for trending data used?

• Increasing popula on causes increases in demand for goods


and services.

Examples
 the sales revenues of consumer goods,

 demand for energy consump on,

 use of raw materials.


2.3. Technique Selection

Forecasting Techniques for Data with a Trend

When are forecasting techniques for trending data used?

• The purchasing power of the dollar affects economic variables


due to inflation.

Examples:
 salaries,

 production costs,

 prices
2.3. Technique Selection

Forecas ng Techniques for Data with a Trend

When are forecas ng techniques for trending data used?

• The purchasing power of the dollar affects economic variables


due to infla on.

Examples:
 salaries,

 produc on costs,

 Prices

• Market acceptance increases.

Example: the growth period in the life cycle of a new product.


2.3. Technique Selection

Forecasting Techniques for Data with a Trend


 Moving Averages,

 Holt’s Linear Exponential Smoothing,

 Simple Regression,

 Growth Curves,

 Exponential Models,

 Autoregressive Integrated Moving Average (ARIMA) Models (Box-jenkins


Methods).
2.3. Technique Selection

Forecas ng Techniques for Seasonal Data


• Weather influences the variable of interest.
Examples
 electrical consump on,
 summer and winter ac vi es (e.g., sports such as skiing),
 clothing, and agricultural growing seasons.
• The annual calendar influences the variable of interest.
Examples:
 retail sales influenced by holidays,
 retail sales influenced by three-day weekends,
 retail sales influenced by school calendars.
2.3. Technique Selection

Forecasting Techniques for Seasonal Data


 Classical Decomposition,
 Winter’s Exponential Smoothing,
 Multiple Regression,
 ARIMA Models (Box-jenkins Methods).
2.3. Technique Selection

Forecas ng Techniques for Cyclical Series


Forecas ng techniques for cyclical data are used in:
• The business cycle influences the variable of interest.
Examples are economic, market, and compe on factors.
• Shi s in popular tastes occur.
Examples are fashions, music, and food.
• Shi s in popula on occur.
Examples are wars, famines, epidemics, and natural disasters.
• Shi s in product life cycle occur.
Examples are introduc on, growth, matura on and market satura on, and
decline.
2.3. Technique Selection

Forecasting Techniques for Cyclical Series


 Classical Decomposition,
 Economic Indicators,
 Econometric Models,
 Multiple Regression,
 ARIMA Models (Box-jenkins Methods).
2.3. Technique Selection
2.4. Model Evalua on

Forecasters depend on:


• The level of error associated with each model.

• Error is computed and looked at graphically.

• Control charts are used for model evaluations.

• Turning point diagram is used to evaluate a model.


2.4. Model Evaluation

• A pattern of cumulative errors moving systematically


away from zero in either direction is a signal that the
model is generating biased forecasts.

• Management has to establish the upper and lower control


limits.

• One fairly common rule of thumb is that the control limits


are equal to 2 or 3 time the standard error.
2.4. Model Evalua on

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

Line of Perfect Forecast


II–Turning Point Error IB–Underestimate
Prediction of downturn of Positive
that did not occur; or change
failure to predict an IA–Overestimate
upturn of Positive change

IIIA–Overestimate of Ŷ Forecast


Negative change Change
IV–Turning Point Error
Prediction or upturn
that did not occur; or failure
to predict a downturn
IIIB–Underestimate
of Negative change

Figure 2.6 Turning Point Error Diagram


2.4. Model Evaluation

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

You might also like