I am currently studying calculus, but I am stuck with the definition of convolution in terms of constructing the mean of a function. Suppose we have 2 functions, f and g. We want to create the mean of f for each x, interpreting g(t) as the “weight” of f(t). Then, the mean of f for each x would be given by the integral:
$ \int_{-\infty}^{\infty} f(x) \cdot g(x-t) , dt $,
This expression differs from the common definition of convolution.
I'm having trouble understanding why we utilize the conventional definition of convolution in cases like these.
The mean of a function $f(x)$ over the interval $a<x<b$ can be calculated as
$$\frac{1}{b-a} \int\limits_a^b f(x) \, dx=\frac{1}{b-a} \int\limits_{-\infty }^{\infty } f(x)\, (\theta (x-a)-\theta (x-b)) \, dx\tag{1a}$$ $$=\frac{1}{b-a} \int\limits_{-\infty }^{\infty } f(x)\, (\theta (b-x)-\theta (a-x)) \, dx\tag{1b}$$
where $\theta(x)$ is the Heaviside step function, whereas convolution is normally defined as
$$(f * g)(y)=\int\limits_{-\infty}^\infty f(x)\, g(y-x)\, dx\,\tag{2}.$$
Note that formula (1b) above is equivalent to
$$\frac{1}{b-a}\, ((f * \theta)(b)-(f * \theta)(a))\tag{3}.$$