0% found this document useful (0 votes)
136 views117 pages

Time Series

This document provides an outline for a course on time series analysis. It discusses key topics like economic time series, stationary time series, auto regressive processes, and Box-Jenkins modeling. Methods for analyzing time series components like trend, seasonality, and cycles are presented. Approaches include analyzing in the time and frequency domains, and additive and multiplicative models. Graphical and numerical techniques for measuring and removing trends are also covered.

Uploaded by

solomon khaluhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views117 pages

Time Series

This document provides an outline for a course on time series analysis. It discusses key topics like economic time series, stationary time series, auto regressive processes, and Box-Jenkins modeling. Methods for analyzing time series components like trend, seasonality, and cycles are presented. Approaches include analyzing in the time and frequency domains, and additive and multiplicative models. Graphical and numerical techniques for measuring and removing trends are also covered.

Uploaded by

solomon khaluhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 117

SMA 2431:TIME SERIES ANALYSIS

October 13, 2013

COURSE OUTLINE

1. Economic time series

(a) Four components

(b) Method of tting trend

(c) Stationary time series

(d) Use of lters in time series

(e) Methods of moving averages and variate dierences.

2. Auto regressive processes,correlogram,periodogram and spectogram anal-


ysis

3. Prediction theory :-Box Jenkins approach to modeling time series,Use


of computer packages.

REFERENCE BOOKS

1
1. Fundamental of Applied Statistics by Gupta and Kapor.

2. Analysis of Time Series by Chris Charteld.

3. Introduction to Statistical Time Series by Fuller W.A

4. Time Series Analysis by William W.S Wei.

INTRODUCTION
Denition
A time series is a collection of observations met sequentially in time.i.e
its an arrangement of statistical data in accordance with time.
EXAMPLES
Economic time series
They include series such as shared prices in successive days,average in-
comes in successive months,export sales totals in successive months etc.

• Physical Time Series The many types of time series occur in physical
scenes particularly in marine science,meteorology and geophysics eg
successive hours,days and months.

• Demographic Time Series This is concerned with population.E.g


population measured every 10 years.

OBJECTIVES OF TIME SERIES

1. Descriptive Purpose

2
When presented with time series,the rst step in the analysis is usually
to plot the data and obtain descriptive measures of the main properties
of the series.Features such as trends and seasonal eects can sometime
be easily seen from such a plot.

The plot will also enable one to look for unusual observation s and
outliers which don't appear to be consistent with the rest of the data.

2. EXPLANATION PURPOSE

When observations are taken on two or more variables ,it may be pos-
sible to use variation in the other variable to explain variation in the
other variable.This may lead to deeper understanding of the mecha-
nism which generated the given series.i.e We develop a structural model
which governs the generation of such a series.

3. PREDICTION PURPOSE

Given an observed time series future values of the time series may
be predicted.This is important task in shares forecasting and in the
analysis of economic and industrial time series.

4. CONTROL PURPOSE:

Using the structural model in (2) above,one may seek to control the
system by either generating warning signals of future events or by ex-
amining what would happen if the inputs of the system are altered

5. STATISTICAL MODEL BUILDING

3
Several jointly dependent variables are considered to come up with a
statistical model.

Terminologies used

• Continuous time series:A time series is said to be continuous when the


observations are met continually in time i.e the values of Xt are in an
interval.

• Discrete time series:A time series is said to be discrete when observa-


tions are taken only at a specic time usually equally spaced.

• Deterministic time series:When successive observations are dependent,future


values may be predicted from past observations,if a time series can be
predicted exactly then it is said to be deterministic.

• Stochastic Time Series:Most time series are stochastic in the sense that
future is only partly determined by past values so that exact prediction
is impossible and must be replaced by the idea that future values have a
probability distribution which is conditioned by the knowledge of past
values.

COMPONENTS OF TIME SERIES


There are several forces at work which aect the observed time series.
This can basically be classied into the following categories.

1. Trend/secular trend.

4
2. Seasonal variation.

3. Cyclic variation

4. Irregular/random movement.

Trend/Secular trend:
Trend is the general tendency of data to increase or decrease over a long
period of time.

• E.g Data concerning population over time.

5
Diagram

• Data concerning death over time.

An upward tendency would be seen in data containing population cur-


rency in circulation,agricultural production etc.
A downward tendency will be in data containing birth,death,epidemic
etc.as a result of medical advancement,better medical facilities,literacy and
high standards.

6
Remarks:

• Trend is the result of loose forces which are either constant or change
very gradually over a long period of time.

• The term long period of time cannot be dened precisely .In some
cases,a period as long as 1 week may be long while in some other cases
2 years may not be termed as long period.

• Apart from upward and downward tendency,we may also have some
time series whose values uctuate round a constant reading which
doesn't change with time.E.g time series of temperature reading of a
particular place.

diagram

7
8
Seasonal variations
These are periodic and regular movements in a time series with a period
of less than one year.
E.g sales and prots in a store.
Seasonal variations may be attributed to 2 causes.

• Those resulting from natural forces:

 E.g production of some commodities depend upon season.

• Those resulting from man-made forces:

 E.g sales and prots of some goods during festivities are related

9
to man-made forces

Cyclic variations
These are oscillatory movements in time series with a period of oscillation
which is more than one year.
Cyclic variations exhibit variations at a xed period greater than one
year.An important example are the so called business cycles representing
intervals of prosperity,recession,depression and recovery.
Random/irregular movements
These are not accounted for by secular trend ,seasonal or cyclic trend
variations.They are purely random,unpredictable and beyond human control.
They include drought,war,oods,earth quakes,epidemics,university strike
etc.
ANALYSIS OF TIME SERIES:
The main problem in time series analysis are:

1. To identify the components of series at work,i.e trend,seasonal,cyclic or


random.

2. To isolate ,study,analyze and measure the components independently.

(a) Statistical techniques for analysis of time series range from simple
descriptive methods to sophisticated inferential techniques.

APPROACHES TO TIME SERIES ANALYSIS:


There are 2 approaches to time series analysis.

10
• Analysis of time series in time domain(classical)

 The main diagnostic tool to look at is the auto correlation func-


tion(ACF)which helps describe the evolution of a process through
time.

• Analysis of time series in frequency domain.

 This function depends on spectral density function which describes


how variation in time series may be accounted for by variation at
dierent frequencies.

MODELS IN TIME SERIES:


There are two main types of models in time series analysis

1. Additive model:

According to this model,a time series can be expressed or decomposed


as:

Xt = Tt + St + Ct + et

where

Xt -time series value at time t

Tt −Trend value at time t

St −seasonal value at time t

11
Ct :cyclic value at time t

et :random value at time t

In an annual data,the component Ct does not appear in the additive


model.This is so since in a cyclic variation is in more than one year.

2. Multiplicative model

According to this model,the time series can be expressed as

Xt = Tt .Ct .St .et

whereXt , Tt , Ct , et , St are dened as in the additive model.

ANALYSIS OF TIME SERIES CONTAINING TREND


This depends on whether one wants to

• Measure/estimate trend

• Remove trend in order to analyze local uctuation.

Measurement of trend
Trend can be studied/measured by the following methods:

1. Graphical method

2. Method of semi-squares.

3. Method of curve tting.

12
4. Method of removing averages.

Graphical Method
The time series Xt can be plotted against the time t to obtain a free hand
smooth curve.This enables us to have an idea about the general trend of the
series i.e it could be upward,downward ,or constant trend.
Smoothing of the curve eliminates both regular St and irregularet uctu-
ations.
Merits

1. The method does not involve any complex mathematical technique.

2. The method is very simple and exible to study trend.

Demerits:

1. The method is subjective as dierent trend curves may be obtained by


dierent persons.

2. The method does not measure trend,it just gives directions of the trend.

METHOD OF SEMI-SQUARES
The procedure is as follows

• Divide the whole data into two parts(preferably equal)with respect to


time.

• Compute the arithmetic mean for each part and plot these averages
against the mid values of the respective periods covered by each part.

13
• Join the two points to obtain the required trend line,which can be used
to estimate the intermediate /future values.

Merits

1. The method is objective i.e everyone who applies the method gets the
same result.

2. the method is very comprehensive.

Demerits:
It assumes linear relationship between the plotted points which may not
exist.
Method of curve tting
The method aims at coming up with a curve/line that minimizes deviation
from the data points to the line of best t.
The various types of curves that are commonly used in practice are as
follows

1. A straight line
Xt = a + bt + et

2. Second degree polynomial

Xt = a + bt + ct2 + et

14
3. Exponential Curves
Xt = abt + et

4. The growth curves.

(a) The modied exponential

Xt = a + bct + et .

(b) Gompertz curve


Xt = abct + et

(c) logistic curve


k
Xt = + et
1 + ea+bt

We normally t a straight line trend if the values of the time series


are decreasing or increasing by equal absolute amounts i.e

Xt − Xt−1 = constant.

We t exponential curves if the series is increasing or decreasing


a constant percentage i.e

Xt = constant

15
implies
Xt
= constant.
Xt−1

We t a quadratic curve (second phase polynomial) if the time


plot shows curvature upwards or down wards

(d) diagram

FITTING A STRAIGHT LINE


Let the series
Xt = a + bt + et

where a =intercept
b=gradient
et =random/error term
To t this in straight line we use the least square method.i.e

et = Xt − a − bt
X n
X
e2t = (Xt − a − bt )2
t=1

16
Let
n
X
z= (xt − a − bt)2
t=1

be the sum of square deviation


Our aim is to estimate the constants a and b using the least square
method.i.e for minimum

dz
= 0
da
Pn
t=1 (Xt − a − bt) = 0

(1)
P X
na + b t = Xt

again

dt
= 0
db
P
t(Xt − a − bt) = 0

