Professional Documents
Culture Documents
355
350
345
340
335
330
325
20 22 24 26 28
Time
Definition
A time series is a finite series of numerical data points that represents
the evolution of a certain quantity over reguar time stamps
4000
3500
3000
Time
50
45
40
35
30
Time
400
300
200
100
Time
1996
1997
2001
2007
5500
2012
2013
2014
5000
chom[1:12]
4500
4000
3500
3000
2 4 6 8 10 12
Index
1964
1968
70
1972
1975
60
Temperature(F)
50
40
30
20
10
2 4 6 8 10 12
Index
Additive model
We assume that Xt can be written as
Xt = Tt + St + Et
Multiplicative model
We assume that Xt can be written as
Xt = (Tt ∗ St ) + Et
Xt = Tt ∗ St ∗ Et
Definition
This component represents the global evolution of the considered
phemomenon
600
500
AirPassengers
400
300
200
100
Time
600
500
AirPassengers
400
300
200
100
Time
582
581
580
LakeHuron
579
578
577
576
Time
582
581
580
LakeHuron
579
578
577
576
Time
1 Linear: Tt = a + b × t
2 Polynomial : Tt = a0 + a1 × t + · · · + an × t n
3 Logarithmic : Tt = a + b × log t
4 Exponential : Tt = a × exp(bt)
Definition
The seasonal component represents periodic fluctuations around the mean
inside a period (of length p) and that occur almost identically from period
to period
50
45
40
35
30
Time
50
45
40
2 4 6 8 10 12
Mois
All time series are not composed of both a trend and a seasonal component
The typical kinds of time series are
completely random : Xt = Et
with a trend component only : Xt = Tt + Et
with a seasonal component only : Xt = St + Et
with both a trend and a seasonal component : Xt = Tt + St + Et
Properties :
ρ(0) = 1
ρ(k) ≤ 1, ∀k > 0
0
-1
-2
-3
Index
Series bbg
1.0
0.8
0.6
ACF
0.4
0.2
0.0
0 5 10 15 20 25 30
Lag
ρ(l) → 1, ∀l > 0
2.0
1.8
1.6
yy
1.4
1.2
1.0
xx
Series yy
1.0
0.8
0.6
ACF
0.4
0.2
0.0
0 5 10 15 20 25 30
Lag
ρ(l) → 1, ∀l > 0
20
15
yy
10
5
0
xx
Series yy
1.0
0.8
0.6
ACF
0.4
0.2
0.0
0 5 10 15 20
Lag
-1.0
xx
Series yy
0.0 0.5 1.0
ACF
-1.0
0 5 10 15 20
Lag
40
20
0 20 40 60 80
Index
Series yy
1.0
0.5
ACF
0.0
-0.5
0 5 10 15
Lag
10
5
0
xx
Series zz
1.0
0.8
0.6
ACF
0.4
0.2
0.0
0 5 10 15 20
Lag
Summary:
1 Intuition about the phenomenon
2 Graphical representations of the time series
3 Analysis of the autocorrelation function
I slow decrease of the coefficients → trend
I periodicity of the coefficients → seasonality
I combination of both : trend + seasonality
For an additive model, the time series stays inside a constant ”strip”
around the trend
Xt = a + et ,
with et a residual component.
Problem : how to estimate a in order to predict the future values of Xt ?
x̂n+1 = xn
Ventes réelles
Prévision
350
ventes
300
250
200
5 10 15
Index
Ventes réelles
Prévision par moyenne
Prévision par médiane
350
ventes
300
250
200
5 10 15
Index
x̂n+1 = α xn + (1 − α) x̂n
x̂n+1 = α xn + (1 − α) x̂n
= α xn + (1 − α) ( α xn−1 + (1 − α) x̂n−1 )
x̂n+1 = α xn + (1 − α) x̂n
= α xn + (1 − α) ( α xn−1 + (1 − α) x̂n−1 )
= α xn + α(1 − α) xn−1 + (1 − α)2 (αxn−2 + (1 − α)x̂n−2 )
x̂n+1 = α xn + (1 − α) x̂n
= α xn + (1 − α) ( α xn−1 + (1 − α) x̂n−1 )
= α xn + α(1 − α) xn−1 + (1 − α)2 (αxn−2 + (1 − α)x̂n−2 )
= ...
= α xn + α(1 − α) xn−1 + α(1 − α)2 xn−2 + · · · +
α(1 − α)k xn−k + α(1 − α)n−1 x1 + (1 − α)n x̂1
0.8
alpha = 0.3
alpha = 0.1
Poids associé pour la prévision
0.6
0.4
0.2
0.0
2 4 6 8 10 12 14
Ventes réelles
Prévision Lissage expo simple alpha = 0.7
Prévision Lissage expo simple alpha = 0.3
350
ventes
300
250
200
5 10 15
Index
Principle :
p
X
x̂n = β0 + βk xn−k
k=1