I am new to Mathematics and understanding formulas - I'm currently trying to break down the Simple Moving Average formula from Wikipedia but struggling.
I understand in practice how to calculate it, but I am struggling to really grasp an understanding of the formula below:
$\displaystyle\overline p_{\displaystyle{SM}}=\frac{p_{\displaystyle{M}}+p_{\displaystyle{M}-1}+\cdots+p_{\displaystyle{M}-\displaystyle(n-1)}}{n}=\frac{1}{n}\sum_{i=0}^{n-1}p_{\displaystyle{M}}-i$
Could somebody break this formula down for me and explain it piece by piece? Preferably in both English and Math so I can piece the two together.
You are looking at the simple moving average with window length of $n$. This formula is relevant to variable that forms a sequence. Meaning the quantity that you are studying should have some sense of order in it. For example stock prices, temperature during the day, from such series.
So simply speaking you have a sequence $(p_k)$ where $k$ is a natural number $1,2,3,...$
SMA of window $n$ is defined for the sequence $(p_k)$ for all values of $k\ge n$. Now basically you take sum of $n-1$ past values and the current value and divide by $n$ to get the moving average.
Tell me if any of this is not clear.