(2)
X
a t + b t2 =
P P
tXt

equations(i)and (ii) are normal equations which are solved simultaneously


to obtain the estimates

and b̂ i.e from (i)

17
X X
na = Xt − b t
P P
Xt b t
â = −
n n
= X t − b̂t
P P P
n tXt − t Xt
b̂ = P P
n t2 − ( t)2
Xt = â + b̂t

which is the tted trend lines.


The same procedure can be used to t the second degree polynomial
where
Xt = a + bt + ct2 + et

FITTING AN EXPONENTIAL CURVE

Xt = abt + et

Taking logs on both sides

logXt = loga + tlogb + loget

Yt = A + Bt + Et (3)

where logXt =Yt , loga = A, logb = B andloget = Et


Equation(1)is a straight line and the least square method can be used to

18
get the estimates
Let
X
Z= (Yt − A − Bt)2

be the sum of squares equations.


The normal equations become

X X
Yt = nA + B t
X X X
tYt = a t+B t2

 = Y t − B̂t
P P P
n tYt − t Yt
B̂ = P P
n t2 − ( t)2
â = eÂ

b̂ = eB̂

So the tted curve becomes


Xt = âb̂t

Example 1
The table below shows the gures of production in 1000 turns of sugar
factory
Year 1963 1965 1966 1967 1968 1969 1972
production 67 88 94 85 91 98 90
nd

19
• Fit a straight line using the method of least squares and tabulate the
trend values.

• Eliminate the trend and nd out the components left.

• What is the monthly increase in the production of sugar.

• Estimate the production of sugar in 1970.

solution
Let the trend in question be

Xt = a + bt + et

The normal equations are

X X
Xt = na + b t
X X X
tXt = a t+b t2

Since n=7 is odd,we select the time t such that the middle time t=0.
NB:
If the sample size n is even,we select either of the two points to be zero.
We use the following table in the estimation of the constants a and b in
normal equations.

20
Year t productionXt t2 tXt trend values:Xt = â + b̂t
1963 -4 67 16 -268 78.5
1965 -2 88 4 -171 82.88
1966 -1 94 1 -94 85.07
1967 0 85 0 0 87.26
1968 1 91 1 91 89.45
1969 2 98 4 196 91.66
1972 5 90 25 450 98.21
t2 = 51
P P P P
t=1 Xt = 613 tXt = 199

7a + b = 613

a + 51b = 199

356b = 780
780
b̂ = = 2.19
356
613 − 2.19
â = = 87.26
7

Thus the trend equation is given by

Xt = â + b̂t

= 87.26 + 2.19t

This is the tted straight line.

21
Assuming the additive model of time series we eliminate the trend values
by subtracting the trend from the given values as shown in the following
tabe:
Year Xt − trend value
1963 -11.5
1965 5.12
1966 8.93
1967 -2.26
1968 1.55
1969 6.36
1972 -8.21
The resulting values shows uctuations which change with a period of
more than one year.
NB
After eliminating the trend values one should be able to identify the
variation left.i.e whether seasonal,cyclic or random.
iii) b̂ increments,NB:We use the gradient which is the estimate of monthly


=
12
2.19
=
12
= 0.1825

iv)Estimate of 1970

22
solution
t=3
Then substitute in

Xt = â + b̂t

Xt = 93.83

EXAMPLE 2
The table below shows the population in millions of a certain country:
Year(X) 1929 1939 1949 1959 1969 1979 1989
pop(Y) 25 25 27.9 31.9 36.1 43.9 54.7
1. Fit an exponential curve

Y = abx + et

and tabulate the trend values .

2. Estimate the population in 1999.

SOLUTION

1.
Y = abx + et

23
hence we need to nd â and b̂

lnY = lna + xlnb + lnet

V = A + Bx + Et

Shift the origin x to 1959 and change the scale by dening a new vari-
able t where

x − 1959
t =
10
V = A + Bt + Et · · · (4)

By using the principle of least squares,normal equations for estimating


Âand B̂ in equation 2 are

X X
V = nA + B t
X X X
tV = A t+B t2

24
Year(X) pop(Y) t = X−1959
10
V = lnY t2 tV trend Trend values
values for for
V Y=anti-log
1929 25 -3 3.2188 9 -9.6564 3.116 22.56
1939 25 -2 3.2228 4 3.249 25.72
1949 27.9 -1 3.3286
1959 31.9 0 3.4626 0
1969 36.1 1 3.5863 1
1979 43.9 2 3.7819 4
1989 54.7 3 4.0018 9 12.0054 3.914 50.05
Now,

X
t = 0
X
t2 = 28
X
V = 24.6028
X
tV = 3.7249

25
Since

X
t = 0
X
=⇒ B t = 0

24.6028 = 7A
24.6028
 = = 3.51468
7
3.7249 = 28B
3.7249
B̂ = = 0.133
28

If

A = lna

â = eÂ

= e3.51468 = 33.605

If

B = lnb

b̂ = eB̂

= e0.133 = 1.142

26
Thus the trend line

= Y = âb̂x

= 33.605(1.142)x

This is the exponential trend and is transformed into linear trend

V = Â + B̂t

= 3.515 + 0.133t

ii)population in 1999
=57.23
GROWTH CURVE
The method of least squares cannot be used in growth curves because the
number of parameters to be estimated exceeds the number of known variables
.Therefore some special techniques are required:

1. FITTING MODIFIED EXPONENTIAL CURVE

Xt = a + bct + et (5)

where a,b,c are parameters to be estimated

procedure

27
• Choose 3 coordinates say

X1 , X2 , X3

which corresponds to 3 equidistant values

t1 , t2 , t3

respectively,then assuming the error term such that

t2 − t1 = t3 − t2

X1 = a + bct1 (6)

X2 = a + bct2 (7)

X3 = a + bct3 (8)

(iii) − (ii) = X2 − X1

= b(ct2 − ct1 )

= bct1 (ct2 −t1 − 1) (9)

28
(iv) − (iii) = X3 − X2

= bct2 (ct3 −t2 − 1) (10)

(vi) X3 − X2
=
(v) X2 − X1
bct2 (ct3 −t2 − 1)
=
bct1 (ct2 −t1 − 1)
= c

since

t3 − t2 = t2 − t1
X3 − X2 t −t
1
ĉ = ( )2 1
X2 − X 1

from eqn (v) we get

X2 − X1 = bct1 (ct2 −t1 − 1)


X3 − X2 t −t
1 X3 − X2 tt2 −t 1
∴ X2 − X1 = b( ) 2 1 (( ) 2 −t1 ) − 1)
X2 − X1 X 2 − X1

