Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

Time series

It is an arrangement of data in chronological order (in


accordance with time of its occurrence)

A time series may be defined as a collection of readings


belonging to different time periods of some economic variable
or composite of variables

Where y is value of phenomenon under consideration at time t.

1 Dr Madhusudhan Zalki
Components of time series

1. Secular trend
2. Cyclical variation
3. Seasonal variation
Short term fluctuations

4. Irregular variation

2 Dr Madhusudhan Zalki
Mathematical model
Additive model
Y=T+S+C+I

3 Dr Madhusudhan Zalki
Multiplicative model

Mixed Model

4 Dr Madhusudhan Zalki
Trend: trend is also called as secular trend or long
term trend, basic tendency of a series to grow or
decline over a period of time.

The concept of trend does not include short term


oscillations but rather study movement over a long
period of time.

5 Dr Madhusudhan Zalki
Time Series
Secular Trend:
The value of the variable tends to increase or
decrease over a long period of time.

6 Dr Madhusudhan Zalki
7 Dr Madhusudhan Zalki
8 Dr Madhusudhan Zalki
Measurement of trend
1. Graphic method
2. Method of semi-averages
3. Method of curve fitting (method of least squares)
4. Method of moving averages

9 Dr Madhusudhan Zalki
Method of semi-averages
years 1993 1994 1995 1996 1997 1998
Sales (‘000) 20 24 22 30 28 32

Semi- 22 30
average

10 Dr Madhusudhan Zalki
Least square method: linear trend
y  a  bx

b
xy  n x y
b 2
 x  nx 2 a

a  y  nx

11 Dr Madhusudhan Zalki
t  AM (t )
x if n is odd
interval
t  AM (t )
x if n is even
1 / 2 interval

12 Dr Madhusudhan Zalki
a
 y
n

b
 xy
x 0
x 2

13 Dr Madhusudhan Zalki
Fit a linear trend for the following data.

year Production
1990 18
1992 21
1994 23
1996 27
1998 16

14 Dr Madhusudhan Zalki
Exponential Trend

15 Dr Madhusudhan Zalki
Method of moving average
This is simple and flexible method of measuring trend. It
consists in obtaining series of moving averages of
successive overlapping groups and sections of time
series.
The average process smoothens out fluctuations in the
given data.
The moving average of period m overlapping the values
starting from 1st ,2nd and 3rd …..are given by the
following formula

16 Dr Madhusudhan Zalki
For the time series
The MA of time period m is

17 Dr Madhusudhan Zalki
t y 3year MA
t1 y1 _
t2 y2 ma1=(y1+y2+y3)/3
t3 y3 ma2=(y2+y3+y4)/3
t4 y4 ma3=(y3+y4+y5)/3
t5 y5 Ma3=(y4+y5+y6)/3
t6 y6 Ma4=(y5+y6+y7)/3
t7 y7 _

18 Dr Madhusudhan Zalki
Cyclical Fluctuations

19 Dr Madhusudhan Zalki
Cyclical Variation
Percent of trend

y y  yest
 100 100
yest
yest

20 Dr Madhusudhan Zalki
Seasonal Variation

21 Dr Madhusudhan Zalki
Stationary time series
 Stationary time series is one whose properties
do not depend on the time at which the series is
observed. 
Thus, time series with trends, or with seasonality,
are not stationary
the trend and seasonality will affect the value of
the time series at different times. On the other
hand, a white noise series is stationary
it does not matter when you observe it, it should
look much the same at any point in time.

22 Dr Madhusudhan Zalki
{Xt} is a strictly stationary time series
if (X1,...,Xn)’ (X1+h,...,Xn+h)’ for all all integers
h and n ≥ 1. (Here is used to indicate that the
two random vectors have the same joint
distribution function.)

23 Dr Madhusudhan Zalki
Properties
Properties of a Strictly Stationary Time Series {Xt}:
a) The random variables Xt are identically
distributed.
b). (Xt, Xt+h)’ (X1, X1+h)’ for all integers t and h.
c. {Xt} is weakly stationary if E(X2t ) < ∞ for all t.
d. Weak stationarity does not imply strict
stationarity.
e. An iid sequence is strictly stationary.

24 Dr Madhusudhan Zalki
25 Dr Madhusudhan Zalki
differencing
One way to make a non-stationary time series
stationary
Compute the differences between consecutive
observations. This is known as differencing.

26 Dr Madhusudhan Zalki
Random walk model
The differenced series is the change between
consecutive observations in the original series,
and can be written as
y′t=yt−yt−1.
The differenced series will have only T−1 values,
since it is not possible to calculate a difference y′1
for the first observation.

27 Dr Madhusudhan Zalki
When the differenced series is white noise, the
model for the original series can be written as
yt−yt−1=εt, where εt denotes white noise.

Rearranging this leads to the “random walk” model

