Fundamentals of Statistics contains material of various lectures and courses of H. Lohninger on statistics, data analysis and chemometrics......click here for more.

Savitzky-Golay Filter

One approach for smoothing the time series is to replace each value of the series with a new value which is obtained from a polynomial fit to 2n+1 neighboring points (including the point to be smoothed), with n being equal to, or greater than the order of the polynomial.

Savitzky and Golay have shown in their original paper that a moving polynomial fit can be numerically handled in exactly the same way as a weighted moving average, since the coefficients of the smoothing procedure are constant for all y values. Thus, Savitzky-Golay smoothing is very easy to apply. Furthermore, it can be shown that the same algorithm can be used to calculate smoothed first and second derivatives of the signal.

Example: Smoothing a time series by using a 2nd order polynomial and 7 data points. The equation for this particular Savitzky-Golay smoothing is defined as follows:
yt =  (-2xt-3 + 3xt-2 + 6xt-1 + 7xt +  6xt+1 +  3xt+2  - 2xt+3)/21.

The figure below shows the smoothing results (lower trace) for a spiked, noisy sine signal (upper trace), using a second order polynomial fit with 25 data points. In order to experiment with different smoothing methods, click at the image below.

Last Update: 2012-10-08