Confusion regarding model order and lags I have similar questions as the one asked in these posts: https://stackoverflow.com/questions/47083890/fir-filter-length-is-the-intercept-included-as-a-coefficient-matlab/47085339?noredirect=1#comment81124362_47085339
and Terminologies - lags, order in time series model

But the answer is quite different from the one in books and other online resources such as this tutorial: https://onlinecourses.science.psu.edu/stat510/node/47

If the time series model is of order 2, then according to the answers to the earlier question, there should be 3 coefficients. But, the tutorial link says differently. In the link an AR(1) model has 1 coefficient. 

In a research article titled, "X. Xu and J. Guo, "A Fast System Identification Method Based on Minimum Phase Space Volume," 2012 International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery, Sanya, 2012, pp. 523-526." the Authors have doen system identification of AR(2) model. There they have used 2 coefficients to express the model.

Based on my understanding, the number of coefficients that a system has is known as the length, $L$ and the order is $q=L-1$. 

I want help to confirm what is the correct representation and terminology. In general for AR and MA models, 

Confusion 1) For an AR(1) system of order $q=1$, should there be 2 coefficients or 1 coefficient? Same thing for MA(1)

According to the online course link for AR(1), there is only 1 coefficient.

Confusion 2) What is correct? Considering an AR(2) model having coefficients [a1,a2,a3] then can I express the model as: x[t] = a1*x[t] + a2*x[t-1] + a3*x[t-2]+ e[t] and for MA(2) of order 2 as x[t] = a1*e[t] + a2*e[t-1] + a3*e[t-2]

where e[t] is the excitation input driving signal.

What is the correct method? Please help, I am extremely confused.
Hi: As far as what you wrote in confusion 2): 

The AR expression should not have an $x[t]$ on both sides. For example, below is an AR(2):

$x[t] = a1*x[t-1] + a2*x[t-2]+ e[t]$

Similarly, the MA expression should always have a coefficient of 1 on the  $e[t]$ term. So, for example, an MA(2) would be:

$x[t] = e[t] + a1*e[t-1] + a2*e[t-2]$

As Stanley said, it is only a matter of convention but the order of an AR(p) is generally thought of as $p$ so there are $p$ AR coefficients if the order is p. Similarly, for an MA(q) there are q MA coefficients so the order is considered to be q ( the $e[t]$ is not included in the order for an MA because there is no coefficient associated with $e[t]$). 

Note that, for both MA and AR models,  the number of parameters to be estimated is not always equal to the order of the model because there may be non zero mean terms or trend terms. For example, below is AR(2) with unknown mean $\mu$:

$x[t] = \mu + a1*x[t-1] + a2*x[t-2]+ e[t]$.

Note that there are also ARMA models where the number of coefficients is then p+q. For example, an ARMA(2,1) is:

$x[t] = a1*x[t-1] + a2*x[t-2]+ b1*e_[t-1] + e[t]$.

But usually the term "order" is not used for ARMA models.

I hope this makes it clear.