Definition 13992
If f and g are functions from
to
, the
convolution of f with g, written
,
is a new function from
to
defined by

It is clear that I smooth f by performing a convolution
with a suitable g. What I do is to
compute the new, smoothed function
at a point n by centring g on n (that is
move the 0 value of g over n) and then multiply
the corresponding values of f and g and sum
them. You might think I have written g backwards,
but in this form it works if both functions
are defined for the non-negative numbers only.
A variant with an integral sign for the case
of
continuous functions defined on
or
is left as an exercise for the student.
If f is not defined for all values of
, then
I need to do some obvious fiddling, like making
f(n) zero when n is negative or changing the
limits on my summation. Since filters, to be
implementable, must have only a finite number of
terms, in practice one is rather restricted to
smoothing envelopes g which are non-zero for
only a finite (and usually pretty small) number
of values.
If the values of g are allowed to be negative some rather surprising things can happen, and it is useful to experiment by obtaining some time series, writing down a Moving Average filter g, and performing the convolution in a program to see what comes out. In particular, it is possible to input white noise and get out a time series which manages to look deeply significant. White noise is, for those who don't know, noise which has equal spectral representation at all frequencies, and is hence entirely mythical. Approximations to it over the audio spectrum sound like surf on a beach and are said to be very soothing to listen to. Well, more soothing than most things one hears on the radio these days, at least. One can produce quite reasonable simulations of gaussian white noise by choosing, for each clock tick, quite independently, a random number according to a gaussian or normal distribution with mean zero and variance one. The resulting graph or signal looks a mess. If you haven't got a gaussian die to throw, fiddling your random number generator to produce an approximation to one is an exercise which is almost as soothing as listening to the result played back through a speaker, and gives a somewhat greater sense of accomplishment.
If we take it that g, the function with which we propose to accomplish a smoothing, consists essentially of a small number of non-zero numbers, we can refer to them as the coefficients in the Moving Average filter, and then a filter of order k has just that number of coefficients. More accurately, we can take the set of k numbers
![]()
![]()