Algorithm Search⌘K

Definitionintro

Stationary process

Also called weakly stationary process, covariance stationary process, second-order stationarity.

A process whose mean is constant and whose autocovariance depends only on the lag. Strict stationarity asks that all joint laws be shift invariant.

A stationary process is a sequence of random variables {Xt}\{X_t\} whose statistical behaviour does not change when the time origin moves. There are two common versions. A strictly stationary process has the same joint distributions after any shift of time. A weakly stationary process, also called covariance stationary or second-order stationary, only needs a constant mean and a covariance Cov⁡(Xt+h,Xt)\operatorname{Cov}(X_{t+h}, X_t) that depends on the lag hh and not on tt. Most of linear time series analysis (ARMA models, Yule-Walker estimation, the Wold decomposition, spectral analysis) uses only the weak version, because it is a statement about the first two moments, and those are what linear prediction uses.

Definition

Time series. A time series model is a family of real random variables {Xt:t∈Z}\{X_t : t \in \mathbb{Z}\} on one probability space. Data are one observed stretch x1,…,xnx_1, \ldots, x_n of one path.

Strict stationarity. {Xt}\{X_t\} is strictly stationary when, for every k≥1k \ge 1, all times t1,…,tkt_1, \ldots, t_k and every shift s∈Zs \in \mathbb{Z}, the random vectors (Xt1,…,Xtk)(X_{t_1}, \ldots, X_{t_k}) and (Xt1+s,…,Xtk+s)(X_{t_1 + s}, \ldots, X_{t_k + s}) have the same joint distribution.

Weak stationarity. {Xt}\{X_t\} is weakly stationary when

  1. E[Xt2]<∞\mathbb{E}[X_t^2] < \infty for every tt,
  2. E[Xt]=μ\mathbb{E}[X_t] = \mu for every tt, and
  3. Cov⁡(Xt+h,Xt)\operatorname{Cov}(X_{t+h}, X_t) is the same for every tt, for each h∈Zh \in \mathbb{Z}.

The common value in item 3 is the autocovariance function γ(h)=Cov⁡(Xt+h,Xt)\gamma(h) = \operatorname{Cov}(X_{t+h}, X_t). When γ(0)>0\gamma(0) > 0, the autocorrelation function is ρ(h)=γ(h)/γ(0)\rho(h) = \gamma(h)/\gamma(0). The names weakly stationary, covariance stationary and second-order stationary mean the same thing. In this encyclopedia "stationary" without a qualifier means weakly stationary, as in Brockwell and Davis.

White noise. {εt}\{\varepsilon_t\} is white noise with variance σ2\sigma^2, written εt∼WN(0,σ2)\varepsilon_t \sim \mathrm{WN}(0, \sigma^2), when it is weakly stationary with mean 0, γ(0)=σ2\gamma(0) = \sigma^2 and γ(h)=0\gamma(h) = 0 for h≠0h \ne 0. The terms are uncorrelated, not necessarily independent. A sequence of independent and identically distributed variables with mean 0 and variance σ2\sigma^2, written IID(0,σ2)\mathrm{IID}(0, \sigma^2), is white noise, but white noise need not be IID.

