Hello,
The moving average for the following sequence is:
5 + 4 + 3 + 6 = 18 / 4 = 4.5
The moving average for the next sequence is
( 5 drops out, 7 is added):
4 + 3 + 6 + 7 = 20 / 4 = 5
However WikiPedia claims a more efficient calculation is possible:
"
http://en.wikipedia.org/wiki/Weighted_moving_average#Weighted_moving_average
SMAtoday = SMAyesterday - ((Pm-n+1)/n) + (Pm+1)/n
"
I am not sure if I understand this formula correctly but if I try to apply
it then ofcourse it doesn't work:
The moving average for the following sequence is:
5 + 4 + 3 + 6 = 18 / 4 = 4.5
The moving average for the next sequence is (by applieing formula's from
wikipedia):
4 + 3 + 6 + 7 = ? =
I guess 5 has to be subtracted since it drops out.
I guess 7 has to be added since it is added
Leading too:
SMAtoday = 4.5 - (5/10) + (7/10) = 4.7
Which would be a wrong answer.
Is this a flaw in Wikipedia ?
What you math guys have to say about all of this ? ;)
Bye,
Skybuck.