(X2 − X1 )2 X2 − X1 t t−t
1
b ˆ=(( )( )2 1
X3 − 2X2 + X1 X3 − X2

again
X1 = a + bct1

a = X1 − bct1

29
(X2 − X1 )2 X2 − X1 t t−t
1 X3 − X2 t −t
1
â = X1 − [ ]( ) 2 1( )2 1
X3 − 2X2 + X1 X3 − X2 X2 − X1

X1 X3 − X22
â =
X3 − 2X2 + X1
Xt = â + b̂ĉt

2. FITTING A GOMPERTZ CURVE

t
Xt = abc + et

logXt = loga + ct logb + loget

Yt = A + Bct + Et (11)

equation(i1) takes the form of modied exponential curve,thus we use


the previous procedure to get the estimates of a,b,c

3. FITTING A LOGISTIC CURVE

k
Xt = + et
1 + exp(a + bt)

where Xt is the time series at time t k,a and b are parameters to be

30
estimated.Assuming the error term

k
Xt =
1 + ea+bt
1 ea bt
= + e
k k
∴ Yt = A + BC t · · · eqn(i1)

where

1
Yt =
Xt
1
A =
k
ea
B =
k
C = eb

Eqn(i1) is in the form of modied exponential and thus the previous


can be used to get the estimators of the parameters involved.

4. METHOD OF MOVING AVERAGES

The method measures the trend by smoothing out the uctuation of the
data by means of moving averages.Moving averages of extent (period) m ,is
a series of successive averages of M-terms starting with 1st,2nd term etc.
The rst average is the mean of the rst M-terms,2nd average is the mean
of M-terms starting with the 2nd term to M+1 term.
If M is odd i.e M=2k+1,the rst moving average is placed against the

31
mid-value of the time interval it covers,i.e against K+1.eg
t observation M.A
1 3 -
2 4 (3+4+10)/3
3 10 (4+10+8)/3
M=3,we have
4 8 (10+8+7)/3
5 7 (8+6+9)/3
6 6 (7+6+9)/3
7 9 -
If M is even i.e M=2k,the rst moving average is placed between two
moving values of the time interval it covers.
eg M=4
t observation M.A
1 3
2 4
3 5
4 6
5 7
6 8
7 9
The moving average does't coincide with the original time period hence
we centered moving average by taking M.A of extent 2 of moving averages
and putting the rst of these values against time t =k+1.

32
The graph obtained on plotting moving average against time gives the
trend.
The main problem in moving average level is determining the period
of moving average that will completely remove the oscillatory movements
aecting the series.
If the uctuations are regular and periodic,then the moving average com-
pletely remove the oscillatory movements provided:

1. The extend of moving average is exactly equal to or a multiplier of the


period of oscillation.

2. The trend is linear.

Demerits
The method does not provide trend values for all the terms eg for a moving
average of extend M=2k+1,the trend values of the rst k and last k terms of
the series are forgone.
The method cannot be used to predict future trend ,which is one of the
main objective of trend analysis.
NB:
Moving average method gives a correct feature of the long term trend of
the series if:

• The trend is linear or approximately linear.

• Oscillatory movements aecting the data are regular in period and


amplitude.

33
If the trend is not linear,the M.A introduces bias in the trend values.
Example
A study demand (dt) for the past 12yrs(t=12) has indicated the following
observations.

dt = 100, t = 1, 2, 3, 4, 5

dt = 20, t = 6

dt = 100, t = 7, 8, 9, 10, 11, 12

compute 5-year moving average


solution
The rst M.A is placed against

t=k+1=3

34
t dt 5year M.A
1 100 -
2 100 100
3 100 84
4 100 84
5 100 84
6 20 84
7 100 84
8 100 84
9 100 100
10 100 100
11 100 -
12 100 -
Example2
Assuming a 4 yearly cycle,calculate the trend using the method of moving
average from the following data

35
t year production 4-yearly M.A centered M.A
1 1961 464 -
2 1962 515 -
3 1963 518 495.75
4 1964 467 503.6
5 1965 502 511.6
6 1966 540 529.5
7 1967 570 553.0
8 1968 571 572.5
9 1969 586 -
10 1970 612 -
In this approach,the measurement of trend consists

• tting a polynomial of degree p(< m) to the 1st M values.

• Using the polynomial to estimate the value in the middle range .this
means that we use an odd number of terms.

• Repeating the operation with M terms starting from 2nd,3rd,4th etc


terms.

Therefore a moving average is characterized byM (extent) ⊂ p(degree)thus


we write moving average like [mp].Several cases shall be considered. CASE1:
M = 2k + 1(odd),p=1

36
Let the polynomial of 1st degree by

X t = a0 + a1 t (12)

This denotes the 1st 2k + 1 observations of the series given by

Xk , X(k−1) · · · X−1 , X0 , X1 · · · Xk

We wish to estimate the value of the middle term the value of middle term
i.e when t = 0 eqn(1) becomes X0 = a0 .To estimate a0 ,we use the principle of
least squares and if we estimate a0 ,we shall have estimated the middle term
X0 .
from eqn(1), the normal equations are

k
X k
X
Xt = (2k − 1)a0 + a1 t
t=−k t=−k
X
z = (Xt − a0 − a1 t)2
dz
da0
=0
Pk
∴ t=−k t =0
P
Xt
∴ a0 = ··· (13)
2k + 1

The above is the arithmetic mean of the rst M = 2k + 1 terms .Therefore


the moving average of extend M is obtained by the arithmetic mean of M
terms starting from 1st,2nd,and 3rd etc terms respectively.From eqn 2,the

37
middle term is â0 is given by â0 = 1
P
X
2k+1 t

The coecient of Xj in the moving average i.e (in â0 ) is called the weight
of jth term(j = 1, 2 · · · M ).

1 1
Cj = = , j = 1, 2 · · · M
2k + 1 m

we write

[M, 1] = [c1 , c2 , · · · cm ]
1 1 1
= [ , ,··· ]
m m m
1
= [1, 1, · · · 1]
m

NB

m
X 1
cj =
j=1
m

m
=
m

=1

CASE 2

38
M = 2k + 1, p = 2 =⇒ [M, 2]

Let the polynomial of degree 2 be tted on 2k + 1 values i.e

X−k , X−(k−1) · · · X−1 , X0 , X1 , · · · Xk

be
Xt = a0 + a1 t + a2 t2

when t = 0,then X0 = a0 which is the middle value.


To estimate a0 ,we use the following normal equations:

X X X
Xt = (2k + 1)a0 + a1 t + a2 t2
X X X
t2 + a1 t 2 + a2 t3
P
tXt = a0
X X X
t2 + a1 t3 + a2 t4
P 2
t X t = a0

but
X X
t= t3 = 0

39
if its true,the above equations reduce to

X X
Xt = (2k + 1)a0 + a2 t2
X X
t 2 Xt t2 + a2 t4
P
= a0

solving the above equations simultaneously we get

X X X X X
Xt t4 = (2k + 1)a0 t 4 + a2 t2 t4
X X X X X X
t2 Xt t2 = a0 t2 t2 + a2 t4 t2

After subtracting we get

X X X XX X X
(2k + 1)a0 t4 − a0 t2 t2 = Xt t4 − t2 Xt t2
P P 4 P 2 P 2
Xt t − t Xt t
â0 = P P (14)
(2k + 1) t4 − ( t2 )2

but

k
X k
X
2
t = 2 t2
t=−k t=−1
2k(k + 1)(2k + 1)
=
6

40
also

k
X k
X
4
t = 2 t4
t=−k t=1
2k(k + 1)(2k + 1)(3k 2 + 3k − 1)
=
30

from the equation(*),the estimate becomes

2k(k+1)(2k+1)(3k2 +3k−1) Xt
P P 2
t Xt 2k(k+1)(2k+1)
30
− 6
â0 = 2k(k+1)(2k+1)(3k2 +3k−1) 2k(k+1)(2k+1) 2
30
−( 6
) af ter

After simplifying we get

(3k 2 + 3k − 1) Xt − 5 t2 Xt
P P
â0 = 3[ ] (15)
(2k + 1)(2k − 1)(2k + 3)

(3k 2 + 3k − 1) − 5t2
(16)
X
= {3[ ]Xt } · · ·
(2k + 1)(2k − 1)(2k + 3)

The weight of ej of Xj i.e the coecient of Xj in b is given by

(3k 2 + 3k − 1) − 5j 2
cj = 3[ ]··· (17)
(2k + 1)(2k − 1)(2k + 3)

where j = −k, · · · k − 1 · · · 0, 1In particular the moving average of extent 5 i.e


[5,2]we have m = 5 = 2k+1thus k=2,then this meansj = −2, −1, 0, 1, 2.Substituting
these values of j & k in (c) we obtain the weights.

−3 12 17 12 −3
c−2 = , c−1 = , c0 = , c1 = , c2 =
35 35 35 35 35

41
∴ [5, 2]

will the same as

[5, 2] = [c−2 , c−1 , c0 , c1 , c2 ]


−3 12 17 12 −3
= [ , , , , ]
35 35 35 35 35
1
= [−3, 12, 17, 12, −3]
35

the trend value of time t is a weighted average of 5 points i.e

Xt−2 , Xt−1 , X0 , Xt+1 , Xt+2

with wefts [5, 2].


That the trend value for the rst ve values are as follows

1
[−3X−2 , 12X−1 , 17X0 , 12X1 − 3X2 ]
35

NB
Weight are systematic over their weighted value and sum is a unit.
EXERCISE
Find MP=[7,2] and MP[9,2] in a similar manner.
Xt 0 1 8 27 64 125 216 343 512 729
Consider the series
t 1 2 3 4 5 6 7 8 9 10
compute trend value at time t=4 using weight [5,2]

42
solution
moving average
1
[5, 2] = [−3, 12, 17, 12, −3]
35

The trend value at t=4 will be

1
= [−3Xt−2 , 12Xt−1 , 17Xt , 12Xt+1 , −3Xt+2 ]
35
1
= [−3(1), 12(8), 17(27), 12(64), −3(125)]
35
1
= [−3, 96, 459, 768, −375]
35

CASE 3

[M = 2k + 1, p = 3]

The 2k + 1 equations are

X−k , X−(k−1) , · · · X−1 , X0 , X1 , · · · Xk−1 , Xk

The polynomial of degree 3 is given by;

Xt = a0 + a1 t + a2 t2 + a3 t3 .

43
We estimate a0 using the following normal equations:

X X X X
Xt = (2k + 1)a0 + a1 t + a2 t2 + a3 t3
X X X X
t2 + a2 t3 + a3 t4
P
tXt = a0 t + a1
X X X X
t2 + a1 t3 + a2 t4 + a3 t5
P 2
t Xt = a0
X X X X
t3 + a1 t4 + a2 t5 + a3 t6
P 3
t Xt = a0

But
X X X
t= t3 = t5 = 0,

Thus the above equations reduce to :

X X
Xt = (2k + 1)a0 + a2 t2
X X
t 2 Xt t2 + a2 t4
P
= a0

These equations are similar for the case when p=2 and so get some results
as in case 2.
Exercise
1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
90 95 98 99 100 98 96 94 97 102 99
1. Obtain weights of moving averages if a polynomial of order 3 was to be
tted in a set of points.

2. Calculate trend value for 1990,in the data below using the results above.

44
Analysis of Time Series containing seasonal variations:

1. Its important to study seasonal variations and determine their eect


on the size of the variable.

2. Eliminate seasonality and determine the value of variable if there are


no seasonal changes.

Determination of seasonal variation is important in planning production pro-


gram or business eciency.Isolation and elimination of seasonal variation
from data is necessary to study the eect of the cycles.
NB
The study of seasonal variation,the data must be given for the parts of
the year namely:monthly,quarterly,weekly,daily and hourly.
The following are dierent methods for measuring seasonal variations

• Methods of simple averages.

• Ratio to trend method.

• Link relative method.

Ratio to trend method.


This method is based on the assumption that seasonal variation for any
month or quarter is a constant factor of the trend.
Steps followed are:

• Obtain trend values by method of least squares method.

45
• Express original data as a % of the trend values .

 Assume the multiplicative model,these percentages will contain


seasonal,trend,cyclic and irregular components.

• Eliminate the cyclic and irregular component by averaging the per-


centages of dierent months or quarters to get the indices of seasonal
variation(preliminary seasonal indices).

• Adjust the above preliminary indices to a total of 1200 for monthly


data or 400 for quarterly data by multiplying them by a constant k
given by:-

k = 1200

sum of preliminary seasonal data


or

k = 400

sum of preliminary seasonal indices for monthly and quarterly data respec-
tively.
Example
Calculate the seasonal variation for the following data using the ratio to
trend method.

46
Year Q1 Q2 Q3 Q4
1970 30 40 36 34
1971 34 52 50 44
1972 40 58 54 48
1973 54 76 68 62
1974 80 72 86 82
Solution:
Determine trend values for the yearly average Xt using the method of
least squares method;
i.e

Xt = a + bt
X
t2
P
Xt = na + b

Year(X) t=X-1972 Xt t2 tXt trend value(Xt = â + b̂t)


1970 -2 35 4 -70 32
1971 -1 45 1 -45 44
1972 0 50 0 0 56
1973 1 65 1 65 68
1974 2 85 4 170 80
0 280 10 120

47
P
Xt 280
∴ â = = = 56
Pn 5
tX 120
b̂ = P 2t = = 12
t 10
∴ Xt = â + b̂t = 56 + 12t

The yearly increment is equal to b = 12 & the quarterly increment is 12


4
=3
We determine the quarterly trend value as follows in 1970,the trend value
for the middle is 32 (middle quarter is 1
2
of 2nd quarter and of 3rd quarter)
since quarterly increment is 3 , we obtain the trend value for 2nd and 3rd
quarter of 1970:

32 − 1.5 and 32 + 1.5

= 30.5 and 33.5

respectively
The trend value of rst quarter of 1970 is:
30.5 − 3 = 27.5
The trend value of 4th quarter of 1970:
33.5 + 3 = 36.5
We get the following table

48
Year Q1 Q2 Q3 Q4
1970 27.5 30.5 33.5 36.5
1971 39.5 42.5 45.5 48.5
1972 51.5 54.5 57.5 60.5
1973 63.5 66.5 69.5 72.5
1974 75.5 78.5 51.5 84.5
1. Express original data as a percentage of trend value to eliminate the
trend:

Year Q1 Q2 Q3 Q4
1970 109.5 131.1 107.1 93.1
1971 86.1 112.4 109.9 90.7
1972 77.7 106.4 93.9 70.3
1973 85.5 114.3 97.8 85.5
1974 106.0 117.1 105.5 97.0
463.9 591.3 514.6 445.6

Find the preliminary indices by dividing the total no:-

463.9
Q1 = 5
= 92.78

591.3
Q2 = 5
= 118.26

514.6
Q3 = 5
= 102.92

445.6
Q4 = 5
= 89.12

49
total = 403.08

Adjusted seasonal indices is got by

400
k=
sum of P SI

To get k,then multiply by P.I

Q1 = 92.1

Q2 = 117.4

Q3 = 102.1

Q4 = 88.4

i.e

400
= 0.992
403.08
e.g Q1 = 92.78 ∗ 0.992 = 92.1

RATIO OF MOVING AVERAGE METHOD


As earlier stated,moving average eliminates periodic movements if the
extend of MA is equal to the period of the oscillatory movements sort to
be eliminated.therefore for monthly data a 12 point MA should completely
eliminate the seasonal movement if they are constant pattern.The following
are steps followed.

50
• calculate the centered 12 month MA averages of the data.

 These moving average values will give estimate of the combined


eect of the trend and cyclic variations.

• Eliminate the trend and cyclic variations by expressing the original


data (except the rst and last 6 months) as a percentage of centered
MA values.

 Using multiplicative model,these percentages will represent the


seasonal and irregular movements/components.

• Eliminate the irregular components by averaging these % to obtain the


preliminary seasonal indices.

• Adjust the indices to make the sum 1200 by multiplying them by a


constant factor k,where

1200
k=
sum of preliminary seasonal indices

The result gives the desired indices of seasonal variation.

EXAMPLE
Use the ratio to moving average method to obtain the seasonal indices
from the following data.
MEASUREMENT OF CYCLIC MOVEMENT

51
A crude method of measuring cyclic uctuation(ct ) of a time series Xt con-
sists of eliminating the trend Tt and seasonal variation St and then removing
the random component et by averaging them.Using the multiplicative model,

Xt = Tt + Ct + St + et

,the following are steps in calculating the cyclic variations Ct .

1. Calculate the trend value Tt using the least squares method and seasonal
index which is to be taken in fractional form and not in percentage form.

2. Divide Xt by Tt .St

3. The resulting value gives the cyclic componentsCt .

Example
From the previous example on ratio to trend method,obtain the cyclic
variations from the data.
solution
From this previous example,we have computed the trend values Tt and
seasonal index (adjusted SI).
We have also eliminated the trend values.Seasonal eects are eliminated
by dividing the eliminated trend values by the adjusted seasonal index and
multiplying them by 100 to get a variable Y .For instance,we eliminate sea-
sonal eect for the rst quarter of 1970 as follows:

52
109.1 109.1
× 100 = × 100 = 118.5
adjusted SI 92.1

Year Q1 Q2 Q3 Q4 Cyclic variation:Y-100


1970 118.5 111.7 105.3 105.3 18.5
1971 93.5 104.3 107.6 102.6
1972 84.4 90.6 92.0 89.6
1973 92.3 97.4 95.8 96.7
1974 115.1 99.7 103.3 109.7

cyclic variation=Y-100
Year Q1 Q2 Q3 Q4
1970 18.5 11.7 5.3 5.3
1971 -6.5 4.3 7.6 2.6
1972 -15.5 -9.4 -8 -10.3
1973 -7.7 -2.6 -4.2 -3.3
1974 15.1 -0.3 3.3 9.7

STATIONARY TIME SERIES

A time series is said to be stationary if it has no systematic change in mean (


i.e. no trend), if it has no systematic change in variance and if strictly there
are no periodic variations.
Most of the probability theory of time series analysis is concerned with

53
stationary time series and for this reason time series analysis often requires
one to change a non-stationary time series into a stationary one so as to be
able to use the above theorem.
The following are mathematical denitions of stationary time series:
Stationary in strict sense/rst order stationary
A time series is said to be stationary in strict sense if the joint distribution
of Xt1 , Xt2 , · · · Xtn is the same as the joint distribution of
Xt1+h , Xt2+h . . . . . . Xtn+h for all t1 , t2 , · · · tn and h, where h is the distance(integer)
between the observations, i.e. probability structure of the series does not
change with time.
Stationary in the weak sense/ second order stationary
In practice it is often useful to divide the stationarity in a less restrictive
way than that given in denition (i) above.
A time series is said to be second order stationary in the weak sense if its
mean is a constant and its auto covariance function is independent of time
but depends only on the distance between the observations.
From this denition, the auto covariance function is denoted by ∂(h) is
dened as:

∂(h) = cov(Xt .Xt+h )

= E(Xt Xt+h ) − E(Xt )E(Xt+h )

54
We note that the auto covariance ∂(h) is inuenced by the units of mea-
surements.
To compare the basic properties of a time series, it is often useful to have
a function that is not inuenced by the units of measurement.
Such a function is called auto correlation function ( ACF) and is denoted
by ρ(h) and is dened as:

ρ(h) = ∂(h)/∂(0) = ∂(h)/var(Xt )

Example 1
Let
Xt = a + bt + et

where
et ∼N(0,σ 2 )

Check if it is stationary.
Solution

E(Xt ) = E(a + bt + et )

= a + bE(t)

, a function of time t.
Xt is not stationary since E(Xt ) is not a constant but depends on time(t).

55
Example 2
Let
Xt = e1 sinλt + e2 Cosλt, t = 0 ± 1

be a time series where


eij ∼ N (0, σ 2 )

for i= 1, 2,...n. Is the process stationary?


Solution

E(Xt ) = E(e1 Sinλt + e2 Cosλt)

= SinλtE(e1 ) + CosλtE(e2 )

= 0

a constant.
Next, the covariance

E(Xt Xt+h ) = E[(e1 Sinλt + e2 Cosλt)(e1 Sinλ(t + h) + e2 Cosλ(t + h)]

= E[e21 SinλtSinλ(t + h)e22 CosλtCosλ(t + h) + e1 e2 SinλtCosλ(t + h) + e2 e1 CosλtS

= SinλtSinλ(t + h)E(e21 ) + CosλtCosλ(t + h)E(e22 )

But

56
e21 = variance = σ 2

= σ 2 (SinλtSinλ(t + h) + CosλtCosλ(t + h))

Using
Cos(A − B) = SinASinB + CosACosB

, then

σ 2 Cos[λ(t + h) − λt]

= σ 2 Cosλh

This is indeed independent of time.


The two conditions for which stationarity is satised and is therefore the
process is stationary in the weak sense.

USE OF FILTERS IN TIME SERIES ANALY-

SIS

A lter is simply a transformation of one random sequence say {Xt } to


another sequence say {Yt }.
If a series is stationary then we can analyze a nite section of the series
and generalize the conclusions to the entire series. This means that we have

57
a task of converting a non-stationary time series before the analysis is carried
out.
A lter can be used to eliminate both trend and seasonality in a given
time series.
Linear lter
A linear lter can be used to convert one time series say{Xt } into another
time series say {Yt } by a linear operator given by:


X
Yt = aj Xt−j
j=−∞

Where : Xt is the original series.


Yt is the series after applying the lter.
aj are some constants.
Suppose

Xt = eiλt

= cosλt + isinλt

NB :We should note


a) Wavelength
b) Phase angle
c) Frequency =λ
d) Amplitude

