I found equation 1 for Autoregressive model in various books and articles but i also found equation 2 for AR model, I understand the physical meaning of the equation but two different equations confused me a lot.

enter image description here

Can anyone tell me what is the difference between them and where one should use them?? I want to use AR equation for forecasting so which one should i use and why??. Both equations should yield different results because of the negative sign (which should just flip the actual signal i think so).

  • $\begingroup$ Did you mean to have a[k]y[n-k] on the right instead of a[k]x[n-k]? In that case, equation 2 is in canonical form, where the poles are the roots of $A(z) = 1 + a[1]z^{-1} + a[2]z^{-2} + ... + a[p]z^{-p}$ $\endgroup$ – user35336 May 25 '18 at 3:34
  • $\begingroup$ Without knowing what $x$ and $y$ are its hard to tell if either makes sense. A standard AR process is usually assumed to be driven by white noise, which implies 2 variables and you have 3. The second version, implies that it belongs on the left, but the sum should be in lags of $y$ not $x$ $\endgroup$ – user28715 May 25 '18 at 3:47
  • $\begingroup$ @msm , Yes a[k]y[n-k] on the right side. Thank you for pointing that mistake. When i use equation 1 the predicted signal doesn't match with the original signal at all, but when i use the same equation with negative sign (equation 2) the predicted signal somewhat matches with the original signal but with different amplitude. That thing confuses me why i am getting different result by just adding a negative sign. $\endgroup$ – Abeeha May 25 '18 at 4:01
  • $\begingroup$ @StanleyPawlukiewicz Sir you are right. AR process implies 2 variables not 3. The sum are in lags of y. $\endgroup$ – Abeeha May 25 '18 at 4:03
  • $\begingroup$ @Abeeha, if it is confusing that a negation causes such a difference, start by looking at the roots of A(z) with positive a[k] versus A(z) roots with negated a[k]. These are quite different filters, typically. $\endgroup$ – user35336 May 25 '18 at 4:08

Auto Regressive Model means the current output is a linear combination of previous outputs and driving noise:

$$ y \left[ n \right] = \sum_{k = 1}^{p} {a}_{k} y \left[ n - k \right] + v \left[ k \right] $$

As you can see, the current value $ y \left[ n \right] $ depends on $ m $ values before it.
The parameter $ p $ is the order of the model while $ v \left[ k \right] $ is the driving IID White Noise.

Usually if we want to estimate the parameters of the model we have 2 main cases:

  1. The Model Order $ p $ Is Known
    In this case we need to estimate $ p $ parameters $ \left\{ {a}_{k} \right\}_{k = 1}^{p} $ from a set of $ m \geq p $ samples $ \left\{ y \left[ n \right] \right\}_{n = 1}^{m} $. the classic way to do so is using the Yule Walker Normal Equations.
  2. The Model Order $ p $ Is Unknown
    If $ p $ is unknown the intuitive a approach is estimate it and then go back to (1). One could estimate is by running on a grid of options (Try model order 3, 4, 5, 6, ... and chose the one which works best in MSE) yet this might do overfit. A classic approach to evaluate the grid is using Akaike iInformation Criterion (AIC).

In your equations:

enter image description here

The connection is between the output to a different signal which means it is not an AR model.

If you tell us where did you get those form we might be able to clear things up.

Welcome to DSP!

  • $\begingroup$ I have found equation 2 in various lectures. I am going to share the links for these lectures : (slideplayer.com/slide/11284315) (slide no 19) and (cis.hut.fi/Opinnot/T-61.181/s04/local/eeg_seminar.pdf) (slide no 14) $\endgroup$ – Abeeha Sep 10 '18 at 1:55
  • $\begingroup$ In both sources you linked to the AR model connects $ x \left[ n \right] $ to its previous samples. You called the output $ y \left[ n \right] $ which means it is not AR model. $\endgroup$ – Royi Sep 10 '18 at 9:00
  • $\begingroup$ Sir stanely already pointed out that mistake. The equations include only two var not 3 which means y[n] connects to its previous samples not x[n]. It was a typing mistake at that time. $\endgroup$ – Abeeha Sep 11 '18 at 5:26
  • $\begingroup$ @Abeeha, Could you please mark my answer? $\endgroup$ – Royi Dec 13 '20 at 11:55

$y[n]+ \sum_{k=1}^m a_k y[n-k]=v[k]$

Is a common way of expressing a standard AR process.

$v[k]$ is most typically zero mean iid Gaussian noise. The variance of $v[k]$ is usually unknown and is some times a parameter that also needs to be estimated

  • $\begingroup$ Sir I have found ar coefficients from yule-walker function i-e., [A E]= aryule(signal, order). Can i use E in place of v [k]?? in order to find the future samples?? $\endgroup$ – Abeeha May 25 '18 at 4:07
  • $\begingroup$ Well you are asking a different question. I make it a point to not either endorse or reject anything without understanding the purpose. You can open a new question, best with code. You can either accept this answer or ignore it. I’m sure others will provide greater illumination $\endgroup$ – user28715 May 25 '18 at 4:22
  • $\begingroup$ I apologize for that mistake. I am new to this forum. I have asked this as a new question with the code. dsp.stackexchange.com/questions/49348/… $\endgroup$ – Abeeha May 25 '18 at 4:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.