Richard A. Davis
Department of Statistics
Outline
Data compression
-provide compact description of the data.
Explanatory
-seasonal factors
-relationships with other variables (temperature,
humidity, pollution, etc)
Signal processing
-extracting a signal in the presence of noise
Prediction
-use the model to predict future values of the time series
2
320
330
CO2
340
350
1960
1970
1980
1990
Features
10
5
0
-5
temp
15
20
200
400
600
800
1000
1200
Features
seasonalGo
(monthly effect)
to ITSM Demo
more variability in Jan than in July
4
10
5
temp
15
20
-5
40
60
80
100
18
17
16
15
temp
19
20
20
40
60
80
100
Go to ITSM Demo
m t = (.5 xt 6 + xt 5 + + xt +5 + .5 xt + 6 ) / 12
polynomial fitting
m t = a0 + a1t + + ak t k
Xt = mt + st + Yt
2
2
st = A cos( t ) + B sin( t )
12
12
Irregular component Yt
Yt = X t m t st
8
s1
c1
c0
20
20
),, cos(
6) )' /sqrt(6)
6
6
2
2
c1 = (cos( ), , cos ( 6) )' /sqrt(3)
6
6
2
2
s1 = (sin( ), , sin ( 6 ) )' /sqrt(3)
6
6
c 0 = (cos(
c2
22
22
6) )'/sqrt(3)
c2 = (cos( ),, cos(
6
6
22
2 2
), , sin (
6) )' /sqrt(3)
6
6
s2
s 2 = (sin(
c3
2
2
c3 = (cos( ),, cos( 6) )'/sqrt(6
2
2
sin( j )
cos( j )
1
1/ 2
1/ 2
1/ 2
sin(
2
)
cos(
2
)
1
2
1
2
j
j
c0 =
, sj =
, cj =
n
n
n
sin( n j )
cos(n j )
1
10
1
a0 = (x, c 0 ) = 1/ 2
n
21/ 2
a j = (x, c j ) = 1/ 2
n
21/ 2
b j = ( x, s j ) = 1 / 2
n
x
t =1
x cos( t )
t =1
x sin( t )
t =1
11
2. Sum of squares.
n
t =1
x t2 = a 02 + a 2j + b 2j
j =1
DF
Sum of Squares
a02
I(0)
1=2/n
a12 + b12
2 I(1)
m =2m/n
am2 + bm2
2
x
t
t
Periodgram
2 I(m)
12
DF
Sum of Squares
0=0 (period 0)
1=2/6 (period 6)
2 =22/6 (period 3) 2
a02
3 =23/6 (period 2) 1
6
= 4.0
a32
= 0.25
2
t
= 58.75
xt = 5 cos(
2
2
t ) + 3 sin( t ), t = 1,2, ,120.
12
12
ITSM DEMO
14
Differencing at lag 12
Sometimes, a seasonal component with period 12 in the time
series can be removed by differencing at lag 12. That is the
differenced series is
yt = xt xt 12
Now suppose xt is the sinusoid with period 12 + noise.
xt = 5 cos(
2
2
t ) + 3 sin( t ) + t , t = 1,2, ,120.
12
12
Then
yt = xt xt 12 = t t 12
which has correlation at lag 12.
15
ITSM DEMO
16
Noise.
-2
x_t
20
40
60
80
100
120
time
x_{t+1}
x_{t+1}
x_{t+1}
x_{t+1}
-1.0
-0.5
0.0
0.5
1.0
1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
-1.0
-1.0
-1.0
-1.0
-0.5
-0.5
-0.5
-0.5
0.0
0.0
0.0
0.0
0.5
0.5
x_t 0.5
0.5
x_t
x_t
x_t
1.0
1.0
1.0
1.0
tt
11
rrt
t
-.19
-.19
rrt+25
t+1
t+1
t+2
-.13
.13
-.14
-.25
22
33
-.14
-.14
-.25
-.25
-.32
.04
-.25
-.13
-.13
.20
-.13
-.32
44
-.13
-.13
-.02
.47
-.32
-.02
1.5
1.5
1.5
1.5
18
ACF
0.2
0.4
0.6
0.8
1.0
0.0
10
20
30
40
lag
0.4
0.2
0.0
-0.2
ACF
0.6
0.8
1.0
white noise
10
20
lag
30
40
19
340
1970
1980
1990
1960
1970
1980
1990
1960
1970
1980
1990
1960
1970
1980
1990
340
1960
1 2 3
-1
1.0
0.0
-1.0
irregular part
-3
seasonal
320
trend
320
CO2
20
21
Inspection of residuals.
Are they compatible with white (independent) noise?
no discernible trend
no seasonal component
future values
22
Two examples
Sunspots
23
Other directions
Xt= mt + st + Yt + t
24