2
$\begingroup$

I have a conceptual question here. I understood how to calculate a Moving Average(MA).

For example :

x(n) = 0, 1, 2, 3, 4, 5

MA = 0, 1/2, 3/2, 5/2,7/2, 9/2, where for calculation of the MA we only take the past values without any update

Is there also a case , where we use the newly calculated values and use that to update the MA for the next time instant?

x(n) = 0, 1, 2, 3, 4, 5

MA (n=0) = 0

MA (n=1) = (0 +1) /2 = 1/2

MA(n = 2) = (2 + 1/2) /2 = 5/4

MA(n = 3) = (3 + 5/4) = 17/4 and so on ?

Does this find an application anywhere?

Please help me with this understanding.

$\endgroup$
4
$\begingroup$

That system you're referring to is a first-order recursive filter

$$y[n]=\alpha x[n]+(1-\alpha)y[n-1],\qquad 0<\alpha<1\tag{1}$$

where $n$ is the (integer) time index, $y[n]$ is the output, and $x[n]$ is the input. You chose $\alpha=\frac12$.

That filter is also called exponentially weighted moving average. It has theoretically infinite memory and weighs the past input values with exponentially decreasing weights.

$\endgroup$
  • $\begingroup$ Aah, now I see it. It's a filter with a feedback then :) Thanks for helping me open my eyes on this one. $\endgroup$ – gklearning Aug 23 '18 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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