2

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.

IMM
  • 41
  • 4
  • @HDB: The formula in the question doesn't seem to be the usual definition of the convolution. As the variable of integration is $t$, the argument of $f$ should be $t$ to get the usual formula. – Jochen Glueck Aug 02 '23 at 11:40
  • @JochenGlueck Ah, right. I even looked at the wikipedia page (just to confirm again), was only thinking about whether it‘s $x - t$ or $t - x$ but the problem is on the other side. Indeed there should be $f(t)$ instead of $f(x)$. Then I guess it‘s a typo. – HDB Aug 02 '23 at 11:44
  • Welcome to MathOverflow, Ilya! The formula that you wrote down doesn't actually compute a mean of $f$ since you don't integrate over $x$. Apart from this, I'm not sure whether it is very intuitive to interpret the convolution as a weighted mean (note that none of the functions $f$ and $g$ needs to be $\ge 0$ or to have integral $1$). Personally, I think it's much clearer to think of it as a weighted sum of time shifted impulse responses. Anyway, I share @HDB's point of view that this would probably be more appropriate for math.stackexchange. – Jochen Glueck Aug 02 '23 at 11:46
  • I am sorry for posting my question in the wrong forum. I am new to math forums :) My question was aimed at understanding why convolution can be interpreted as the mean of f using a weight function g (g >= 0, ||g|| = 1)This perspective was shared with us by our professor. In my view, it would be more intuitive to shift the function g by x, so that we have g(t-x), effectively centering the function around x. By computing the integral in my formula under this adjustment, I believe we would obtain the mean of f for x, weighted by g – IMM Aug 02 '23 at 12:43
  • 1
    Your formula seems incorrect since $\int\limits_{-\infty}^{\infty} f(x) \cdot g(x-t), dt=f(x) \cdot \int\limits_{-\infty}^{\infty} g(x-t), dt$ which is not the convolution $f * g$. – Steven Clark Aug 02 '23 at 15:09

2 Answers2

4

If $g$ is nonnegative and $\int_{-\infty}^{+\infty}g(x)\,dx = 1$, then for each $x$, the convolution $$ (f * g)(x) = \int_{-\infty}^{+\infty} f(t) g(x-t)\;dt $$ is a weighted mean of the values of $f$. Perhaps this is what you want.


A nice example of this is where $g$ is a Gaussian density, $$ g(x) = \frac{1}{a\sqrt{2\pi}}e^{-x^2/(2a^2)} . $$ Then the convolution $f * g$ is a "smoothed" version of $f$.

GEdgar
  • 111,679
1

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}.$$

Steven Clark
  • 7,363
  • 1
    Worth noting that if $g$ is for example a Gaussian PDF (that is, a bell curve) centered at $0$ then $(f*g)(y)$ is a weighted average of values of $f$ near $y$. – littleO Aug 02 '23 at 17:54