# MA Modeling

A moving average (MA) models is a special case of ARMA where . An MA model assumes that the data is generated according to the recursion

 (9.36)

where are assumed to be iid RVs and . Note that in MATLAB, an MA process can be generated with the filter command:
>> e=randn(N,1);
>> x=filter(b,1,e * sqrt(sig2));

which is directly equivalent to (9.36) except for the initial startup. To alleviate startup effects, it is necessary to discard the first samples of x. In practice, one would generate samples, then keep the last samples:
>> e=randn(N+Q,1);
>> x=filter(b,1,e * sqrt(sig2));
>> x=x(Q+1:Q+N);

In contrast to ARMA, MA has a finite ACF. An MA process has the autocorrelation function

 (9.37)

Note that is zero when . In MATLAB,
>> b2=conv(b(:),flipud(b(:)));
>> % Theoretical ACF of MA process
>> r = sig2 * [b2(1+Q:end); zeros(N-Q-1,1)];

The circular MA process is a special case of the circular ARMA process with PDF (9.7) and

 (9.38)

Subsections
Baggenstoss 2017-05-19