Use weighting to influence observations
masterMany OnlineStats support a weight function $w(t)$ that determines the influence of the $t$-th observation. This allows for different types of moving averages or statistical models:
- Analytical Mean: Use $w(t) = t^{-1}$ (e.g., using the
invfunction). - Exponentially Weighted Mean: Use $w(t) = \lambda$ where $0 < \lambda < 1$.
The update formula used is: $\mu^{(t)} = [1 - w(t)] \mu^{(t-1)} + w(t) y_t$.