Autoregressive model
In statistics and signal processing, an autoregressive (AR) model is a type of random process which is often used to model and predict various types of natural phenomena. The autoregressive model is one of a group of linear prediction formulas that attempt to predict an output of a system based on the previous outputs.
Contents |
[edit] Definition
The notation AR(p) indicates an autoregressive model of order p. The AR(p) model is defined as
where
are the parameters of the model, c is a constant (often omitted for simplicity) and εt is white noise.
An autoregressive model can thus be viewed as the output of an all-pole infinite impulse response filter whose input is white noise.
Some constraints are necessary on the values of the parameters of this model in order that the model remains wide-sense stationary. For example, processes in the AR(1) model with |φ1| ≥ 1 are not stationary. More generally, for an AR(p) model to be wide-sense stationary, the roots of the polynomial
must lie within the unit circle, i.e., each root zi must satisfy | zi | < 1.
[edit] Example: An AR(1)-process
An AR(1)-process is given by:
where εt is a white noise process with zero mean and variance
. (Note: The subscript on φ1 has been dropped.) The process is wide-sense stationary if | φ | < 1 since it is obtained as the output of a stable filter whose input is white noise. (If φ = 1 then Xt has infinite variance, and is therefore not wide sense stationary.) Consequently, assuming | φ | < 1, the mean E(Xt) is identical for all values of t. If the mean is denoted by μ, it follows from
that
- μ = c + φμ + 0,
and hence
In particular, if c = 0, then the mean is 0.
The variance is
where σε is the standard deviation of εt. This can be shown by noting that
- var(Xt) = φ2var(Xt − 1) + σ2,
and then by noticing that the quantity above is a stable fixed point of this relation.
The autocovariance is given by
It can be seen that the autocovariance function decays with a decay time (also called time constant) of τ = − 1 / ln(φ) [to see this, write Bn = Kϕ | n | where K is independent of n. Then note that ϕ | n | = e | n | ln ϕ and match this to the exponential decay law e − n / τ].
The spectral density function is the Fourier transform of the autocovariance function. In discrete terms this will be the discrete-time Fourier transform:
This expression is periodic due to the discrete nature of the Xj, which is manifested as the cosine term in the denominator. If we assume that the sampling time (Δt = 1) is much smaller than the decay time (τ), then we can use a continuum approximation to Bn:
which yields a Lorentzian profile for the spectral density:
where γ = 1 / τ is the angular frequency associated with the decay time τ.
An alternative expression for Xt can be derived by first substituting c + φXt − 2 + εt − 1 for Xt − 1 in the defining equation. Continuing this process N times yields
For N approaching infinity, φN will approach zero and:
It is seen that Xt is white noise convolved with the φk kernel plus the constant mean. If the white noise εt is a Gaussian process then Xt is also a Gaussian process. In other cases, the central limit theorem indicates that Xt will be approximately normally distributed when φ is close to one.
[edit] Calculation of the AR parameters
There are many ways to estimate the coefficients: the OLS procedure, method of moments (through Yule Walker equations),MCMC.
The AR(p) model is given by the equation
It is based on parameters φi where i = 1, ..., p. There is a direct correspondence between these parameters and the covariance function of the process, and this correspondence can be inverted to determine the parameters from the autocorrelation function (which is itself obtained from the covariances). This is done using the Yule-Walker equations.
[edit] Yule-Walker equations
The Yule-Walker equations are the following set of equations.
where m = 0, ... , p, yielding p + 1 equations. γm is the autocorrelation function of X, σε is the standard deviation of the input noise process, and δm,0 is the Kronecker delta function.
Because the last part of the equation is non-zero only if m = 0, the equation is usually solved by representing it as a matrix for m > 0, thus getting equation
solving all φ. For m = 0 we have
which allows us to solve
.
The above equations (the Yule-Walker equations) provide one route to estimating the parameters of an AR(p) model, by replacing the theoretical covariances with estimated values. One way of specifying the estimated covariances is equivalent to a calculation using least squares regression of values Xt on the p previous values of the same series.
Another usage is calculating the first p+1 elements ρ(τ) of the auto-correlation function. The full auto-correlation function can then be derived by recursively calculating [1]

- Examples for some Low-order AR(p) processes
- p=1
- γ1 = φ1γ0
- Hence ρ1 = γ1 / γ0 = φ1
- p=2
- The Yule-Walker equations for an AR(2) process are
- γ1 = φ1γ0 + φ2γ − 1
- γ2 = φ1γ1 + φ2γ0
- Remember that γ − k = γk
- Using the first equation yields

- Using the recursion formula yields

