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 and social phenomena.
Contents |
Definition
The notation AR(p) refers to the autoregressive model of order p. The AR(p) model is defined as
where
are the parameters of the model, c is a constant and
is white noise. The constant term is omitted by many authors for simplicity.
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.
Example: An AR(1)-process
An AR(1)-process is given by:
where
is a white noise process with zero mean and variance σ2. (Note: The subscript on
has been dropped.) The process is wide sense stationary if
since it is obtained as the output of a stable filter whose input is white noise. (If
then Xt has infinite variance, and is therefore not wide sense stationary.) Consequently, assuming
, the mean E(Xt) is identical for all values of t. Denoting the mean by μ, we get
Thus
In particular, if c = 0, then the mean is 0.
The variance can be shown to equal
The autocovariance is given by
It can be seen that the autocovariance function decays with a decay time (also called time constant) of
[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
for Xt − 1 in the defining equation. Continuing this process N times yields
For N approaching infinity,
will approach zero and:
It is seen that Xt is white noise convolved with the
kernel plus the constant mean. If the white noise
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.
Calculation of the AR parameters
The AR(p) model is given by the equation
It is based on parameters
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:
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 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 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.
Derivation
The equation defining the AR process is
Multiplying both sides by Xt − m and taking expected value yields
Now, E[XtXt − m] = γm 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,
Implementations in statistics packages
- In R, the stats package includes an ar function. The function is documented in "Fit Autoregressive Models to Time Series".
See also
- Moving average model
- Autoregressive moving average model
- Predictive analytics
- Linear predictive coding
References
- Mills, Terence C. Time Series Techniques for Economists. Cambridge University Press, 1990.
- Percival, Donald B. and Andrew T. Walden. Spectral Analysis for Physical Applications. Cambridge University Press, 1993.
- Pandit, Sudhakar M. and Wu, Shien-Ming. Time Series and System Analysis with Applications. John Wiley & Sons, Inc., 1983.
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)

















![E[X_t X_{t-m}] = E\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right]+ E[\varepsilon_t X_{t-m}].](http://wpcontent.answers.com/math/e/7/a/e7af63255d6a74334e8d34b666777037.png)
![E[\varepsilon_t X_{t}]
= E\left[\varepsilon_t \left(\sum_{i=1}^p \varphi_i\,X_{t-i}+ \varepsilon_t\right)\right]
= \sum_{i=1}^p \varphi_i\, E[\varepsilon_t\,X_{t-i}] + E[\varepsilon_t^2]
= 0 + \sigma_\varepsilon^2,](http://wpcontent.answers.com/math/8/8/d/88d3b15dfb38be4b18970c036c4348d1.png)
![\gamma_m = E\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right] + \sigma_\varepsilon^2 \delta_m.](http://wpcontent.answers.com/math/3/9/5/395b5327bd07ef1a26a86378b711ffb9.png)
![E\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right]
= \sum_{i=1}^p \varphi_i\,E[X_{t} X_{t-m+i}]
= \sum_{i=1}^p \varphi_i\,\gamma_{m-i},](http://wpcontent.answers.com/math/f/1/e/f1ec9d209d59a1cfe284e284d83c6a59.png)





