In statistics, the moving average is usually defined for discrete data sets. Is there a moving average concept for continuous randomly fast-oscillating functions? I am seeking for the moving average determined in terms of integrals rather than sums.
1 Answer
$\begingroup$
$\endgroup$
3
You could simply use the mean value of the function in each window.
A "backward-looking" moving average with window size $w$ is $$ \mbox{MA}_w^\text{b}(t) = \frac{1}{w} \int_{t-w}^t f(x)dx , $$ and a "centered" moving average is $$ \mbox{MA}_w^\text{c}(t) = \frac{1}{w} \int_{t-w/2}^{t+w/2} f(x)dx . $$
-
$\begingroup$ Seems nice! Do you have a reference to a textbook or paper where this definition is utilized? $\endgroup$– freudeCommented Apr 27, 2014 at 19:38
-
$\begingroup$ I don't have a reference where the suggested function is used to compute the moving average; I just customized the first mean value theorem to your needs. $\endgroup$ Commented Apr 28, 2014 at 5:49
-
1$\begingroup$ +1. This is so standard that a reference is scarcely needed. More generally, given any integrable function $h$ with unit integral (and, preferably, centered near $0$ in some fashion), the convolution of $f$ and $h$ is the windowed moving average of $f$ where $h$ gives the averaging weights. Kernel density estimators fit within this generalized category of moving window averages, for instance. $\endgroup$– whuber ♦Commented Sep 4 at 13:54