# Moving Average/Basic Approach

## Generic Approach to Moving Average

An element ${\displaystyle v\in V}$ moves in an additive Group (mathematics) or Vector Space V. In a generic approach, we have a moving probability distribution ${\displaystyle P_{v}}$ that defines how the values in the environment of ${\displaystyle v\in V}$ have an impact on the moving average.

### Discrete/continuous Moving Average

According to probability distributions we have to distinguish between a

• discrete (probability mass function ${\displaystyle p_{v}}$) and
• continuous (probability density function ${\displaystyle p_{v}}$)

moving average. The terminology refers to probability distributions and the semantics of probability mass/density function describes the distrubtion of weights around the value ${\displaystyle v\in V}$. In the discrete setting the ${\displaystyle p_{v}(x)=0.2}$ means that ${\displaystyle x}$ has a 20% impact on the moving average ${\displaystyle MA(v)}$ for ${\displaystyle v}$.

### Moving/Shift Distributions

If the probility distribution are shifted by ${\displaystyle v}$ in ${\displaystyle V}$. This means that the probability mass functions ${\displaystyle p_{v}}$ resp. probability density functions ${\displaystyle p_{v}}$ are generated by a probability distribution ${\displaystyle p_{0}}$ at the zero element of the additive group resp. zero vector of the vector space. Due to nature of the collected data f(x) exists for a subset ${\displaystyle T\subseteq V}$. In many cases T are the points in time for which data is collected. The and the shift of a distribution is defined by the following property:

• discrete: For all ${\displaystyle x\in V}$ the probability mass function fulfills ${\displaystyle p_{v}(x):=p_{0}(x-v)}$ for ${\displaystyle v\in T}$
• continuous: For all probability density function fulfills ${\displaystyle p_{v}(x):=p_{0}(x-v)}$

The moving average is defined by:

• discrete: (probability mass function ${\displaystyle p_{v}}$)
${\displaystyle MA(v):=\sum _{x\in T}p_{v}(x)\cdot f(x)}$

Remark: ${\displaystyle p_{v}(x)>0}$ for a countable subset of ${\displaystyle V}$

• continuous probability density function ${\displaystyle p_{v}}$
${\displaystyle MA(v):=\int _{T}p_{v}(x)\cdot f(x)\,dx}$

It is important for the definition of probability mass functions resp. probability density functions ${\displaystyle p_{v}}$ that the support (measure theory) of ${\displaystyle p_{v}}$ is a subset of T. This assures that 100% of the probability mass is assigned to collected data. The support ${\displaystyle p_{v}}$ is defined as:

${\displaystyle \mathrm {supp} (p_{v}):={\overline {\{x\in V\mid p_{v}(x)>0\}}}\subset T.}$