How do I calculate a rolling average?
Ian Lurie May 4 2009
My mom’s a PHD physicist. My dad, a PHD engineer. By the time I was 13 they’d both given up on any dreams of me being a math genius and instead hoped I’d finally count to 20 without removing my shoes.
So, when I click ‘publish’ for this post, I’m going to flinch a little, waiting for someone who’s actually math-competent to call me out as the fraud that I am. But I’m writing this anyway, partly because some folks responded to last week’s internet marketing skills post by saying stuff like “OK, wise ass, explain some of this stuff,” and partly because this is analytics 101. If you work in marketing, you need to know it.
What’s a Rolling Average?
A simple rolling average (also called a moving average, if you wanted to know) is the unweighted mean of the last n values.
My first reaction when I read a definition like that was, “Buh?”. Maybe it made sense to you, but to me it’s total mathinese.
Here’s my definition of a simple rolling average: An average of the last n values in a data set, applied row-by-row, so that you get a series of averages.
OK, try this example. The column on the right is the rolling average:
See how that works? I’m just taking the average of the last 7 rows, all the way down the column. That’s a simple rolling average.
And trust me, I stop at ‘simple’. If you want to learn more complex rolling averages, read the Wikipedia page.
Why Use a Rolling Average?
A rolling average can help you find trends that would otherwise be hard to detect. Using the data from above, you get a graph that looks like this:
That’s not terribly helpful as a trend detector. It looks like my website got a case of the hiccups.
Use a rolling average, though, and you start to see a pattern emerge, with peaks happening more and more often:
That’s why rolling averages are so useful: Apply them at the right time and you can get an idea of emerging trends, even if those trends are happening because of sudden jumps in your data.
I’ll stop there. Math-competent folk, feel free to leave endless comments about how I just mangled your favorite concept…
CEO & Founder
Ian Lurie is CEO and founder of Portent and the EVP of Marketing Services at Clearlink. He's been a digital marketer since the days of AOL and Compuserve (25 years, if you're counting). He's recorded training for Lynda.com, writes regularly for the Portent Blog and has been published on AllThingsD, Smashing Magazine, and TechCrunch.Ian speaks at conferences around the world, including SearchLove, MozCon, Seattle Interactive Conference and ad:Tech. He has published has published several books about business and marketing: One Trick Ponies Get Shot, available on Kindle, The Web Marketing All-In-One Desk Reference for Dummies, and Conversation Marketing.Follow him on Twitter at portentint, and on LinkedIn at LinkedIn.com/in/ianlurie. Read More