# How to decide whether to use AR or MA for smoothing data?

Imagine I've got some offline data that I want to smooth. I could use an auto-regressive or moving-average filter of some appropriate order for conducting the smoothing. On which criteria should I base my filter decision?

• what kind of auto-correlation exists in the data? is there anything you know about the data's model? – rwong Dec 20 '11 at 5:33
• Is there a reason you don't want to use both (ARMA)? – Phonon Dec 20 '11 at 14:35

MA (Moving Average) filter is a FIR filter. In general it is given in this form - $$Y(n) = \sum { w_i * X(n-i) }$$

In inherently it is always stable.

AR (Auto regressive) filter is an IIR filter. In general, it is given that AF filter is in the form $$Y(n) = X(n) * w_0 + \sum { w_i * Y(n-i) }$$

If you want to design a filter who's frequency response window of a very accurate shape it is more manageable or easier to achieve through FIR filters but might be difficult with IIR filters. For example if you need to do equripple filters or Linear phase filters - FIR (MA) filters could be straight in design. However, if the exact shape is not so crucial, using AR one could always produce similarly effective filter (in terms of how steeply gain drops after required cut off), with relatively lesser number of taps.

Here is an excerpt from "Digital Signal Processing" Proakis & Manolakis; this is about the comparison of FIR vs. IIR filter design. Page: 724.

As a general rule, FIR filters are used in applications where there is a need for a linear-phase filter. This requirement occurs in many applications, especially in telecommunications, where there is a requirement to separate (demultiplex) signals such as data that have been frequency-division multiplexed, without distorting these signals in the process of demultiplexing. of the several methods described for designing FIR filters, the frequency sampling design method and the optimum Chebyshev approximation method yeild the best results.

IIR filters are generally used in applications where some phase distortion is tolerable. Of the class of IIR filter, elliptic filters are the most efficient to implement in the sense that for a given sent of specifications, an elliptic filter has a lower order or fewer co-efficients than any other IIR filter type. When compared with FIR filters, elliptic filters are also considerably more efficient.