58
We want to nd the eect of the linear lter on this time series Xt .
Now,

X
Yt = aj Xt−j
j=∞
X∞
= aj eiλ(t−j)
j=−∞

X
= e iλt
ai e−iλt
j=−∞

= e [· · · + a−1 eiλ + a0 + a1 e−iλ + a2 e−2iλ + · · · ]


iλt

= eiλt [· · · + a0 + a1 (cosλ + isinλ) + a1 (cosλ − isinλ) + a2 (cos2λ − isin2λ) + · · · ]


X
= eiλt ( aj (cosλi − isinλj))
j=−∞
X∞ ∞
X
= eiλt ( aj cosλi − i aj sinλj)
j=−∞ −∞
iλt
= e [A1 (λ) − iA2 (λ)]

This is in complex form which is simplied as

A(λ)eiλt

Where
A(λ) = A1 (λ) − iA2 (λ)

59
For any complex number
z = x + iy

z can be expressed as

z = reiθ
y
θ = tan−1 ( )
x

Let

g(λ) = | A1 (λ) − iA2 (λ) |


p
= A1 (λ) − iA2 (λ)

and

A2 (λ)
φ(λ) = tan−1 ( )
A1 (λ)
Yt = g(λ)eiφ(λ) eiλt

= g(λ)ei(φ(λ)+λt)

