How do we smooth out the noise in a time series to reveal its trend?
Smooth a time series using moving averages, including centred even-order averages, and using median smoothing.
How to smooth a time series with odd and even moving averages, apply centring for even-order averages, and use median smoothing to reveal the underlying trend.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
You must compute moving averages of odd and even order, centre an even-order average, and apply median smoothing.
Moving averages
A moving average replaces each value with the average of itself and its neighbours over a fixed window. The window size matches the seasonal period when removing seasonality (for example for quarterly data).
Centring an even-order average
For quarterly data you need a -point average to span a full year, but is even, so each average lands between quarters. Centring averages two adjacent -point means to put the result on a time point.
Median smoothing
Median smoothing replaces each value with the median of itself and its neighbours over an odd window. Because the median ignores extreme values, it resists outliers better than the moving mean.
Losing data at the ends
Every moving average loses points at each end of the series, because the window cannot be centred there. A wider window smooths more but loses more end points, a trade-off you state when choosing the order.