yt=yt−1+εt.

28 Dr Madhusudhan Zalki
29 Dr Madhusudhan Zalki
Autocovarince function(AVCF)
we introduced the concept of stationarity
and defined the autocovariance function
(ACVF) of a stationary time series {Xt} as
γ (h) = Cov(Xt+h, Xt), h= 0, ±1, ±2,...

30 Dr Madhusudhan Zalki
Autocorrelation function
The autocorrelation function (ACF) reveals how
the correlation between any two values of the
signal changes as their separation changes. It is
a time domain measure of the stochastic process
 memory, and does not reveal any information
about the frequency content of the process.
Generally, for an error signal, et, the ACF is
defined as,

31 Dr Madhusudhan Zalki
For a stationary stochastic process of variance
σ2, the previous expression for the ACF reduces
to

which is time-independent. A white noise process


has an autocorrelation function of zero at all lags
except a value of unity at lag zero, to indicate that
the process is completely uncorrelated

32 Dr Madhusudhan Zalki
Test for stationarity
Augmented Dickey-Fuller Test 

H0: The time series is non-stationary. In other words, it


has some time-dependent structure and does not have
constant variance over time.
HA: The time series is stationary.
If the p-value from the test is less than some
significance level (e.g. α = .05), then we can reject the
null hypothesis and conclude that the time series is
stationary.

33 Dr Madhusudhan Zalki
If p<=0.05 Ho rejected
If > 0.05 Ho accepted

34 Dr Madhusudhan Zalki
# dickey fuller test
library(tseries)
data=c(3,4,4,5,6,7,6,6,7,8,9,10,12)
plot(data,type='l')
adf.test(data)

Augmented Dickey-Fuller Test


data: data
Dickey-Fuller = -0.77229, Lag order =2, p-value = 0.9523
alternative hypothesis: stationary

35 Dr Madhusudhan Zalki
Properties of the Sample Mean and
Autocorrelation Function
A stationary process {Xt} is characterized, at least
from a second-order point of view, by its mean µ and
its auto covariance function γ (·).
The estimation of µ, γ (·), and the autocorrelation
function ρ(·)= γ (·)/γ (0) from observations X1,...,Xn
therefore plays a crucial role in problems of
inference and in particular in the problem of
constructing an appropriate model for the data. In
this section we examine some of the properties of
the sample estimates and of µ and ρ(·),
respectively.
36 Dr Madhusudhan Zalki
Estimation of µ
is unbiased estimate of since

The mean squared error of is


)

37 Dr Madhusudhan Zalki
Now if the RHS of equation A converges to 0

If

38 Dr Madhusudhan Zalki
To make inferences about µ using the sample mean , it is
necessary to know the distribution or an approximation
to the distribution of . If the time series is Gaussian

For many time series, in particular for linear and ARMA


models, is approximately normal with mean µ and
variance
for large n.

39 Dr Madhusudhan Zalki
An approximate 95% Confidence interval for mean µ
is

Where

Of course is not known it is estimated.

40 Dr Madhusudhan Zalki
Estimation of and

The sample auto covariance and auto correlation


function are given by

and

Both estimates of and are biased, However for


large n
the estimates are unbiased.

41 Dr Madhusudhan Zalki
The sample k dimensional covariance matrix is

If is nonnagative definite

42 Dr Madhusudhan Zalki
For systematic inference concerning ρ(h), we need the
sampling distribution of the estimator . Although the
distribution of is intractable for samples from even the
simplest time series models, it can usually be well
approximated by a normal distribution for large sample
sizes. For linear models and in particular for ARMA
models

is approximately distributed for large n as N (ρk, n−1W ),


i.e.,
≈ N( ρ, n−1 W)
where ρ = (ρ(1), . . . , ρ(k)) , and W is the covariance
matrix whose (i, j ) element is given by Bartlett’s formula

43 Dr Madhusudhan Zalki
wij =

44 Dr Madhusudhan Zalki
MA(q) process
The MA(q) Process: {Xt} is a moving-average
process of order q if
Xt = Zt + θ1Zt−1 +···+ θqZt−q ,
where
{Zt} ∼ WN(0, σ2)

and θ1,...,θq are constants.

45 Dr Madhusudhan Zalki
46 Dr Madhusudhan Zalki
Linear Process
The time series {Xt} is a linear process if it has the
representation

for all t, where {Zt} ∼ WN( 0, σ2)


and {ψj } is a sequence of constants with < ∞

47 Dr Madhusudhan Zalki
ARMA process

The time series {Xt} is an ARMA(1, 1) process if it is


stationary and satisfies (for every t)
Xt − φXt−1 = Zt + θZt−1,
where {Zt} ∼ WN( 0, σ2)
and φ + θ ≠ 0

48 Dr Madhusudhan Zalki

You might also like