Sunteți pe pagina 1din 40

Exploring Data Patterns With

Autocorrelation Analysis

4/24/2018 STQS 2233 Statistical Modelling 1


Seasonal Data

If a series is seasonal, a pattern related to the


calendar repeats itself over a particular interval of
time (usually a year).

Observations in the same position for different


seasonal periods tend to be related.

4/24/2018 STQS 2233 Statistical Modelling 2


Seasonal Data (cont.)
If quarterly data with a seasonal pattern are analyzed, first
quarters tend to look alike, second quarters tend to look
alike and so forth, and a significant autocorrelation
coefficient will appear at time lag 4.

If monthly data with a seasonal pattern are analyzed, a


significant autocorrelation coefficient will appear at time lag
12.

That is, January will correlated with other


Januarys, February will correlate with other
Februarys and so forth.
4/24/2018 STQS 2233 Statistical Modelling 3
Example 1

4/24/2018 STQS 2233 Statistical Modelling 4


Figure 1 : Example 1

4/24/2018 STQS 2233 Statistical Modelling 5


Figure 2 :
Example 1

4/24/2018 STQS 2233 Statistical Modelling 6


Figure 3 : Example 1
First quarters tend to
look alike, second
quarters tend to look
alike and so forth, and a
significant
autocorrelation
coefficient will appear at
time lag 4.

4/24/2018 STQS 2233 Statistical Modelling 7


Box-Jenkins Methodology

4/24/2018 STQS 2233 Statistical Modelling 8


Box-Jenkins Approach
Using historical data to
1 Tentative Identification identify an appropriate Box-
Jenkins model

2 Estimation Estimate the


parameters

3 Diagnostic Checking Various diagnostics are


used to check the
adequacy of the
tentatively identified
4 Forecasting model
The final model obtained
is used to forecast future
time series values

4/24/2018 STQS 2233 Statistical Modelling 9


4/24/2018 STQS 2233 Statistical Modelling 10
Introduction
Stationary
Non-seasonal Differencing
Box-Jenkins
NonStationary
models
Use the behavior of
these functions
Sample Sample partial
autocorrelation autocorrelation
function, SAC function, SPAC
AR Identify an appropriate model
MA and forecasting future time
series values
AR & MA
4/24/2018 STQS 2233 Statistical Modelling 11
Stationary & Non Stationary
Time Series

Determine
Transform the series
If it is not whether the
into a series of time series
we wish to forecast is
stationary time series STATIONARY

A time series is stationary if the


statistical properties : mean and
variance of the time series are
essentially constant through time

4/24/2018 STQS 2233 Statistical Modelling 12


Remember…

Nobel Prize for Economics in 2003 awarded to Rob


Engle and Clive Granger, who highlighted the
importance of stationarity in time series data.

There are substantial implications for empirical


modeling with time series data which is not stationary.

4/24/2018 STQS 2233 Statistical Modelling 13


Properties of Stationary
Time Series
Xt is stationary if

1 the series exhibits mean reversion

2 Xt has finite variance which is not


dependent upon time.

4/24/2018 STQS 2233 Statistical Modelling 14


Properties of Stationary
Time Series (cont.)

3 Covariance between two values of Xt depends


only on the difference apart in time.

E(Xt) = μ
Var(Xt) = σ2
Cov(Xt ,Xt+k) = χ(k)

4/24/2018 STQS 2233 Statistical Modelling 15


Property 3 of Stationary
Time Series

Covariance between two values of Xt depends only on the


difference apart in time for stationary series.
Cov(Xt ,Xt+k) = χ(k) (covariance is constant in t)

(A) Correlation for 1980 and 1985 is the same as for


1990 and 1995. (i.e. t = 1980 and 1990, k = 5)
(B) Correlation for 1980 and 1987 is the same as for
1990 and 1997. (i.e. t = 1980 and 1990, k = 7)
4/24/2018 STQS 2233 Statistical Modelling 16
An Example of Stationary and
Non-Stationary Time Series
White Noise Process: Example of Stationary Series.

Random Walk: Example of Non-stationary Series.

Economic time series are typically non-stationary


(i) Share Prices
(ii) Exchange Rate
(iii) Income
4/24/2018 STQS 2233 Statistical Modelling 17
Example 2 :
Stationary Time Series
WHITE NOISE PROCESS

4/24/2018 STQS 2233 Statistical Modelling 18


Example 3 :
Stationary Time Series

4/24/2018 STQS 2233 Statistical Modelling 19


Example 3 :
Non-Stationary Time Series

Share Price
Exchange Rate

Income

4/24/2018 STQS 2233 Statistical Modelling 20


Properties of Non-
Stationary Time Series
In contrast a non-stationary time series has the following
characteristics.
(1) Does not have a long run mean which the series
returns
(2) Variance is dependent upon time and goes to infinity
as the sample period approaches infinity
(3) Correlogram does not die out - long memory