This means that the lter transforms the original time series

Xt = eiλt

60
to
Yt = g(λ)ei(λt+φλ)

Conclusion

1. The amplitude changes from 1 to g(λ)

2. The wavelength remains the same, i.e is invariant.

3. The phase angle changes from 0 toφ(λ)

The function:
A(λ) is called the transformation function of the lter.
G(λ) is the gain function
φ(λ) Is the phase function of the lter.
Dierencing
This is the process of transforming a non-stationary process to a station-
ary process.
It is a special type of lter which is particularly useful for removing a
trend by simply dierencing a given time series until it becomes stationary.
Example 1
Let
Xt = a + bt + et ,

, et are iid
N (0, σ 2 )

61
.Let 4 be a dierence operator dened by 4t = Xt − Xt−1 = Yt
Solution
initially E(Xt ) = a + bE(t) =⇒ Xt is nonstationary.
Now,

4Xt = a + bt − et − (a + b(t − 1) + et )

= b + et − et−1

=⇒ E(4Xt ) = E(λt) = b

a constant.Again the variance i.e

var(Yt ) = var(b + et − et−1 )

= σ 2 + σ 2 = 2σ 2

under time t.
Since the E(Yt ) is a constant and var(Yt ),then the series Yt is stationary.
Example 2
Consider a trend of second order polynomial given by

Xt = a + bt + ct2 + et

where
et ∼ N (0, σ 2 )

62
Solution
Denitely Xt is nonstationary.
Let

Yt = 4Xt

= Xt − Xt−1

= a + bt + ct2 + et − (a + b(t − 1) + c(t − 1)2 + et−1 )

= b + 2ct − c + et − et−1

=⇒ E(Yt ) = b + 2cE(t) − c

This impliesYt is not stationary.


=⇒ First dierence does not remove non-stationarity/ does not remove
the trend.
Consider the second dierence i.e

4(4Xt ) = 4(Yt ) = Yt − Yt−1 = wt

wt = b + 2ct − c + et − et−1 − (b + 2c(t − 1) − c + et−1 − et−2 )

= 2c + et − et−1 − et−1 + et−2

= 2c + et − 2et−1 + et−2

=⇒ E(wt ) = 2c

63
,a constant
var(wt ) = 2σ 2

a constant.
Hence wt is stationary.
To remove the quadratic trend we need to to dierentiate the series twice.
In general if the trend is polynomial of degree n,we dierentiate n times.
NB
Seasonal eect can also be eliminated by dierencing.
For example, with monthly data we employ the operator

412

,where
412 Xt = Xt − Xt−12

And for quarterly data, we assume the operator , where

44 Xt = Xt − Xt−4

Here we assume that the seasonal indices change slowly with time such
that Xt ≈ Xt−h .
Hence 412 and 44 operators remove monthly and quarterly seasonal vari-
ations respectively to remain with de-seasonalized data.
Example 1

64
Given a seasonal series of a monthly data i.e.Xt , assume that the factors
St are constant so that St is approximately St−12 for all t and that et is a
stationary series.
LetXt = a + bt + st + et . Show that the operator 412 , reduces Xt to
stationary time series.
Solution

412 Xt = Xt − Xt−12

= a + bt + st + et − (a + b(t − 12) + et−12 )

= 12b + st − st−12 + et − et−12

= 12b + et−12

is stationary.

AUTO CORRELATION FUNCTION


Auto correlation coecient measures correlation between operations at dif-
ferent distances apart. The sample correlation coecient at dierent dis-
tances apart provides an important guide to the properties of a time se-
ries. These coecients provide some information concerning the probabil-
ity model that presented the data. Given the observations X1 , X2 , . . . ..Xn
on a discrete time series, we can form n-1 pairs of observations namely
(X1 , X2 ), (X2 , X3 ). . . . . . (Xn−1 , Xn ).

65
Regarding the rst observations in each pair as one variable say Xt and
2nd observation in each pair as the second variable say Xt+1 , i.e.

Xt = X1 , X2 · · · Xn−1

Xt + 1 = X2 , X3 , X4 · · · .Xn

The correlation coecient between the variables Xt and Xt+1 is given by:

Pn−1 Pn−1
t=1 (Xt − X̄(1) ) t=1 (Xt+1 − X̄(2) )
ri = ρ(1) = qP (18)
n−1 2
Pn−1 2
t=1 (Xt − X̄(1) ) t=1 (Xt+1 − X̄(2) )

where
n−1
1 X
X̄(1) = Xt
n − 1 t=1

is the mean of rst (n-1) observations.

n−1
1 X
X̄(2) = Xt+1
n − 1 t=1

is the mean of the second (n-1) observations.


Where r1 measures the correlation between successive observations and
is called the sample auto correlation coecient at lag 1(distance 1) or the
1st serial correlation. For lag 2,

(X1 , X3 ), (X2 , X4 ), · · · (Xn−2 , Xn )

66
. Lag 3,
(X1 , X4 ), (X2 , X5 ), · · · (Xn−3 , Xn )

. NB
We can also get the sample correlation coecient at lag 2, lag 3, etc
Equation (1) is rather complicated so we assume that equation X̄(1) is ap-
proximated by:
Pn
t=1 Xt
X̄(2) ≈
n
n−1
X n−1
X n
X
(Xt − X̄(1) ) ≈ (Xt+1 − X̄(2) ) ≈ (Xt − X̄)2
t=1 t=1 t=1

for large n ,then equation(1) is now approximated by

