23 Feb
2010
23 Feb
'10
3:02 a.m.
On Monday 22 February 2010 23:27:02 Henry Baker wrote:
Yes, quite elegant, but you have to handle the cases at either end of the series. ... The simple exponential decay-type moving average is (normally) pretty trivial & foolproof to implement.
If you're happy with that sort of approach, then of course doing an exponentially decaying moving average in a spreadsheet is trivial. Say your data are in A1,A2,.... Then put =A1 in B1, =0.9*B1+0.1*A2 in B2, and copy B2 down the B column. That'll give you an average that decays by ~1/e over 10 steps. If you want the decay rate to be adjustable, make it =B1+$C$1*(A2-B1) and put the rate in C1. (Of course this works for other values of A, B, C, 1, 1, and 1.) -- g