Basic facts. For a weakly stationary process:

  • (a) Symmetry and bound. γ(−h)=γ(h)\gamma(-h) = \gamma(h) and ∣γ(h)∣≤γ(0)|\gamma(h)| \le \gamma(0). Proof. γ(−h)=Cov⁡(Xt−h,Xt)=Cov⁡(Xt,Xt−h)=γ(h)\gamma(-h) = \operatorname{Cov}(X_{t-h}, X_t) = \operatorname{Cov}(X_t, X_{t-h}) = \gamma(h) by item 3 at time t−ht - h. The bound is the Cauchy-Schwarz inequality, ∣Cov⁡(Xt+h,Xt)∣≤Var⁡(Xt+h)Var⁡(Xt)=γ(0)|\operatorname{Cov}(X_{t+h}, X_t)| \le \sqrt{\operatorname{Var}(X_{t+h}) \operatorname{Var}(X_t)} = \gamma(0). □\square
  • (b) Nonnegative definiteness. For all kk, times t1,…,tkt_1, \ldots, t_k and real a1,…,aka_1, \ldots, a_k, ∑i,jaiajγ(ti−tj)≥0\sum_{i, j} a_i a_j \gamma(t_i - t_j) \ge 0. So every matrix Γk=[γ(i−j)]i,j=1k\Gamma_k = [\gamma(i - j)]_{i, j = 1}^k is a symmetric Toeplitz matrix that is positive semidefinite. Proof. The sum equals Var⁡(∑iaiXti)\operatorname{Var}(\sum_i a_i X_{t_i}), which is not negative. □\square The converse also holds: a function γ\gamma on Z\mathbb{Z} is the autocovariance function of some stationary process if and only if it is even and nonnegative definite. For the converse, take the Gaussian process with mean 0 and these covariances; Kolmogorov's extension theorem says that it exists, because the finite-dimensional normal laws are consistent (Brockwell and Davis 1991, Section 1.5).
  • (c) Strict and weak. A strictly stationary process with E[Xt2]<∞\mathbb{E}[X_t^2] < \infty is weakly stationary, because the mean and the covariances are functions of the one- and two-dimensional laws. A weakly stationary Gaussian process is strictly stationary, because a Gaussian joint law is fixed by its mean vector and covariance matrix, and these do not change under a shift. Without the Gaussian assumption neither version implies the other (see the non-examples).
  • (d) Spectral density. If ∑h∣γ(h)∣<∞\sum_h |\gamma(h)| < \infty, the function f(λ)=12π∑h∈Zγ(h)e−ihλf(\lambda) = \frac{1}{2\pi} \sum_{h \in \mathbb{Z}} \gamma(h) e^{-ih\lambda}, λ∈[−π,π]\lambda \in [-\pi, \pi], is the spectral density. It is even, nonnegative, and γ(h)=∫−ππeihλf(λ) dλ\gamma(h) = \int_{-\pi}^{\pi} e^{ih\lambda} f(\lambda)\, d\lambda. In general, Herglotz's theorem gives γ(h)=∫eihλ dF(λ)\gamma(h) = \int e^{ih\lambda}\, dF(\lambda) for a unique bounded spectral distribution FF (Brockwell and Davis 1991, Section 4.3). Power spectral density and the Wiener-Khinchin theorem give the signal processing view. Note the 1/(2π)1/(2\pi): with it, ff is the density of the variance over the angular frequency λ\lambda.

Sample versions. From data x1,…,xnx_1, \ldots, x_n with mean xˉ\bar x, the sample autocovariance is

γ^(h)=1n∑t=1n−∣h∣(xt+∣h∣−xˉ)(xt−xˉ),∣h∣<n,\hat\gamma(h) = \frac{1}{n} \sum_{t = 1}^{n - |h|} (x_{t + |h|} - \bar x)(x_t - \bar x), \qquad |h| < n,

and ρ^(h)=γ^(h)/γ^(0)\hat\rho(h) = \hat\gamma(h)/\hat\gamma(0). The divisor is nn, not n−∣h∣n - |h|, for a reason that is a theorem: with divisor nn, every matrix Γ^k=[γ^(i−j)]i,j=1k\hat\Gamma_k = [\hat\gamma(i - j)]_{i, j = 1}^k is positive semidefinite, and it is positive definite when γ^(0)>0\hat\gamma(0) > 0. Proof. Let d=(x1−xˉ,…,xn−xˉ)d = (x_1 - \bar x, \ldots, x_n - \bar x). Let TT be the k×(n+k−1)k \times (n + k - 1) matrix whose row ii is dd shifted right by i−1i - 1 places, with zeros elsewhere. Then (TT⊤)ij=nγ^(i−j)(T T^\top)_{ij} = n \hat\gamma(i - j), so Γ^k=TT⊤/n\hat\Gamma_k = T T^\top / n is positive semidefinite. If γ^(0)>0\hat\gamma(0) > 0, then d≠0d \ne 0. Let mm be the position of the first nonzero entry of dd. The first nonzero entry of row ii is at column m+i−1m + i - 1, a different column for each row, so the rows are linearly independent and TT⊤T T^\top is nonsingular. □\square

Estimation from one path. Stationarity alone does not make xˉ\bar x a good estimate of μ\mu: the process Xt=ZX_t = Z for all tt, with one random ZZ, is strictly stationary, and Xˉ=Z\bar X = Z for every nn. A sufficient condition is γ(h)→0\gamma(h) \to 0 as h→∞h \to \infty. Then Var⁡(Xˉn)=1n∑∣h∣<n(1−∣h∣/n)γ(h)→0\operatorname{Var}(\bar X_n) = \frac{1}{n} \sum_{|h| < n} (1 - |h|/n) \gamma(h) \to 0, because the Cesàro means of a sequence that tends to 0 also tend to 0. If ∑h∣γ(h)∣<∞\sum_h |\gamma(h)| < \infty, then nVar⁡(Xˉn)→∑hγ(h)=2πf(0)n \operatorname{Var}(\bar X_n) \to \sum_h \gamma(h) = 2\pi f(0), which is the variance to use in a standard error for the mean of a correlated series. Ergodic theory (ergodic theorem) gives the almost sure version of this law of large numbers.

