A moving average (rolling or running average) is a calculation to analyze data points by creating a series of averages of different subsets of the full data set.
Here we see 3 examples of the analysis of time series.
- The first series is just an analysis by week. No moving average is applies.
- In the second series you'll see a 4 weeks moving average applied. Week 15 will appear as a first data point, because with 4 week moving average, you need 4 weeks of data. The second data point is week 16 and will contain data of week 12 till week 15.
- in the third series you'll see it is showing a 4 week moving average, but with the setting to still show the data points before (but based on the existing weeks only)
|Base size n||113||143||164||420|
|Result in %||76%||99%||51%||74%|
The shares of the months are
April 113/420 = 0.269
May 143/420 = 0.340
June 164/420 = 0.390
To calculate the result of the rolling average the month result will be multiplied with the share of the total base size
April 76% * 0.269 = 20.44
May 99% * 0.340 = 33.66
April 51% * 0.390 = 19.89
The sum of those values is 74%