Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is an application in signal processing but what I don't understand is how it's done algorithmically. I've seen some stuff online but most of it is just pictures. I would like an example on some type of sample data such as [0 1 2 3 4 5 6 7 8 9 10] and if the width is 3 or 5. Also what is the purpose of smoothing? Thanks!

share|cite|improve this question
See – lhf May 4 '11 at 22:48

This is usually known as a moving average in my experience. You may have better search results using this term. Let's take your sequence of data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. We want a moving average with a window of 3. The resulting sequence is [0/1, (0+1)/2, (0+1+2)/3, (1+2+3)/3, (2+3+4)/3, (3+4+5)/3, (4+5+6)/3, (5+6+7)/3, (6+7+8)/3, (7+8+9)/3, (8+9+10)/3]. Performing all the arithmetic: [0,.5,1,2,3,4,5,6,7,8,9]. This procedure is used to try to get a more accurate picture of the trend of a time series, most notably financial time series. One can model a time series S(t)=T(t)+N(t) where S(t) is the series, T(t) is the trend, and N(t) is noise. Smoothing tries to get rid of N(t). And you should know that there are better ways to do smoothing than moving averages.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.