Trendlines: Moving Averages

This is part 2 of our series on Trendlines. Previous segments are available on our archives page.

Moving Average Trendlines

The simplest form of trendline is the moving average. It is called a moving average because you choose a window (known as the period) and for each point of your data you average the points around it to create a new, averaged value. You move this window along your data to generate a new series of averaged points which are less noisy than the raw values, and more representative of your data’s natural pattern.

For example, the following shows how the moving average is calculated over a series of numbers using a period of 3:

By moving the window along the data, you reach an averaged value for each point. This averaging will smooth your data, creating a trendline that captures the natural trend of your data. Below is a moving average (period of 10) on our raw data from yesterday:

The longer the period you choose, the more smooth the data and clearer the trend. There are obvious advantages and disadvantages to using moving averages for trendlines.

Pros

  • Moving averages are easy to calculate and give you a general idea of the movement, including cyclical changes, data quickly.
  • Your ability to choose the period makes it easy to adjust your trendline for your needs, making it very flexible.

Cons

  • You have to choose the period to use, which could introduce bias.
  • As you can notice in the chart above, a moving average can’t estimate values at the beginning of your data (as there aren’t enough points to average). You can shorten the period, but then your values will be measured differently than the other points and potentially less reliable.
  • Moving averages are great for explaining existing data, but have no predictive properties so you cannot easily use them to estimate what will happen next.

Tomorrow we’ll cover a more powerful technique for adding trendlines to your data: linear and polynomial regressions.

Quote of the Day: “Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.” – Laurence Johnston Peter, Peter’s Almanac (1982)