Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

STA222

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

STA222: Introduction to Time Series Analysis

Course Outline
i. An introduction to time series in time domain and spectral domain.
ii. Estimation of trends and seasonal effects.
iii. Autoregressive moving average models.
iv. Forecasting.
v. Indicators
vi. Harmonic analysis
vii. Spectra.

An introduction to time series in time domain and spectral domain.

1 Models for time series


1.1 Time series data
A time series is a set of statistics, usually collected at regular intervals. Time series data occur naturally in many
application areas.

• economics - e.g., monthly data for unemployment, hospital admissions, etc.

• finance - e.g., daily exchange rate, a share price, etc.

• environmental - e.g., daily rainfall, air quality readings.

• medicine - e.g., ECG brain wave activity every 2−8 secs.

The methods of time series analysis pre-date those for general stochastic processes and Markov Chains. The aims
of time series analysis are to describe and summarise time series data, fit low-dimensional models, and make
forecasts.
We write our real-valued series of observations as ...,X−2,X−1,X0,X1,X2,..., a doubly infinite sequence of real-
valued random variables indexed by Z.

1.2 Trend, seasonality, cycles and residuals


One simple method of describing a series is that of classical decomposition. The notion is that the series can be
decomposed into four elements:

Trend (Tt) — long term movements in the mean;

1
Seasonal effects (It) — cyclical fluctuations related to the calendar; Cycles (Ct) — other cyclical
fluctuations (such as a business cycles); Residuals (Et) — other random or systematic fluctuations.

The idea is to create separate models for these four elements and then combine them, either additively
Xt = Tt + It + Ct + Et
or multiplicatively
Xt = Tt · It · Ct · Et .

1.3 Stationary processes

1. A sequence {Xt,t ∈ Z} is strongly stationary or strictly stationary if

(Xt1,...,Xtk)=(D Xt1+h,...,Xtk+h)

for all sets of time points t1,...,tk and integer h.

2. A sequence is weakly stationary, or second order stationary if


(a) E(Xt) = µ, and (b) cov(Xt,Xt+k) = γk, where µ is constant and γk
is independent of t.

3. The sequence {γk, k ∈ Z} is called the autocovariance function.

4. We also defineρk = γk/γ0 = corr(Xt,Xt+k)


and call {ρk,k ∈ Z} the autocorrelation function (ACF).

Remarks.

1. A strictly stationary process is weakly stationary.

2. If the process is Gaussian, that is (Xt1,...,Xtk) is multivariate normal, for all t1,...,tk, then weak stationarity implies
strong stationarity.

3. γ0 = var(Xt) > 0, assuming Xt is genuinely random.

4. By symmetry, γk = γ−k, for all k.

1.4 Autoregressive processes


The autoregressive process of order p is denoted AR(p), and defined by
p

Xt = XφrXt−r + ǫt (1.1)

2
r=1

where φ1,...,φr are fixed constants and {ǫt} is a sequence of independent (or uncorrelated) random variables with

mean 0 and variance σ2.

The AR(1) process is defined by

Xt = φ1Xt−1 + ǫt . (1.2)

To find its autocovariance function we make successive substitutions, to get

The fact that {Xt} is second order stationary follows from the observation that E(Xt) = 0 and that the

autocovariance function can be calculated as follows:

There is an easier way to obtain these results. Multiply equation (1.2) by Xt−k and take the expected value, to
give

E(X X −k) = E(φ X −1X −k) + E(ǫ X −k).


t t 1 t t t t

Thus γk = φ1γk−1, k = 1,2,...


Similarly, squaring (1.2) and taking the expected value gives

E(Xt2) = φ1E(Xt2−1) + 2φ1E(Xt−1ǫt) + E(ǫt2) = φ21E(Xt2−1) + 0 + σ2

and so γ0 = σ2/
(1 − φ2 ).
1

More generally, the AR(p) process is defined as

Xt = φ1Xt−1 + φ2Xt−2 + ··· + φpXt−p + ǫt . (1.3)

Again, the autocorrelationfunction can be found by multiplying (1.3) by Xt−k, taking the expected value and
dividing by γ0, thus producing the Yule-Walker equations

ρk = φ1ρk−1 + φ2ρk−2 + ··· + φpρk−p, k = 1,2,...

These are linear recurrence relations, with general solution of the form

3
,
where ω1,...,ωp are the roots of

ωp − φ1ωp−1 − φ2ωp−2 − ··· − φp = 0

and C1,...,Cp are determined by ρ0 = 1 and the equations for k = 1,...,p − 1. It is natural to require γk → 0 as k → ∞, in

which case the roots must lie inside the unit circle, that is, |ωi| < 1. Thus there is a restriction on the values of

φ1,...,φp that can be chosen.

1.5 Moving average processes


The moving average process of order q is denoted MA(q) and defined by
q

Xt = Xθsǫt−s (1.4)

s=0

where θ1,...,θq are fixed constants, θ0 = 1, and {ǫt} is a sequence of independent (or uncorrelated) random variables

with mean 0 and variance σ2.

It is clear from the definition that this is second order stationary and that

4
We remark that two moving average processes can have the same autocorrelation function. For
example,

Xt = ǫt + θǫt−1 and Xt = ǫt + (1/θ)ǫt−1

both have ρ1 = θ/(1 + θ2), ρk = 0, |k| > 1. However, the first gives ǫt = Xt − θǫt−1 = Xt −

θ(Xt−1 − θǫt−2) = Xt − θXt−1 + θ2Xt−2 − ···

This is only valid for |θ| < 1, a so-called invertible process. No two invertible processes have the

same autocorrelation function.

1.6 White noise


The sequence {ǫt}, consisting of independent (or uncorrelated) random variables with mean 0 and
variance σ2 is called white noise (for reasons that will become clear later.) It is a second order
stationary series with γ0 = σ2 and γk = 0, k = 0.6

1.7 The turning point test


We may wish to test whether a series can be considered to be white noise, or whether a more
complicated model is required. In later chapters we shall consider various ways to do this, for
example, we might estimate the autocovariance function, say {γˆk}, and observe whether or not ˆγk
is near zero for all k > 0.

However, a very simple diagnostic is the turning point test, which examines a series {Xt} to
test whether it is purely random. The idea is that if {Xt} is purely random then three successive
values are equally likely to occur in any of the six possible orders.

In four cases there is a turning point in the middle. Thus in a series of n points we might expect
(2/3)(n − 2) turning points.

In fact, it can be shown that for large n, the number of turning points should be distributed as
about N(2n/3,8n/45). We reject (at the 5% level) the hypothesis that the series is unsystematic if the
number of turning points lies outside the range

5
6

You might also like