4/24/2018 STQS 2233 Statistical Modelling 21


Example 4 : Non-Stationary
Time Series UK GDP (Y ) t

The level of GDP


(Y) is
______________
and the mean
increases over
time. Hence the
level of GDP is
an example of a
______________

4/24/2018 STQS 2233 Statistical Modelling 22


Property 1 of Non-
Stationary Time Series
RANDOM WALK : Xt = Xt-1 + ut ut ~ IID(0, σ2 )
Mean: E(Xt) = E(Xt-1) (mean is constant in t)
X1 = X0 + u1 (take initial value X0)
X2 = X1 + u2 = (X0 + u1 ) + u2

Xt = X0 + u1 + u2 +…+ ut
E(Xt) = E(X0 + u1 + u2 +…+ ut) (take expectations)

4/24/2018 STQS 2233 Statistical Modelling 23


Property 2 of Non-
Stationary Time Series
RANDOM WALK : Xt = Xt-1 + ut , ut ~ IID(0, σ2 )

Xt = X0 + u1 + u2 +…+ ut

Variance: Var(Xt) = Var(X0) + Var(u1) +…+ Var(ut)


= 0 + σ2 +…+ σ2
= t σ2

4/24/2018 STQS 2233 Statistical Modelling 24


Example 5 :
Non-Stationary Time Series

4/24/2018 STQS 2233 Statistical Modelling 25


Example 6 : Non-
Stationary Time Series
UK GDP (Yt) – correlogram
(Check Example 4)

For non-stationary
series, the
Autocorrelation
Function (ACF)
_________________
_________________
________________.

4/24/2018 STQS 2233 Statistical Modelling 26


Example 9.1
Table 9.1 Example 7 Variables : y

Graphs Sequence

120 weeks

The time series is nonstationary

4/24/2018 STQS 2233 Statistical Modelling 27


Continue…
A plot of n time Transform the series Taking
series indicates the into a series of the
values are non- stationary time first
stationary difference
series

The first differences of the time


series values y1, y2, …, yn are :

The second differences of the time


series values y1, y2, …, yn are :

4/24/2018 STQS 2233 Statistical Modelling 28


Example 9.1 Next…

The first difference is stationary

4/24/2018 STQS 2233 Statistical Modelling 29


Or…

120 weeks

4/24/2018 STQS 2233 Statistical Modelling 30


The Sample Autocorrelation
Function (SAC) Example 9.2
&
Example 9.3

The SAC at lag k, rk is

Box-Jenkins forecasting
models are tentatively
identified by examining
the behavior of the sample
autocorrelation function
(SAC) and the sample
partial autocorrelation
function (SPAC) for the
values of a
_______________________
4/24/2018 STQS 2233 Statistical Modelling 31
_______________________
Using The SAC To Find A
Stationary Time Series
Figure 9.5,
page 412

If the SAC of the time series values zb, zb+1, …, zn either


cuts off fairly quickly of dies down fairly quickly, then
the time series values should be considered
___________
If the SAC of the time series values zb, zb+1, …, zn dies
down extremely slowly, then the time series values
should be considered ____________________________

4/24/2018 STQS 2233 Statistical Modelling 32


Data From
Table 9.1 Example 2 Autocorrelations

Graphs Time Series

4/24/2018 STQS 2233 Statistical Modelling 33


Continue…

4/24/2018 STQS 2233 Statistical Modelling 34


The Sample Partial
Autocorrelation Function (SPAC)

Check the
formulas in the
textbook, page
416

4/24/2018 STQS 2233 Statistical Modelling 35


Data From
Example 3 Table 9.1

4/24/2018 STQS 2233 Statistical Modelling 36


The Sample Partial
Autocorrelation Function (cont.)
It is beyond the scope of this text to give a precise
interpretation of the sample partial autocorrelation
at lag k.

However, this quantity may intuitively be thought of


as the SPAC of time series observations separated by
a lag of k time units with the effects of the intervening
observations _______________.

4/24/2018 STQS 2233 Statistical Modelling 37


The Sample Partial
Autocorrelation Function (cont.)

Again, in order to employ the Box-Jenkins


methodology, we must examine and attempt to
classify the behavior of the SPAC.

The SPAC, like the SAC, can display a variety of


different behaviors.

4/24/2018 STQS 2233 Statistical Modelling 38


The Sample Partial
Autocorrelation Function (cont.)
First, the SPAC for a nonseasonal time series can cut
off.

We say that _________ at lag k exists in the SPAC if


rkk, the SPAC at lag k, is statistically __________.

Read more about the SPAC


from your textbook,
page 417

4/24/2018 STQS 2233 Statistical Modelling 39


Questions?

4/24/2018 STQS 2233 Statistical Modelling 40

S-ar putea să vă placă și