Академический Документы
Профессиональный Документы
Культура Документы
Sören Künzel
srk@berkeley.edu
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 1 / 14
Decreasing IQ
IQ development
120
val
100
80
2 4 6 8 10
t
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 2 / 14
Decreasing IQ
IQ development
130
120
110
val
100
90
80
2 4 6 8 10
Sören Künzel (UC Berkeley) Stat 153: Lecture
t 2 Monday 7th November, 2016 2 / 14
Decreasing IQ
IQ development
130
120
110
val
100
90
80
2 4 6 8 10
Sören Künzel (UC Berkeley) Stat 153: Lecture
t 2 Monday 7th November, 2016 2 / 14
Trend and Seasonality
Xt = mt + st + Zt
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 3 / 14
ARIMA
ARMA(p,q)
{Xt } is said to be ARMA(p, q) with mean µ, if {Xt − µ} is ARMA(p, q),
i.e., if {Xt } is stationary and
φ(B)(Xt − µ) = θ(B)Zt
ARIMA(p,d,q)
{Yt } is said to be ARIMA(p, d, q) with mean µ, if Xt = ∇d Yt is
ARMA(p, d) with mean µ.
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 4 / 14
Seasonal ARIMA
ARMA(P, Q)d
{Xt } is said to be ARMA(P, Q)d with mean µ and period d, if {Xt } is
stationary and
Φ(B d )(Xt − µ) = Θ(B d )Zt
with Φ(B d ) = 1 − φ1 B d − · · · − φP B Pd and
Θ(B d ) = 1 + θ1 B d + · · · + θQ B Qd .
(Xt −µ)−φ1 (Xt−d −µ)−· · ·−φP (Xt−Pd −µ) = Zt +θ1 Zt−d +· · ·+θQ Zt−Qd
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 6 / 14
Example 1 and 2
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 7 / 14
Forecasting
1.) Exploratory Data Analysis (e.g. Should we remove part of the data?),
2.) Transformation,
3.) Deal with Trend and Seasonality(Parametrically, Differencing, . . . )
until we receive a stationary process,
4.) Fit ARMA (or SARMA) model to the residuals,
5.) Model diagnostic (Ljung-Box-Pierce test, AIC, BIC, CV)
6.) Forecasting
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 8 / 14
Model Selection – the General Idea
Which model is better?
350 355 360 365 370 375 380 385
co2_tr
0 20 40 60 80 100 120
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 9 / 14
Model Selection – the General Idea
Which model is better?
350 355 360 365 370 375 380 385
co2_tr
0 20 40 60 80 100 120
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 9 / 14
Model Selection – the General Idea
MSE
Suppose, we had data (x1 , . . . , xn ) and we wanted to predict
(xn+1 , . . . , xn+k ). Then the Mean Squared Error (MSE) is given by
Pn+k
i=n+1 (xi − x̂i )2
MSE = .
k
Our task is to chose the predictor with the lowest MSE.
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 10 / 14
Model Selection – the General Idea
MSE
Suppose, we had data (x1 , . . . , xn ) and we wanted to predict
(xn+1 , . . . , xn+k ). Then the Mean Squared Error (MSE) is given by
Pn+k
i=n+1 (xi − x̂i )2
MSE = .
k
Our task is to chose the predictor with the lowest MSE.
This is impossible since the xi is unobserved for i > n.
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 10 / 14
Estimating the MSE – AIC & BIC
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 11 / 14
Estimating the MSE – AIC & BIC
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 11 / 14
Estimating the MSE – AIC & BIC
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 11 / 14
Estimating the MSE – CV for time series
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 12 / 14
Estimating the MSE – CV for time series
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 12 / 14
Estimating the MSE – CV for time series
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 12 / 14
Estimating the MSE – CV for time series
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 13 / 14
Estimating the MSE – CV for time series
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 13 / 14
Example 3
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 14 / 14
Readings
Sören Künzel (UC Berkeley) Stat 153: Lecture 2 Monday 7th November, 2016 15 / 14