In my previous post I said I was using the standard formula for the exponentially weighted moving average. This is not entirely true because the standard formula uses a complementary smoothing constant (α = 1 − a) which allows you to write the formula as an incremental adjustment to the previous value.
It's also possible to express the standard unweighted mean in a similar manner.
I was quite pleased when I found out about this analogy :-)
(Thanks to wikipedia for rendering the maths.)