<< Chapter < Page | Chapter >> Page > |
Suppose we try to extend our method for computing finite moving averages to infinite moving averages of the form
In general, this moving average would require infinite memory for the weighting coefficients and for the inputs . Furthermore, the hardware for multiplying would have to be infinitely fast to compute the infinite moving average in finite time. All of this is clearly fanciful and implausible (not to mention impossible). But what if the weights take the exponential form
Does any simplification result? There is hope because the weighting sequence obeys the recursion
This recursion may be rewritten as follows, for :
Let's now manipulate the infinite moving average and use the recursion for the weights to see what happens. You must follow every step:
This result is fundamentally important because it says that the output of the infinite exponential moving average may be computed by scaling the previous output by the constant a , scaling the new input by , and adding. Only three memory locations must be allocated: one for , one for , and one for . Only two multiplies must be implemented: one for and one for . A diagram of the recursion is given in Figure 1 . In this recursion, the old value of the exponential moving average, , is scaled by and added to to produce the new exponential moving average . This new value is stored in memory, where it becomes in the next step of the recursion, and so on.
Notification Switch
Would you like to follow the 'A first course in electrical and computer engineering' conversation and receive update notifications?