The formula to calculate the Moving Average is:
Moving Average=∑n−1i=0xin
Where:
The moving average is a statistical measure used to analyze data points by creating a series of averages of different subsets of the full data set. It helps smooth out short-term fluctuations and highlight longer-term trends or cycles.
Consider an example where the data points and window size are:
Using the formula to calculate the Moving Average:
Moving Average=(2+4+63,4+6+83,6+8+103)=(4,6,8)
This means that the moving averages for this example are 4, 6, and 8.