part of Course 137 Signal Processing Techniques


Time series data can be noisy and jumpy. To separate the trend from the noise its helpful to do a bit of smoothing. Straight averaging has the disadvantage of weighting observations from the past just as strongly as the most recent ones. If there is an underlying trend, this is not ideal, since the trend line will have shifted over that period. A good compromise between recency and smoothness is exponential smoothing.

Exponential smoothing also has the wonderful property of being simple to calculate. It is a weighted average of the most recent smoothed value, y_(t-1) with the new observed value x_t: y_t = α * x_t + (1 - α) * y_(t-1), where α is between 0 and 1. For α close to 1 recent observations are weighted more heavily, and minimal smoothing takes place. For α close to 0 the new observation counts for little, and the subsequent smoothed value will be close to the previous one. In that case smoothing is heavy.

As a rule of thumb, if you want the smoothed signal to reflect changes that occur over τ time steps, you case use α = 1 / τ as a weighting factor.