Analysis

Moving average

Also called rolling average.

Moving average is the mean of the latest N periods, recomputed as each new period arrives. It smooths day-to-day noise so the direction is visible.

How it is measured

Choose N, often 7 for daily data so each average covers every weekday once. Sum the last N values and divide by N. The next day, drop the oldest value and add the newest.

The cost of smoothing is delay. A 7-day average turns about three days after a real change. A shorter window reacts faster and is noisier. Plot the raw line faintly under it.

Worked example

A podcast's download counts run 410, 395, 120, 130, 405, 420, 400 over a week where a CDN outage hit Wednesday and Thursday. The 7-day average is 326.

The following week the values return to near 400 and the average climbs 326, 340, 360, 383, and settles around 405 after the lag. The chart shows a short dip and recovery rather than the jagged raw line.

How it differs

A moving average smooths a series. A trend is the underlying direction you are trying to see. The average is one method to estimate trend, and a wrong window gives a wrong picture.

Common errors

Using a window that is not a whole number of weeks. Reading the latest point as today's value. Smoothing away a real step change. Comparing averages with different N. Hiding the raw data.

In practice

Default to a 7-day average on any daily chart with a weekly pattern. Keep the raw line visible. State N in the chart title.

See also

Trend, Seasonality, Period over period

Sources

Count this on a real site.

Watch my website