Examples and non-examples

  • IID noise and white noise. IID(0,σ2)(0, \sigma^2) noise is strictly and weakly stationary. White noise is weakly stationary by definition.
  • A moving average (by hand). Let εt∼WN(0,1)\varepsilon_t \sim \mathrm{WN}(0, 1) and Xt=εt+0.5 εt−1X_t = \varepsilon_t + 0.5\, \varepsilon_{t-1}. Then E[Xt]=0\mathbb{E}[X_t] = 0, γ(0)=1+0.25=1.25\gamma(0) = 1 + 0.25 = 1.25, γ(±1)=0.5\gamma(\pm 1) = 0.5 and γ(h)=0\gamma(h) = 0 for ∣h∣≥2|h| \ge 2. So ρ(1)=0.4\rho(1) = 0.4, and the autocorrelation is 0 after lag 1. This is the MA(1) model.
  • An autoregression. If ∣ϕ∣<1|\phi| < 1 and εt∼WN(0,σ2)\varepsilon_t \sim \mathrm{WN}(0, \sigma^2), then Xt=∑j≥0ϕjεt−jX_t = \sum_{j \ge 0} \phi^j \varepsilon_{t-j} is the stationary solution of Xt=ϕXt−1+εtX_t = \phi X_{t-1} + \varepsilon_t, with γ(h)=σ2ϕ∣h∣/(1−ϕ2)\gamma(h) = \sigma^2 \phi^{|h|}/(1 - \phi^2). See autoregressive model.
  • A random sinusoid. Let AA and BB be uncorrelated with mean 0 and variance σ2\sigma^2, and fix ω∈(0,π)\omega \in (0, \pi). Then Xt=Acos⁡(ωt)+Bsin⁡(ωt)X_t = A \cos(\omega t) + B \sin(\omega t) has mean 0 and Cov⁡(Xt+h,Xt)=σ2[cos⁡(ω(t+h))cos⁡(ωt)+sin⁡(ω(t+h))sin⁡(ωt)]=σ2cos⁡(ωh)\operatorname{Cov}(X_{t+h}, X_t) = \sigma^2 [\cos(\omega(t+h))\cos(\omega t) + \sin(\omega(t+h))\sin(\omega t)] = \sigma^2 \cos(\omega h). It is weakly stationary, but each path is an exact sinusoid. Its future is a fixed linear function of two past values: Xt=2cos⁡(ω)Xt−1−Xt−2X_t = 2\cos(\omega) X_{t-1} - X_{t-2}. It has no spectral density; its spectral distribution puts mass σ2/2\sigma^2/2 at ±ω\pm\omega. This is the deterministic part of the Wold decomposition.
  • A sample of five numbers. For x=(2,4,6,5,3)x = (2, 4, 6, 5, 3), xˉ=4\bar x = 4 and the deviations are (−2,0,2,1,−1)(-2, 0, 2, 1, -1). Then γ^(0)=10/5=2\hat\gamma(0) = 10/5 = 2, γ^(1)=(0⋅(−2)+2⋅0+1⋅2+(−1)⋅1)/5=0.2\hat\gamma(1) = (0 \cdot (-2) + 2 \cdot 0 + 1 \cdot 2 + (-1) \cdot 1)/5 = 0.2 and γ^(2)=(2⋅(−2)+1⋅0+(−1)⋅2)/5=−1.2\hat\gamma(2) = (2 \cdot (-2) + 1 \cdot 0 + (-1) \cdot 2)/5 = -1.2, so ρ^(1)=0.1\hat\rho(1) = 0.1 and ρ^(2)=−0.6\hat\rho(2) = -0.6. The matrix Γ^3\hat\Gamma_3 with first row (2,0.2,−1.2)(2, 0.2, -1.2) has determinant 4.864>04.864 > 0. With the divisor n−hn - h instead, the lag values are 0.250.25 and −2-2, and the matrix with first row (2,0.25,−2)(2, 0.25, -2) has determinant −0.5-0.5. That "estimate" is not the autocovariance function of any stationary process.
  • Non-example: a random walk. St=ε1+⋯+εtS_t = \varepsilon_1 + \cdots + \varepsilon_t with εt∼IID(0,σ2)\varepsilon_t \sim \mathrm{IID}(0, \sigma^2) has Var⁡(St)=tσ2\operatorname{Var}(S_t) = t\sigma^2, which grows with tt. Its differences St−St−1=εtS_t - S_{t-1} = \varepsilon_t are stationary. This is the case d=1d = 1 of the ARIMA model, and unit root tests try to detect it.
  • Non-example: a trend. Xt=a+bt+εtX_t = a + bt + \varepsilon_t with b≠0b \ne 0 has a mean that changes with tt. It is trend stationary: the residuals from the trend are stationary. Differencing also removes the trend, but gives b+εt−εt−1b + \varepsilon_t - \varepsilon_{t-1}, a moving average with a unit root, which is a sign of over-differencing.
  • Non-example: a transient start. If X0=0X_0 = 0 and Xt=ϕXt−1+εtX_t = \phi X_{t-1} + \varepsilon_t for t≥1t \ge 1 with ∣ϕ∣<1|\phi| < 1, then Var⁡(Xt)=σ2(1−ϕ2t)/(1−ϕ2)\operatorname{Var}(X_t) = \sigma^2 (1 - \phi^{2t})/(1 - \phi^2) depends on tt. The process is only asymptotically stationary. Simulations discard a burn-in period for this reason.
  • Strict but not weak. IID standard Cauchy variables are strictly stationary, but they have no mean or variance, so they are not weakly stationary.
  • Weak but not strict. Let XtX_t be independent, with Xt∼N(0,1)X_t \sim N(0, 1) for odd tt and Xt=±1X_t = \pm 1 with probability 1/21/2 each for even tt. Every XtX_t has mean 0 and variance 1, and different times are uncorrelated, so the process is white noise. But X1X_1 and X2X_2 have different distributions, so it is not strictly stationary.
  • Autocovariance and autocorrelation. The signal processing page autocorrelation covers the same functions for deterministic and random signals, often without removing the mean. In statistics the autocorrelation always uses deviations from the mean.
  • Spectral density and periodogram. The spectral density ff in fact (d) is the Fourier transform of γ\gamma. Its sample version is the periodogram. The Whittle likelihood uses both.
  • Linear and causal processes. Xt=μ+∑j≥0ψjεt−jX_t = \mu + \sum_{j \ge 0} \psi_j \varepsilon_{t-j} with ∑jψj2<∞\sum_j \psi_j^2 < \infty is stationary, with γ(h)=σ2∑jψjψj+∣h∣\gamma(h) = \sigma^2 \sum_j \psi_j \psi_{j + |h|}. The Wold decomposition theorem says that every stationary process is of this form plus a deterministic part.
  • Partial autocorrelation. The partial autocorrelation function is the second summary of γ\gamma used to identify a model.
  • Gaussian process. A Gaussian process indexed by time with a covariance that depends only on the lag is strictly stationary by fact (c).
  • Stationary distribution of a Markov chain. A Markov chain started from its stationary distribution is a strictly stationary process. The word means the same shift invariance in both places.
  • Ergodicity. A stationary process is ergodic when time averages along one path converge to expectations. This is what makes estimation from one series possible (ergodic theorem).
  • Trend stationary and difference stationary. A series is trend stationary when it is stationary after a deterministic trend is removed, and difference stationary when its differences are stationary. The augmented Dickey-Fuller test and the KPSS test test these two hypotheses from opposite sides.
  • Joint stationarity. Two series are jointly stationary when each is stationary and Cov⁡(Xt+h,Yt)\operatorname{Cov}(X_{t+h}, Y_t) depends only on hh. The vector autoregression is the standard model.

References

  1. Peter J. Brockwell and Richard A. Davis, Time Series: Theory and Methods, second edition, Springer, 1991, Section 1.3 (stationarity and strict stationarity, p. 11), Section 1.5 (the autocovariance function of a stationary process, p. 25), Section 4.3 (Herglotz's theorem, p. 117) and Section 7.2 (estimation of the autocovariance and autocorrelation functions, p. 220)
  2. Peter J. Brockwell and Richard A. Davis, Introduction to Time Series and Forecasting, third edition, Springer, 2016, Section 1.4 (stationary models and the autocorrelation function, p. 13), Section 2.1 (basic properties, p. 39) and Section 2.4 (properties of the sample mean and autocorrelation function, p. 50)
  3. James D. Hamilton, Time Series Analysis, Princeton University Press, 1994, Chapter 3 (stationary ARMA processes, pp. 43 to 71), the definitions of stationarity and ergodicity at the start of the chapter

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/TBAQY5/text.yaml