Pn−1
( t=1 (X − X̄)(Xt+1 − X̄)
r1 = Pnt 2
t=1 (Xt − X̄)

Which is the approximation to use.


The auto correlation coecient between observations at distance h apart
is given by:
P
(Xt − X̄)(Xt+h − X̄)
rh = ρ(h) = P
(Xt − X̄)2
E(Xt Xt+h )
=
E(Xt 2 )
δ(h)
=
δ(0)

rh is the sample auto correlation coecient at lag h or the k th serial auto

67
correlation. The sample auto correlation function can be used to analyze the
time series.
Actually it is an important statistic for describing the time series of the
data.
The correlogram
It provides the objective criteria for exploring the nature of internal struc-
ture of time series.
It is a graph obtained by plottingrh against h. It is a useful aid in inter-
preting a set of correlation co-ecient s for a given time series data.
Its shape helps one to make inference about the time series. It identies
the probability model generating the time series. Although a visual inspec-
tion of the correlogram is very useful, the interpretation of the correlogram is
not an easy task.Some general guidelines are followed in the interpretation.
Some useful time series models
Here we describe several types of stochastic processes which are sometimes
useful in setting up a model or a time series.

1. White noise(purely random)

A discrete stochastic process is called a white noise if it consists of a


sequence of random variables et which are mutually independent and
identically distributed with mean µ and varianceσ 2 .

White noise is a process that has no memory, i.e. the value of process
at time t is uncorrelated with all the past values up to time (t-1) hence

68
it cannot be used for forecasting.

From the above denition it follows that:

E(et ) = µ,a constant

V ar(et )=σ 2 ,a constant.,hence stationary

The auto covariance function is given by:



σ 2

 ,h = 0
δ(h) =

0
 ,h > 0

2. Random walk

Denition:

Suppose that the sequence et is a discrete purely random process with


mean µ and variance σ 2 ,a process say Xt is said to be a random walk
if

Xt = Xt−1 + et with X0 = 0, thus

69
X1 = X0 + e 1 = e 1

X2 = X1 + e2 = e1 + e2

X3 = X2 + e3 = e1 + e2 + e3
..
.
Xt = e1 + e2 + · · · + et
Xt
= ei
t=1

(a linear combination of a white noise process )

t
X
E(Xt ) = (ei )
i=1
Xt
= µ = tµ
i=1
Xt
var(Xt ) = var(ei ) = tσ 2
i=1

So the random walk is a non-stationary process.

However, we note the rst dierence of this process is given by:

4Xt = Xt − Xt−1 = et

70
which is simply a white noise process and it is stationary .One process
that can be modeled by this model is the shared price data, e.g. used
in share prices.

3. Moving averages process

Let et be a white noise with mean 0(zero) and variance σ 2 . Then the process
Xt is said to be a moving average process of order q denoted by:MA(q) if

Xt = β0 et + β1 et−1 + β2 et−2 + · · · + βq et−q

q
X
βj et−j
j=0

,where

k−h = j

=⇒ k =j+h

then

E(et−j et−(k−h) ) = E(e2t−j )

var(et−j ) = σ 2

When
k 6= j + h, k − h 6= j, E(et−j et−(k−h) ) = 0

71
This is because et is a purely process.
REMARKS

δ 2 T he q−h
 P
j=0 βj βj+h , 0 ≤ h ≤ q






δ(h) = 0, h>q





δ(−h),
 h<0

The ACF of MA(q) is given by







 1, h=0

 Pq+h
ρ(h) = j=0 βj βj+h
Pq 2 ,h < 0

 j=0 βj



0
 ,h > 0

We note that the ACF cuts o at lag q, which is a special feature of an


MA process.
In MA(q) process, the colerogram will oscillate between the points (0,1)
and (q,0) and they coincide with the h-axis where h q which is given as:
Diagram

72
No restrictions of Bj are required in order for an MA process to be sta-
tionary. However, it is generally desirable to impose restrictions onBj to
ensure that the process satises a condition called invertibility.(Invertibility
ensures that there is a unique MA process for a given ACF ). We explain the
concept as follows:

1. consider the following rst order MA process

73
A : Xt = et + θet−1
1
B : Xt = et + et−1
θ

From the model A;β0 = 1, β1 = θ.Hence their ACF is

MODEL A: 




1 ,h = 0


ρ(h) = β0 β1
= θ
, h = ±1
 β02 +β12 1−θ2




0
 ,h > 1

2. MODEL B:
1
β0 = 1, β1 =
θ





1 ,h = 0


1
ρ(h) = β1
= θ
, h = ±1
β02 +β12 1+( θ1 )2




0
 h>1

The two processes have same ACF thus we can't identify an MA process
from the given ACF.

74
To invert the model, make et the subject i.e from model A:

Xt = et + θet−1

et = Xt − θet−1

= Xt − θ(Xt−1 − θet−2 )

= Xt − θXt−1 − θ2 et−2

= Xt − θXt−1 + θ2 (Xt−2 − θet−3 )

= Xt − θXt−1 + θ2 Xt−2 − θ3 et−3 + θ4 et−4

Similarly from model B:

1 1 1
et = Xt − Xt−1 + 2 Xt−2 − 3 Xt−3
θ θ θ

| θ |< 1

For
| θ |< 1

the inverted series of model A converges while that of B diverges. Model A


is said to be inverted while B is not.
This property of invertibility ensures that there is a unique MA process
for a given ACF.

75
To test for invertibility for any MA process, we let

β i Xt = Xt−i ∀i

be a backward shift operator.


Then MA(q) can be expressed as:

Xt = β0 et + β1 et−1 + · · · + βq et−q

= β0 β 0 et + β1 β 1 et + · · · + βq β q et

= ( β0 β 0 + β1 β 1 + · · · + βq β q )et

= φ(β)et

where φ(β) is the polynomial of order q in B, then we say MA(q) is


invertible if the roots of the equation φ(β) = O all lie outside the unit circle.
Example.

1. Consider model A
Xt = et + θet−1

is inside or outside the unit circle?

solution

76
β 0 et + θβ 1 et

= (β 0 + θβ 1 )et

φ(β) = (β 0 + θβ 1 ) = 0

1 + θβ = 0

θβ = −1
−1
β = (root)
θ

For | θ |< 1,then the root of β = −1


θ
lies outside the unit circle .
Consider model B
1
Xt = et + et−1
θ

Lies inside the unit circle.


Examples.

1. Determine whether the following process are invertible. Also nd the
LCM

Xt = et + 0.7et−1 − 0.2et−2

where
B0 = 1

B1 = 0.7

B2 = 0.2

77
φ(B) = (1 + 0.7B + 0.2B 2 )

= 2B 2 − 7B − 10 = 0

B = 4.5875 0r − 1.0875

Since the two values are outside the unit circle, we conclude
that Xt is invertible.
MA(2) 




 1 ,h = 0




0.4 , h = ±1

ρ(h) =




 −1 , h = 2




0
 elsewhere

For h = ±1
P1
j=0 βj βj+1 β0 β1 + β1 β2
P2 =
2
j=0 βj
β02 + β12 + β22
(1 × 0.7) + (0.7 × 0.2)
1 + 0.72 + 0.22

Find when h=2

2. Xt = 2et + 3et−1 − 2et−3 ,show that the process is invertible.

Solution

78
For MA(q)





 1, h=0

 Pq−h
βj βj+h
ρ(h) = ρ(h) = j=0
Pq 2 , h = ±1

 j=0 βj



0
 ,h > q





 1, h=0







 9/26 , h = ±1


ρ(h) = 0 , h = ±2








 −4/26 , h = ±3




0
 elsewhere

3. et − 1.3et−1 + 0.4et−2

79
answer 

1, h=0








−0.64 , h = ±1









0.14
 , h = ±2
ρ(h) =

0 elsewhere


















AUTO REGRESSIVE PROCESS


Let {et } be a purely random process with mean 0 and variance σ 2 . Then the
process Xt is said to be auto regressive process of order P (AR(P )) if:

Xt = α1 Xt−1 + α2 Xt−2 + · · · + αp Xt−p + et

is iid.
An AR(1) process can be written as:

Xt = α1 Xt−1 + et

where | α |< 1 · · ·

80
Successive replacing theXt in the AR(I) process we obtain:

Xt = et + αXt−1

= et α(et−1 + αXt−2 )

= et + αet−1 + α2 Xt−2

= et + αet−1 + α2 (et−2 + αXt−3 )

= et + αet−1 + α2 et−2 + α3 Xt−3

= et + αet−1 + α2 et−2 + · · · + αs et−s + αs+1 Xt−(s+1)


Xs
= αj et−j + αs+1 Xt−(s+1)
j=0
s
X
Xt − αj et−j = αs+1 Xt−(s+1)
j=0

Squaring both sides and taking expectations we have:

s
X
E(Xt − αj et−j )2 = E[α2(s+1) Xt−(s+1)
2
]
j=0

From equation 1
E(Xt ) = αE(Xt−1 )

Since
E(et ) = 0

81
Assuming the process is stationary then:

E(Xt ) = E(Xt−1 ) = E(Xt−2 ) · · ·

and their constants.Then

E(Xt ) = αE(Xt−1 ) = 0

= (1 − α)E(Xt ) = 0

but α 6= 0,hence E(Xt ) = 0


From equation two;

s
X
E(Xt − αj et−j )2 = α2(s+1) var[Xt−(s+1) ]
j=0

If Xt is stationary, the E(Xt )= E(Xt−(s+1) = O=constants.


Also:var(Xt ) = var(Xt−(s+1) =constants.
Hence:
s
X
E(Xt − αj et−j ) = α2(s+1) var[Xt ]
j=0

SinceXt is assumed to be stationary, variance of Xt is a constant and


because | α |< 1, the right hand side of the eq(3) goes to zero (0) as s goes
to innity.

82
Therefore:

s
X
E(Xt − αj et−j ) = 0
j=0
=⇒ | α |< 1,

Xt converges into probability

s
X
αj et−j
j=0

i.e

s q
X X
Xt = αj et−j = β j et−j
j=0 j=0

If the above is true, AR(1) converges to an. . . ..


Therefore

s
X
E(Xt ) = αj E(et−j ) = 0
j=0
s j
X
2
X σ2
var(Xt ) = var(et−j ) = σ α2j = , | α |< 1
j=0 j=0
1−α

The auto covariance function

δ(h) = E(Xt Xt+h )

83
since

E(Xt ) = 0
X∞ ∞
X
j
= α E(et−j ) αi E(et+h−j )
j=0 j=0
X∞ X∞
= αj αi E(et−j et+h−i )
j=0 j=0
X∞ X ∞
= αj αi E(et−j et−(i−h )
j=0 j=0

If j = i − h =⇒ i = j + h then

E(et−j et−(i−h ) = σ 2

and when j6= i − h


X
2
δ(h) = σ αj αJ+h
J=0

X
2 h
= σ α α2j
J=0
2 h
σ α
= , | α |< 1
1 − α2

when h=0
σ2
δ(0) =
1 − α2

84
The ACF is given by

δ(h)
δ(0)
σ 2 αh 1 − α2
=⇒ ×
1 − α2 σ2

αh is the auto correlation equation of progressive process of order 1.


For a positive α The corellogram of the above process is of the form.

85
For negative αWe have:

86
ρ(h) = αh

AUTO REGRESSIVE PROCESS OF ORDER 2 (AR (2) PRO-


CESS)

87
For an AR(2) process we have

Xt = αXt−1 + α2 Xt−2 + et

We wish to nd the AFC of


ρ(h)

i.e. we multiply the above equation by

Xt−h

and take expectations i.e.

E[Xt Xt−h ] = α1 E(Xt−1 Xt−h ) + α2 E(Xt−2 Xt−h ) + E(et Xt−h )

We assume the process is stationary and E(Xt ) = constant = 0 but

E(et Xt−h ) = cov(et Xt−h )


X∞
= cov(et αj et−h−j )
j=0

X
= αj cov(et et−h−j ) = 0
j=0
δ(h) = αδ(h − 1) + α2 δ(h − 2)

The ACF
δ(h)
ρ(h) = = α1 ρ(h − 1) + α2 ρ(h − 2) · · ·
δ(0)

88
Equation(i) is known as Yule walker equations. It is linear and homoge-
nous.
To solve equation (i) let:
ρ(h) = mh

be a trial solution,then(i) becomes

mh = α1 mh−1 + α2 mh−2

mh − α1 mh−1 − α2 mh−2 = 0

mh−2 (m2 − α1 m − α2 ) = 0

Since
mh−2 6= 0

then
m2 − α1 m − α2 = 0 · · ·

(characteristic equation)
Equation 2 is known as the auxiliary/characteristic equation.
Let π1 andπ2 be the roots of equation 2 .Then the general solution of the
Yule Walker equations is given by

ρ(h) = A1 π1h + A2 π2h

89
where A1 and A2 are constants to be determined.

α1 ± α21 +4α2
The roots of the auxiliary equations are π1 or π2 = 2
hence
,
AR(2) process will be stationary if
p
α1 ± α12 + 4α2
<1
2

i.e. the absolute value of the roots of the characteristic equations are less
than 1.
Two cases shall be considered:
CASE1

α12 + 4α2 > 0

In this case both roots π1 and π2 are real and distinct .Then the ACF of

ρ(h) = A1 π1h + A2 π2h

=⇒ ρ(0) = A1 + A2 = 1

=⇒ A2= 1 − A1

90
Next from equation (i)

ρ(h) = α1 ρ(h − 1) + α2 ρ(h − 2)

=⇒ ρ(1) = α1 ρ(0) + α2 ρ(−1)

= (1 − α2 )ρ(1) = α1
α1
=⇒ ρ(1) =
1 − α2

but

α1
ρ(1) = A1 π1 + A2 π2 =
1 − α2
α1
∴ A1 π1 + A2 π2 =
1 − α2

and
A2 = 1 − A1

On solving these two equations, we have:

α1 − π2 + α2 π2
A1 =
(1 − α2 )(π1 − π2 )

and

α 1 − π2 + α 2 π 2
A2 = 1 − A1 = 1 −
(1 − α2 )(π1 − π2 )
π1 − α1 − α2 π1
=
(1 − α2 )(π1 − π2 )

91
Hence the ACF becomes

ρ(h) = A1 π1h + A2 π2h


α1 − π2 + α2 π2 h −π1 + α1 + α2 π1 h
ρ(h) = π1 − [ π
(1 − α2 )(π1 − π2 ) (1 − α2 )(π1 − π2 ) 2

This is the ACF of an AR(2) process. On sketching (h) against h the


correlogram decays exponentially with h as shown below.

92
CASE 2
In this case π1 and π2 , the roots are imaginary.
p
α12 α12 + 4α2
π1 = +
2 q 2
α1 i
= + −(α2 + 4α2 ) = reiθ
2 2 p 1
α2 α12 + 4α2
π2 = 1 −
2 q 2
α1 i
= − −(α12 − 4α2 ) = re−iθ
2 2

where

r
α1 2 (−(α12 + 4α2 ))2
r = ) +
(
r 2 4
α1 α 2 √
= ( )2 − 1 − α2 = −α2
2 4

and

1 1
2
−1 2 (−α1 − 4α2 ) 2
θ = tan ( α1 )
2
1
2
−1 (−α1 − 4α2 ) 2
= tan ( )
α

93
The ACF

ρ(h) = A1 π1h + A2 π2h

= A1 (reiθ )h + A2 (re−iθ )h

= rh (A1 eiθh + A2 e−iθh

= rh (A1 (cosθh + isinθh) + A2 (cosθh − isinθh))

= rh (A1 + A2 )cosθh + i(A1 − A2 )sinθh

But
A1 + A2 = 1

and

1
r = −α22
h
=⇒ ρ(h) = (−α2 ) 2 [cosθh + i(A1 + A2 )sinθh]

Suppose
1
ρ(1) = (−α2 ) 2 [cosθ + i(A1 − A2 )sinθ]

94
but

α1
ρ(1) =
1 − α2
1 α1
ρ(1) = (−α2 ) 2 [cosθ + i(A1 + A2 )sinθ] =
1 − α2
α1
[cosθ + i(A1 − A2 )sinθ] = 1
1 − α2 ((−α2 ) 2 )
α1 cosθ
i(A1 − A2 ) = 1
1 − α2 ((−α2 ) )sinθ sinθ
2

α1
= 1 − cosθ
(−α2 ) 2 (1 − α2 )sinθ

Diagram

95
But

α1 1
cosθ = /(−α2 ) 2
2
α1
2cosθ = 1
(−α2 ) 2
2cosθ
i(A1 + A2 ) = − cotθ
sinθ(1 − α2 )
2cotθ
= − cotθ
1 − α2
1 + α2
= cotθ
1 − α2

Hence the ACF

h 1 + α2
ρ(h) = (−α2 ) 2 [cosθh + cotθsinθh]
1 − α2

The correlogram in this case will be damped oscillation as shown below.

96
Examples:
Consider the process

1 3
Xt = Xt−1 + Xt−2 + et
4 64

Is the process stationary? If so obtain its ACF.


Solution
The Yule Walker equations:

ρ(h) = α1 ρ(h − 1) + α2 ρ(h − 2), h > 0


1 3
= ρ(h − 1) ρ(h − 2) (19)
4 64

97
Suppose
ρ(h) = mh

is the trial equation, then (i) becomes:

1 (h−1) 3
mh = m + m(h−2)
4 64
1 (h−1) 3
mh − m − m(h−2) = 0
4 64
(h−2) 2 1 3
m (m − m − ) = 0
4 64

but
m(h−2) 6= 0

1 3
m2 − m − =0
4 64

is the characteristic equation which is quadratic in form.


So the solution of the auxiliary equation becomes.

π1 or π2 = m1 or m2
q
1 1 12
4
± 16 + 64
=
2
π1 or m1 = 3/8

π2 or m2 = −1/8

So general equation of the Yule Walker equation becomes

98
ρ(h) = A1 π1h + A2 π2h

= A1 (3/8)h + A2 (−1/8)h (20)

now

ρ(0) = A1 + A2 = 1, h = 0

A1 = 1 − A2

and
3/8A1 − 1/8A2 , h = 1

From equation 1

ρ(1) = 1/4ρ(0) + 3/64ρ(1)


1/4
ρ(1) = = 16/61
1 − 3/64

from equation ii

3 1
ρ(1) = A1 − A2 = 16/61
8 8

99
and

A1 = 1 − A2

A2 = 55/244

and

A1 = 1 − A2

= 1 − 55/244

= 189/244

therefore the ACF

ρ(h) = A1 π1h + A2 π2h


189 3 h 55 −1 h
= ( ) + ( )
244 8 244 8

Assignment
Consider an AR(2) process given by

1
Xt = Xt−1 − Xt−2 + et
3

Is the process stationary? If so, nd its ACF.

100
SPECTRAL ANALYSIS:

This is the latest method of analyzing time series.


In spectral analysis , we assume that the process is stationary. The time
series can be looked upon as consisting of a nite number of harmonic oscil-
lations of the type
cosXt + sinXt

with the wavelength equal to



λ

. Thus it can be written as a function of the sum sine and cosine terms
otherwise known as nite series.
i.e
h
X
Xt = (aj cosλj t + bj sinλj t) + et
j=1

where
−π ≤ λj ≤ π

Xt is a series of harmonic oscillations.


To study the harmonic oscillations, the concepts of power spectrum/ spi-
ral density function have been developed.
The power spectrum is the natural tool for considering the frequency
properties of a time series. Here we are interested in nding the power
spectrum of spectral density function.

101
Let
Xt ; t = 0, ±1, ±2 · · ·

Dene the auto covariance function

δ(h) = cov(Xt Xt+h )

= E(Xt Xt+h )

,assuming E(Xt ) = 0,the Fourier of the sequence

{δ(h); h = 0, ±1, ±2 · · · }

is given by

1 X
f (λ) = δ(h)e−ihλ
2π h=−∞

Where h is the frequency of harmonic oscillation measured in radians.


This function f (λ) is referred to as the spectral density or power spectrum
of Xt . The function f (λ)is an even function,
i.e.
f (−λ) = f (λ)

The functionf (λ) can also be written in several dierent forms as follows:

1.

1 X
f (λ) = δ(h)e−ihλ
2π h=−∞

102
−1 ∞
1 X
−ihλ
X
= [δ(0) + δ(−h)e + δ(h)e−ihλ ]
2π h=−∞ h=1
∞ ∞
1 X
−ihλ
X
= [δ(0) + δ(−h)e + δ(h)e−ihλ ]
2π h=1 h=1
∞ ∞
1
(21)
X X
= [δ(0) + δ(h)eihλ + δ(h)e−ihλ ]
2π h=1 h=1


1 X
[δ(0)cos0 + δ(h)(eihλ + e−ihλ )]
2π h=1

1 X
= [δ(0) + δ(h)(coshλ + isinhλ + coshλ − isinhλ)]
2π h=1

1
(22)
X
= [δ(0) + 2 δ(h)coshλ
2π h=1

1 X
= [δ(0)cos0 + δ(h)(coshλ + isinhλ + coshλ − isinhλ)]
2π h=1
−1 ∞
1 X X
= [δ(0)cos0 + δ(−h)(cos(−hλ) + δ(h)coshλ]
2π h=1 h=1
−1 ∞
1 X X
= [δ(0)cos0 + δ(h)(cos(hλ) + δ(h)coshλ]
2π h=1 h=1

1 X
= δ(h)coshλ (23)
2π h=−∞

The graph of f (λ) versesλ is called the spectrogram.


The spectral density function can be useful to obtain the ACF. In fact it

103
can be shown that the ACF

ˆ π
δ(h) = f (λ)coshλdλ
−π

for h=0

ˆ π
δ(0) = f (λ)dλ
−π

But

δ(0) = σ 2 (variance).
ˆ π
2
σ = f (λ)dλ
−π
ˆ π
f (λ)
=⇒ 1 = 2

−π σ

f (λ)
σ2
is a pdf of λ.
The function fσ(λ)
2 is known as normalized power spectrum/ normalized
spectral density function λ.
From equation(1),

f (λ)
f (λ) =
σ2

1 X
f (λ) = δ(h)e−ihλ
2π h=−∞

104
,the normalized density function becomes:

1
P∞ −ihλ
f (λ) h=−∞ δ(h)e
f ∗ (λ) = = 2π
σ2 σ2

1 X
= ρ(h)e−ihλ
2π h=−∞

Similarly, from equation (iv) the normalized density function becomes:


∗ f (λ) 1 X
f (λ) = = δ(h)cosλh
σ2 2π h=−∞

1 X
= ρ(h)cosλh
2π h=−∞

Example 1
Find the spectral density function of

et : t = 0, ±1, ±2 · · ·

Where et = stationary where E(et ) = 0.


Solution
This processet is a white noise process/ a purely random process.
Using equation (i) the spectral density function is:


1 X
f (λ) = δ(h)e−ihλ
2π h=−∞

105
but

δ(h) = cov(et et+h )



σ 2 , h = 0


= E(et et+h ) =

0, h > 0

0
1 X
f (λ) = δ(h)e−ihλ
2π h=0
1
= δ(0)e−0


 σ2 , h = 0



=

0
 h>0

which is the spectral density function of a white noise process.


Assignment 2

1. Consider AR(1) process

λ1 = αXt−1 + et

where{et } is a white noise sequence and| α |< 1, Show that the nor-
malized density function , is

f (λ) 1 1 − α2
f ∗ (λ) = =
σ2 2π (1 − 2αcosλ + α2 )

106
2. Consider a rst order moving average process given by

Xt = et + θet−1

Find its normalized density function of−π < λ < π.

FORECASTING

Forecasting the future values in time series in an important problem in many


areas including : Economics, production planning, sales forecasting and stock
control. Let
x1 , x2 , · · · , xn

be the observed time series. The basic problem is to estimate the future
values such that Xn+k made at time n for k steps ahead.
Note : k is an integer called the lead time.
The forecast of Xn+k made at time n for k steps ahead would be denoted
by X̂(n, k). We need to forecast Xn+k is such a way that the mean square
error (MSE) of the predictor X(n,k) is minimal, i.e.

M SE[X̂(n, k)] = E(Xn+k − X̂(n,k) )

should be minimum.
There are so many forecasting procedures which include:

107
a) Box Jenkins procedures.
b) Holt winters approach.
c) Exponential smoothing.
d) Extrapolation of trend curves.
e) Stepwise auto regression.
f) Multiple regression.
Note : There is no simple method which can be applied universally.
In fact the method to be considered depends on the nature of the problem
among other factors.
Forecasting methods will be broadly classied into 3:
a) Subjective method
Forecasting can be made on a subjective basis using judgment, intuition,
commercial knowledge and other relevant knowledge.
b) Uni-variate method
forecasting of a given variable are based on a model tted only to past
observations of the given time series so thatX̂(n, k) depends only on the
observation
x1 , x2 , · · · , xn

For instance, forecasts of future sales of a given product would be based on


or rely entirely on the past sales.
c) Multivariate method:
Forecasts of a given variable depends on at least partly on values of one

108
or more other series called the predictive, explanatory variables, for example,
sales forecasts may depend on stock, advertisement, expenditure, etc.
Note: For our case we only concentrate on uni-variate method.
Extrapolation of trend curves. For long term forecasting it often useful to
t a trends curve (e.g logistic, gompertz, polynomials etc) to successive yearly
totals and extrapolate. The method is suitable for long term forecasting. A
major disadvantage of this method is that there is no logical basis . For
choosing among the dierent curves except the goodness of t unfortunately
it is often the case that one can nd several curves which t a give set of data
almost equally well but which can be protected forward they give dierent
forecast.
b) Exponential smoothing
This method should only be used in cases of non seasonal time series
showing no systematic trend. Given a non-seasonal time series with no trend

