Lesson 3: Smoothing with moving means and medians

Moving mean or moving median when there is an outlier

SkillsMoving mediansMoving means

Worked example

  • Complex familiar

Show attendance (thousands) for 2018 to 2022 was 46.4, 49.3, 18.2, 47.6 and 50.8. The 2020 value is an outlier.

a) Calculate the 3-point moving mean and the 3-point moving median for 2019, 2020 and 2021 (to two decimal places where needed).

b) Which smoother better shows the trend in attendance? Explain.

1 of 3 steps
  1. Step 1: Moving means

    2019: 46.4+49.3+18.23=37.97\frac{46.4 + 49.3 + 18.2}{3} = 37.97

    2020: 49.3+18.2+47.63=38.37\frac{49.3 + 18.2 + 47.6}{3} = 38.37

    2021: 18.2+47.6+50.83=38.87\frac{18.2 + 47.6 + 50.8}{3} = 38.87

    37.97, 38.37, 38.8737.97,\ 38.37,\ 38.87

Try a similar one

A fresh question of the same kind, checked as you answer, with hints and a full solution.

Method

  1. Calculate both smoothers for every window that contains the outlier.

  2. Compare them with the values on either side of the outlier.

  3. Choose the median when an outlier is present; the mean otherwise.

Watch out for

  • Forgetting to sort a window before taking its median.

  • Thinking the outlier only affects the 2020 moving average. With a 3-point window it affects 2019, 2020 and 2021.

Save your progress with a free account