- The Yule-Walker equations for an AR(2) process are
- p=1
[edit] Derivation
The equation defining the AR process is
Multiplying both sides by Xt − m and taking expected value yields
Now,
by definition of the autocorrelation function. The values of the noise function are independent of each other, and Xt − m is independent of εt where m is greater than zero. For m > 0, E[εtXt − m] = 0. For m = 0,
Now we have, for m ≥ 0,
Furthermore,
which yields the Yule-Walker equations:
for m ≥ 0. For m < 0,
[edit] Spectrum
The power spectral density of an AR(p) process with noise variance
is[1]
[edit] AR(0)
For white noise (AR(0))
[edit] AR(1)
For AR(1)
- If φ1 > 0 there is a single spectral peak at f=0, often referred to as red noise. As
becomes nearer 1, there is stronger power at low frequencies, i.e. larger time lags. - If φ1 < 0 there is a minimum at f=0, often referred to as blue noise
[edit] AR(2)
AR(2) processes can be split into three groups depending on the characteristics of their roots:
- When
, the process has a pair of complex-conjugate roots, creating a mid-frequency peak at:
Otherwise the process has real roots, and:
- When φ1 > 0 it acts as a low-pass filter on the white noise with a spectral peak at f = 0
- When φ1 < 0 it acts as a high-pass filter on the white noise with a spectral peak at f = 1 / 2.
The process is stable when the roots are within the unit circle, or equivalently when the coefficients are in the triangle
.
The full PSD function can be expressed in real form as:
[edit] Characteristic polynomial
Auto-correlation function of an AR(p) process can be expressed as[citation needed]
where yk are the roots of the polynomial
Auto-correlation function of an AR(p) process is a sum of decaying exponential.
- Each real root contributes a component to the auto-correlation function that decays exponentially.
- Similarly, each pair of complex conjugate roots contributes an exponentially damped oscillation.
[edit] Implementations in statistics packages
[edit] See also
- Moving average model
- Autoregressive moving average model
- Predictive analytics
- Linear predictive coding
|
|
This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. Please help to improve this article by introducing more precise citations. (March 2011) |
|
|
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (March 2011) |
[edit] Notes
- ^ a b Von Storch, H.; F. W Zwiers (2001). Statistical analysis in climate research. Cambridge Univ Pr. ISBN 0521012309.[page needed]
- ^ "Fit Autoregressive Models to Time Series"
[edit] References
- Mills, Terence C. (1990) Time Series Techniques for Economists. Cambridge University Press
- Percival, Donald B. and Andrew T. Walden. (1993) Spectral Analysis for Physical Applications. Cambridge University Press
- Pandit, Sudhakar M. and Wu, Shien-Ming. (1983) Time Series and System Analysis with Applications. John Wiley & Sons
- Yule, G. Udny (1927) "On a Method of Investigating Periodicities in Disturbed Series, with Special Reference to Wolfer's Sunspot Numbers", Philosophical Transactions of the Royal Society of London, Ser. A, Vol. 226, 267–298.]
- Walker, Gilbert (1931) "On Periodicity in Series of Related Terms", Proceedings of the Royal Society of London, Ser. A, Vol. 131, 518–532.



















![\operatorname{E}[X_t X_{t-m}] = \operatorname{E}\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right]+ \operatorname{E}[\varepsilon_t X_{t-m}].](http://upload.wikimedia.org/wikipedia/en/math/7/2/5/7252a158a10992b9d139d462d0122105.png)
![\operatorname{E}[\varepsilon_t X_{t}]
= \operatorname{E}\left[\varepsilon_t \left(\sum_{i=1}^p \varphi_i\,X_{t-i}+ \varepsilon_t\right)\right]
= \sum_{i=1}^p \varphi_i\, \operatorname{E}[\varepsilon_t\,X_{t-i}] + \operatorname{E}[\varepsilon_t^2]
= 0 + \sigma_\varepsilon^2,](http://upload.wikimedia.org/wikipedia/en/math/7/2/e/72e5322549388c16007dc1424024e5c4.png)
![\gamma_m = \operatorname{E}\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right] + \sigma_\varepsilon^2 \delta_{m,0}.](http://upload.wikimedia.org/wikipedia/en/math/8/a/6/8a65387e022a2f5dbe9cf56885f204a2.png)
![\operatorname{E}\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right]
= \sum_{i=1}^p \varphi_i\,\operatorname{E}[X_{t} X_{t-m+i}]
= \sum_{i=1}^p \varphi_i\,\gamma_{m-i},](http://upload.wikimedia.org/wikipedia/en/math/5/7/b/57bce6f5cb3fb31cf27d6d17efecf59e.png)





becomes nearer 1, there is stronger power at low frequencies, i.e. larger time lags.
, the process has a pair of complex-conjugate roots, creating a mid-frequency peak at:


