รดรด

# What Are Moving Averages? Part 1

Learn what moving averages are, how to calculate them, and find out how they can help your daily life.

By
Jason Marshall, PhD,
August 11, 2012
Episode #117

With the 2012 Olympics coming to a close, it’s time to start thinking about 2016. So today, we’re going to imagine that you’re a runner training for the 1500 meter race at the next Olympic games. At the end of each day, you run a practice 1500 meter race and record your time. Since we have the luxury of making this story as awesome as we please, let’s not just assume you’re training for the Olympics (which would be impressive enough), let’s assume that you’re one of the early favorites to win. Which means you need to get your time down to around 3:30 (meaning 3 minutes 30 seconds)…which is really, really fast!

The big question for today is: What’s the best way to track your progress? In other words, how do you know if you’re improving enough? Should you just look at the day-to-day changes in your time? Or is there a better way? In truth, there’s no absolutely right or wrong answer here—but there are better and worse answers. And a better answer in this situation is to use something called a moving average to track your progress. Why? That’s exactly what we’re going to talk about today.

## Runner’s Notebook: Week 1

Getting back to your quest for 1500 meter Olympic glory, let’s start by taking a look at the practice times you’ve recorded over the past week. On Monday you ran 1500 meters in 3:45, on Tuesday you improved to 3:38, on Wednesday you were a little off and came in at 3:50, Thursday was better at 3:41, and Friday was even better at 3:36. As you can see, your times bounced all over the place. So how can you fight through this mess and figure out how much you really improved—or if you improved at all, for that matter? Well, since you went from 3:45 on Monday to 3:36 on Friday, we can just say that you improved by 9 seconds…right? Or is that too optimistic?

## Review: Average and Mean

To answer these questions, we first need to figure out what a moving average is. And to understand what a moving average is, we need to understand what the word “average” means. As we’ve talked about before, the word “average” can actually signify many things, but it usually refers to what’s known as the mean. As you probably know, to find the mean of a group of numbers we just add them up and then divide by the size of the group. So, to find your mean 1500 meter time over the 5 practice runs from the past week, just add up the times and divide by 5 to get a mean of 3:42.

## Runner’s Notebook: Week 2

But what does the mean value we’ve found really mean? To make things a bit clearer, let’s put another week’s worth of practice run times into your runner’s notebook. Let’s assume that the following week includes times of 3:44, then down to 3:38, up to 3:45, down to 3:34, and finally finishing up on Friday with a time of 3:39. As we did with the first week’s times, we can find the mean time of your practice runs over the second week by adding them up and dividing by 5. The result is a mean of 3:40.

Now, back to the question: What do these mean values really mean? Well, finding the mean value for a given week is really just a way to evenly “smooth out” those times over the entire week. And when we compare the smoothed out times for these two weeks, we learn that you improved from a mean of 3:42 seconds in the first week to a mean of 3:40 seconds in the second week. So these mean values mean that you’ve improved 2 seconds on average…not bad!

## Why Bother With Averages?

But you might be wondering: Why are we bothering to find averages at all? Isn’t this a lot more work than we need to do? If we’re trying to judge progress, can’t we just look at the day-to-day changes in your 1500 meter time? Unfortunately, not really…at least not easily. Because, as we’ve seen, like a lot of other things in the world—the weather, stock prices, and your weight to name a few—your 1500 meter practice times fluctuate a lot from day-to-day. And those fluctuations make it extremely hard to separate meaningful changes due to actual progress from meaningless here-today-gone-tomorrow noise.

Fluctuations can make it extremely hard to separate meaningful changes from meaningless noise.

Sometimes this noise will slow down your time (perhaps you ate something that didn’t exactly agree with you that morning) and sometimes it will speed it up (perhaps you had a particularly favorable wind at your back on the homestretch). But the important point is that these up-and-down fluctuations mostly go away when you smooth out the times by finding an average value.

## What Is a Moving Average?

Being able to track week-to-week improvements by finding weekly mean values as we’ve done so far is great, but what if you really want to keep an eye on your day-to-day changes? Is there a way to do that and still get rid of those noisy fluctuations? In other words, is there a way to clean up the data so that you can see the forest from the trees?

As you may have guessed, that’s exactly what a moving average does. There are many kinds of moving average, but today we’re going to focus on what’s called a simple moving average. Let’s say you want to keep track of your race times using a 3-day moving average. To find the average time for a day, just add that day’s time to the times from the previous 2 days and divide by 3. (To use a 4-day moving average instead, just add each day’s time to the times from the previous 3 days and divide by 4, etc.) If you do this over the two week period in your runner’s notebook, you’ll find a 3-day moving average time of 3:44.33 for the first Wednesday (which, if you think about it, is the first day you can calculate a 3-day moving average for), then down to 3:43.00, down again to 3:42.33, 3:40.33, and 3:39.33, then up to 3:42.33, down to 3:39.00, and finally finishing at 3:39.33 on the second Friday.

As you can see, there are still day-to-day fluctuations, but they are much less prominent than they were before because the 3-day window smooths them out to reveal the overall trend—a trend that’s indicating that you’re well on your way to 2016 Olympic glory!

## Wrap Up

Okay, that’s all the math we have time for today. But that is by no means all that we have to say about moving averages. For example, how do you know how big the window your average should track? What happens if you change the size of that window? What are some of the other kinds of moving averages? And what are some of their other real world applications? Stay tuned…we’ll answer all of these questions and more in an upcoming episode.

Also, as luck would have it, you can find another example of just how useful moving averages are in this week’s Nutrition Diva episode about the best way to keep track of your weight. Be sure to check it out!

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!