13 Stationarity, MA Models, ACF & PACF

1 Time Series Models, Stationarity

Examples

  1. Let yt=β0+β1t+εt. Then Eyt=β0+β1t,Var(yt)=σ2,Cov(yt1,yt2)=0.
  2. Let yt=β0+β1cos(2πft)+β2sin(2πft)+εt. Then Eyt=β0+β1cos(2πft)+β2sin(2πft),Var(yt)=σ2,Cov(yt1,yt2)=0.
  3. Let yt=β0+j=1m(β1jcos2πjtn+β2jsin2πjtn), with β1j,β2ji.i.dN(0,τj2). So Eyt=β0, and Cov(yt1,yt2)=j=1m[Cov(β1jcos2πjt1n,β1jcos2πjt2n)+Cov(β2jsin2πjt1n,β2jsin2πjt2n)]=j=1m[τj2cos2πjt1ncos2πjt2n+τj2sin2πjt1nsin2πjt2n]=j=1mτj2cos2πj|t1t2|n.

Stationarity

A doubly infinite sequence of random variables yt is said to be stationary if all of the following conditions hold:
4. Eyt is the same for all times t.
5. Var(yt) is the same for all times t.
6. Cov(yt1,yt2) only depends on |t1t2|.

For a stationary {yt}, we can define γ(h)=Cov(yt,yt+h). Call γ(h) the ACVF (AutoCovariance Function). Observe that γ(0)=Cov(yt,yt),γ(h)=γ(h), so γ(h) is a symmetric function of h, so we only consider nonnegative h.

Define ACF (AutoCorrelation Function): ρ(h)=Cov(yt,yt+h)Var(yt)Var(yt+h)=γ(h)γ(0).
So ρ(0)=1,ρ(h)=ρ(h).

Note that

(Gaussian) White Noise Model

yt=εt,εti.i.dN(0,σ2). It's easy to check that Eyt=0,γ(h)=σ21{h=0},ρ(h)=1{h=0}.

2 MA Models

The Moving Average Model (MA) with order q is defined by (2.1)yt=μ+εt+θ1εt1++θqεtq, where εti.i.dN(0,σ2). Denote as MA(q). There are q+2 unknown parameters: μ,θ1,,θq,σ.

For MA model Cov(yt,yt+h)=Cov(μ+j=0qθjεtj,μ+k=0qθkεt+hk)=j=0qk=0qθjθkCov(εtj,εt+hk).
(take θ0=1). Since {εt} is Gaussian white noise, Cov(εtj,εt+hk)=0, unless tj=t+hkk=j+h. So we need 0jq,0kq,k=j+h. Then Cov(yt,yt+h)={σ2j=0qhθjθj+h,0hq.0,h>q.
It does not depend on t, so MA(q) is stationary, and Cov(yt,yt+h)=γ(h), and ρ(h)={j=0qhθjθj+hj=0qθj2,0hq,0,h>q.
For MA(1), yt=μ+εt+θεt1, and ρ(h)={1,h=0,θ11+θ12,h=1,0,h>1.

3 Sample ACF

For fixed h, the sample ACF at lag h is defined as: t=1nh(ata)(btb)t=1nh(ata)2t=1nh(btb)2=t=1nh(yta)(yt+hb)t=1nh(yta)2t=1nh(yn+hb)2, where a=1nht=1nhyt,b=1nht=1nhyt+h.
We can simplify by ay,by, and t=1nh(yta)2t=1n(yty)2,t=1nh(yt+hb)2t=1n(yty)2. (reasonable when h is small compared to n). Then define sample ACF: rh=t=1nh(yty)(yt+hy)t=1n(yty)2,h=0,1,2,
Note that r0=1.

Although sample ACF can be computed for any time series, it is only useful for stationary ones.

Sample ACF is useful in determining q: sample ACF after lag q is very small/close to 0.

4 Sample PACF

Define sample PACF (Partial AutoCorrelation) of h as ϕ^h (estimate of ϕh) when AR(h) is fit to the data.

Sample PACF is useful in determining p in AR(p): sample PACF after p is very small/close to 0.

Why PACF? Suppose we have data (x1,y1),,(xn,yn). The correlation is then Corr(x,y)=i=1n(xix)(yiy)i=1n(xix)2i=1n(yiy)2.
Under usual OLS (see here), β^1=i=1n(xix)(yiy)i=1n(xix)2=Corr(x,y)Var(y)Var(x).
Now we also have data on other variables z1,,zk, and dataset becomes (yi,xi,zi1,,zik),i=1,,n. The partial correlation between x,y given z1,,zk is given by Corr(x,y|z1,,zk): define residual of x given z1,,zk as the residual in linear regression eix|z1,,zk=xiβ^0xβ^1xzi1β^kxzik, and Corr(x,y|z1,,zk)=Corr(ex|z1,,zk,ey|z1,,zk).
And for multiple linear regression, denote coefficients (RSS minimizer) as β^0,β^x,β^1,,β^k, then β^x=Corr(x,y|z1,,zk)Var(ey|z1,,zk)Var(ex|z1,,zk).
Now for time series setting with y1,,yn with AR(p), we can write ϕ^p=Corr(ytp,yt|yt1,,ytp+1)Var(eyt|yt1,,ytp+1)Var(eytp|yt1,,ytp+1).
When AR(p) is stationary, ϕ^pCorr(ytp,yt|yt1,,ytp+1).