ôô

# What Are Moving Averages? Part 2

Learn about some of the different kinds of moving averages, find out what their advantages and disadvantages are, and see how they’re used in daily life.

By
Jason Marshall, PhD,
August 24, 2012
Episode #118

In the last article, we talked all about simple moving averages: What they are, how to calculate them, why you might actually want to do so, and all of that good stuff. As you may have surmised from the presence of the word “simple” in the phrase “simple moving average,” the type of moving average we discussed last time is really just the tip of the iceberg.

Which might lead you to wonder: What are some of the other types of moving averages? Are they better or worse than simple moving averages? And, most importantly, when and why would you ever want to use one of them? Stay tuned because those are exactly the questions we’ll be answering today.

## Review: What Are Simple Moving Averages?

Before we start talking about all the different types of moving averages, let’s quickly review the simple moving average that we talked about before.

In case you’ve forgotten, we’ve been using the “fact” that you’re training to compete in the 1500 meter race at the 2016 Olympics to help us understand how moving averages work. In the last article, you’d been keeping track of the times of your daily practice runs, and you wanted to come up with a way to track your day-to-day progress. The problem is that your day-to-day times fluctuate a lot, which makes it hard to see the long term trend that tells you whether or not you’re improving. As we found, one way to solve this conundrum is to use a moving average.

To find the average time for a day using a 3-day simple moving average, just add that day’s time to the times from the previous 2 days and divide by 3; to use a 4-day simple moving average instead, just add the day’s time to the times from the previous 3 days and divide by 4; and so on for however many days you want to average over. It’s easy to do, and the best part is that all of those distracting day-to-day fluctuations are smoothed out so that you can see the overall trend.

## How Big Should the Window Be?

One question that immediately comes to mind is: How does the size of the moving average “window” affect the result? In other words, what does it mean to use a 3-day window versus a 4-day window versus something like a 2-week window? The simple answer is that the size of the window determines how much “memory” the moving average contains. In other words, a larger window (meaning more days in our example) includes data from farther back in time. Which means that the value of the moving average that you calculate will change more slowly since it is more influenced by past values.

How do you know how big the window should be? It depends on whether you want to look at the short, medium, or long term picture. For example, if you were tracking your race times over months or years, you’d probably want to use something like a 2-week moving average to track your progress since you’d really only be interested in very long term trends. The larger the window, the less influence those short-term day-to-day fluctuations will have…and the more clearly you’ll see the big picture.

The size of the window determines how much “memory” the moving average contains.

## What Is a Central Moving Average?

But as it turns out, simple moving averages aren’t perfect. The biggest problem is that current values can sometimes be too dependent on past values. After all, except for the newest data point, all of the data in a simple moving average calculation comes from the past!

Which is why it’s sometimes better to use what’s called a “central moving average.” The idea is almost identical, except that this time we use an equal number of data points on either side of a central point to calculate the moving average. For example, while a 5-day simple moving average of Wednesday’s race time would use Saturday, Sunday, Monday, Tuesday, and Wednesday’s times; a 5-day central moving average would use Monday, Tuesday, Wednesday, Thursday, and Friday’s times.

This type of central moving average is used all the time in science and engineering since there’s less time lag—which means it usually better represents the “actual” moving average. Of course, it’s not nearly as convenient to use when keeping track of race times or your weight since you would have to wait some number of days—depending on the size of the window—to make your calculation. Which means that a simple moving average is a better choice for most of your day-to-day applications.

## What Are Weighted Moving Averages?

There’s one other type of moving average that I want to talk about today: weighted moving averages. This type of moving average is a bit more complicated so we won’t go into too much detail. But it’s an incredibly important tool in many areas of math, the sciences, engineering, and in the business and financial world, so it’s good to understand the basic idea.

The simple moving average that we know and love is actually a weighted moving average in which the data are all weighed equally. What does that mean? Well, to calculate Wednesday’s race time using a 3-day simple moving average, we add up Monday, Tuesday, and Wednesday’s times and then divide by 3. Which is the same thing as adding: (1 x Monday’s time) + (1 x Tuesday’s time) + (1 x Wednesday’s time), and then dividing this result by 3. I know this probably seems like a strange thing to do, but—believe it or not—we’ve actually just seen how a weighted moving average works. How’s that?

Well, in this case, each day was given a weight of 1—but they don’t have to be the same. For example, if we assign a weight of 1 for Monday, 2 for Tuesday, and 3 for Wednesday, the weighted moving average is found by calculating (1 x Monday’s time) + (2 x Tuesday’s time) + (3 x Wednesday’s time), and then by dividing this result by 1 + 2 + 3 = 6 (which is the sum of the weights). Why would we want to do that? Well, if you think about it, you’ll see that this moving average gives more weight to Wednesday’s time than Tuesday’s, and more weight to Tuesday’s time than Monday’s. Which means that older times become less important in the calculation of the moving average as time progresses.

## Wrap Up

Okay, that’s all the math we have time for today. Remember to become a fan of the Math Dude on Facebook where you’ll find lots of great math posted throughout the week. If you’re on Twitter, please follow me there, too. Finally, please send your math questions my way via Facebook, Twitter, or email at mathdude@quickanddirtytips.com.

Until next time, this is Jason Marshall with The Math Dude’s Quick and Dirty Tips to Make Math Easier. Thanks for reading, math fans!

• Audio
• Audio
• Audio
• Audio