x1 , x2 , · · · , xn

it is natural to take an estimate of let's say Xn+1 as a weighted sum of past


observations, i.e.

X̂(n+1) = C0 Xn + C1 Xn−1 + C2 Xn−2 + . . .

where Ci are weights.


It seems reasonable to give more weight to resent observations and the less

109
to observations further in the past. An appealing set of weights are geometric
weight which decrease by a constant ratio. To make sure the weights add to
1 we take

Ci = α(1 − α)i , i = 0, 1, 2, · · ·

where α is a constant such that

0<α<1

,then

X̂(n+1) = αXn + α(1 − α)Xn−1 + α(1 − α)2Xn−2 · · ·

= αXn + (1 − α)[αXn−1 + α(1 − α)Xn−2 + · · · ]

= αXn + (1 − α)X̂(n−1,1) · · · (24)

Suppose we set the forecast of X2 to be X̂(1,1) then we can use ∗to compute
recursively.
Equation ∗can be sometimes written in the error correction form

X̂(n,1) = αXn − αX̂(n−1,1) + X̂(n−1,1)

= α(Xn − X̂(n−1,1) ) + X̂(n−1,1)

= αen + X̂(n−1,1)

110
Where
en = (Xn − X̂(n−1,1)

is the error term at time n.


The value of the smooth constant αdepends on the properties of a given
time series. Values between 0.1 and 0.3 commonly used and produce a fore-
cast which depends on a large number of past observations . alternatively
the values of αcan also be estimated from the given data.
The sum of squared prediction errors is computed for dierent values of
αand the values of α is chosen which minimizes the sum of squares.
Given the values of α calculate

X̂(1, 1) = X1

solution

e2 = X2 − X̂(1, 1) = X2 − X1

= X̂(2, 1) = αe2 + X̂(1, 1)

e3 = X3 − X̂(2, 1)
..
.

en = Xn − X̂(n − 1, 1)

111
and compute
n
X
= e2i
i=2

Repeat the procedure for other values of αbetween 0 and 1 and select the
value which minimizes
n
X
= e2i
i=2

c) The BOX-JENKINGS PROCEDURE.


