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!
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
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.