Moving average and median smoothing in WACE Mathematics Applications Unit 4
“Smooth a time series using moving averages, including centred even-order averages, and using median smoothing.”
Smoothing removes short-term noise from a time series to reveal its trend. An odd-order moving average (3-point, 5-point) replaces each value with the mean of itself and its neighbours, and it lines up with an actual time point. An even-order moving average (4-point) falls between two time points, so it must be centred by averaging two consecutive averages. Median smoothing uses the middle value instead of the mean, which resists outliers.
Jump to a section
What this dot point is asking
You must smooth a time series with odd and even moving averages, centre even-order averages, and use median smoothing.
Why smooth
A time series mixes a long-term trend with seasonal, cyclic and irregular (random) variation. Smoothing averages out the irregular and seasonal wobbles so the trend stands out, making it easier to see direction and to fit a trend line later.
Odd-order moving averages
An odd-order moving average replaces each value with the mean of itself and an equal number of neighbours on each side.
The smoothed value at a point is . A five-point average uses two values on each side, divided by .
Odd orders are convenient because the average lines up with an actual time point. The first and last points cannot be smoothed (no neighbour on one side), so the smoothed series is shorter at each end.
A three- or five-point moving average sits exactly on a real time point, because an odd number of values has a middle one. Even orders do not, which is why they need the extra centring step.
Even-order moving averages and centring
A four-point moving average sums four consecutive values, whose midpoint lies between the second and third time points, so it does not align with any data point.
Take two consecutive four-point averages and average them; the result aligns with an actual time point. Equivalently, the centred value is a weighted average of five points with weights divided by .
Four-point centring is the standard tool for quarterly data, because four quarters make one year and the centred average removes the seasonal cycle.
Three-point and centred four-point smoothing
Quarterly sales are .
Step 1: Compute the three-point moving averages.
A three-point moving average replaces each data point with the mean of itself and its immediate neighbours. Because three values have a natural middle point, the result aligns directly with an actual time period. We cannot smooth the first or last point (they have no neighbour on one side), so the smoothed series runs from the second to the second-to-last data point.
Centred on (second point): .
Centred on (third point): .
Centred on (fourth point): .
Centred on (fifth point): .
Step 2: Compute the centred four-point moving average at the third data point.
A four-point average spans four consecutive values, so its midpoint falls between the second and third values rather than on any actual data point. To realign the average with a real time period, we take two consecutive four-point averages and average them; this is called centring.
First four-point average (points 1 to 4): . This average sits between points 2 and 3.
Second four-point average (points 2 to 5): . This average sits between points 3 and 4.
Averaging these two consecutive four-point averages centres the result on point 3: .
Step 3: Interpret the smoothed values in context.
Both the three-point averages () and the centred four-point average ( at the third point) rise gently across the series. This upward movement in the smoothed values confirms an underlying upward trend in quarterly sales, which was obscured by the quarter-to-quarter fluctuations in the raw data. Smoothing has removed most of the irregular variation, making the trend visible for further analysis such as fitting a trend line.
Median smoothing
Median smoothing replaces each value with the median (middle value) of itself and its neighbours instead of the mean. Because the median ignores extreme values, median smoothing is resistant to outliers: a single freak data point does not drag the smoothed value the way it would with a mean. For a three-point median smooth, sort each group of three and take the middle one. For example, the three values (with a spike) give a median of , whereas their mean of is pulled up by the spike, showing how the median resists the outlier.
Choosing the order of a moving average
The order of a moving average should match any cycle in the data. For quarterly data with a yearly season, a four-point (centred) average removes the seasonal swing because it averages exactly one full year; for monthly data, a twelve-point centred average does the same. A larger order smooths more heavily, flattening the series towards its trend but losing more points at each end. The art is choosing an order large enough to remove the seasonal noise yet small enough to keep the trend's shape.
- Not centring an even-order average
- A four-point average sits between time points; centre it by averaging two consecutive four-point means.
- Smoothing the end points
- A three-point average cannot be computed at the first or last data point; the smoothed series is shorter.
- Dividing by the wrong number
- A three-point average divides by , a five-point by ; match the divisor to the number of points.
- Confusing median and mean smoothing
- Median smoothing takes the middle value (outlier-resistant); moving-average smoothing takes the mean.
Exam-style questions
Questions in the style of SCSA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.
WACE 2022-style6 marksA time series of daily sales is . (a) Calculate the three-point moving average for the second, third and fourth data points. (b) Explain what moving-average smoothing achieves.Show worked answer →
A three-point moving average averages each value with its two neighbours.
(a) Second point (centred on ): . Third point (centred on ): . Fourth point (centred on ): . (4 marks)
(b) Moving-average smoothing reduces the irregular (random) fluctuations and any seasonal variation, revealing the underlying trend of the series more clearly. (2 marks)
Markers reward correct three-point averages centred on each point and the noise-reduction purpose.
WACE 2024-style5 marksExplain why a four-point moving average must be centred, and outline how the centring is done.Show worked answer →
An even-order average falls between two time points, so it must be re-aligned.
A four-point moving average sums four consecutive values, but four values have their midpoint between the second and third time points, so the average does not line up with any original data point. (2 marks)
Centring takes two consecutive four-point averages and averages them, which shifts the result back onto an actual time point. Equivalently, it applies weights of half at the ends and one in the middle across five points. (3 marks)
Markers reward the off-point problem for even orders and the average-of-two-averages centring method.