The forecasting procedure expressed on the auto regressive integrated
movi9ng average model (ARIMA) and its know as the box Jenkins forecasting
approach. In this approach the process does not need to be stationary. The
following are the main stages of setting up a box Jenkins forecast model.
i) Model identication
In this stage the data is examined to see which member of the class of
ARIMA process appear to be appropriate.
ii) Estimation
After an appropriate model has been chosen the parameters of the model
are chosen
iii) Diagnostic checking
In this stage the residuals from the tted model are examined to see if
the chosen model is adequate.
iv) Consideration of other models is necessary
If the rst model appears to be inadequate for some reasons then other
ARIMA models may be tried until a suitable model is found. When a sat-

112
isfactory model is found, forecast may be readily be found . given the data
up to time n this forecast will involve observation and tted residuals up to
and including time n.
We now nd the optimal forecast of Xn+k at time n.
PREDICTION THEORY
Suppose we have up to time n, i.e.

(Xn , Xn−1, Xn−2 · · · X)

and we need to predict Xn+k for k ≥ 1.Assuming that Xt has 0 mean, the
optimal estimator of Xn+k at time t=n is the conditional expectation ofXn+k
at time n, i.e
X̂(n,k) = E(Xn+k /(X1 , X2 · · · Xn )

Proof.
Let X̂(n, k)be the optimal forecast of Xn+k and X̂(n,k)

any other forecast
of Xn+k .
We introduce the forecast errors


en = Xn+k − X̂(n,k)

113
Then

∗ˆ
E(e∗2
n ) = E(Xn+k − X(n,k) )
2

ˆ + X(n,k)
= E(Xn+k − X(n,k) ˆ − X ∗ˆ )2
(n,k)

ˆ )2 + 2E(Xn+k − X(n,k)
= E(Xn+k − X(n,k) ˆ )(X(n,k) ˆ − X ∗ˆ )2
ˆ − X ∗ˆ ) + E(X(n,k)
(n,k) (n,k)

ˆ − X ∗ˆ ) + E(X(n,k)
= E(e2n ) + 2E(en (X(n,k) ˆ − X ∗ˆ )2
(n,k) (n,k)

suppose we choose X̂(n,k) to make the cross product term vanish then we have

E(e∗2 2 ˆ ∗ˆ 2
n )E(en ) + E(X(n,k) − X(n,k) )

=⇒ E(e∗2 2
n ) ≥ E(en )

i.e MSE of X̂(n,k)



≥MSE of X(n,k)
ˆ
ˆ since MSE of X̂ ∗ ≥MSE of X(n,k)
This shows that X(n,k) (n,k)
ˆ

Equality i X(n,k)
ˆ = X̂ ∗
(n,k)

EXAMPLE
Consider an AR(1) process given by

Xt = αXt−1 + et , | α |< 1

Forecast Xn+1 and Xn+k and also get the MSE in both cases.
solution

114
1. Let the observations
x1 , x2 , · · · , xn

≡ X(1,n) .Then
Xn+1 = αXn + en+1

The optimal forecast of Xn+1 is given by

ˆ
Xn+1 = E(Xn+1 /X(1,n) )

= E(αXn + en+1 /X(1,n) )

= E(αXn /X(1,n) ) + E(en+1 /X(1,n) )

= αXn

2. Finding MSE of X̂(n,1) is given by

E(Xn+1 − X̂(n,1) )2 = E(αXn + en+1 − αXn )2

= E(en+1 )2

= σ̂ 2

115
next,for k-steps ahead

Xn+k = αXn+k−1 + en+k

= en+k + α(αXn+k−2 + en+k−1 )

= en+k + αen+k−1 + α2 Xn+k−2

= en+k + αen+k−1 + α2 en+k−1 + α3 Xn+k−3


..
.
= en+k + αen+k−1 + α2 en+k−1 + · · · + αk−1 en+1 + αXn
Xk
k
= α Xn + αk−j en+j .
j=1

Therefore the optimal forecast becomes

X̂(n,k) = E(Xn+k /X(1,n) )


k
αk−j en+j )/X(1,n) ]
X
k
= E[(α Xn +
j=1
k
= E(α Xn /X(1,n) +) + E( αk−j en+j /X(1,n) )
X
k

j=1
k
= α Xn

116
Next MSE of X̂(n,k) is given by

E(Xn+k X̂(n,k) )2
k
X
= E(αk Xn + αk−j en+j − αk Xn )2
j=1
k
X
= E( αk−j en+j )2
j=1
k
X
= σ2 α2(k−j)
j=1

END!

117

You might also like