Professional Documents
Culture Documents
o ln this method, we take the average on 'n' points and ptot it.
Ex: in 3-point moving average, we take the average of the current point, the previous
point and the next point.
. Moving average can be of different orders - such as 3-point moving average, 4 point
moving average, 5 point moving average and so on. 3-point moving average is the most
commonty used.
. Note that, for a n-point moving average, where n= no of data points, the moving
average (onty 1 point) is the mean.
P T T'
1 266
2 145.9 (266.0 + 145.9 + 183.1\ I 3 = 198.33
3 1 83.1 (145.9 + 183.1 + 119.3) I 3 = 149.43 (198.33 + 149.43 + 160.90) I 3 = 169.56
4 119.3 (183.1 + 119.3 + 180.3) I 3 = 160.90 (149.43 + 160.90 + 156.03) / 3 = 155.46
5 1 80.3 (119.3 + 180.3 + 168.5) / 3 = 156.03 (160.90 + 156.03 + 193.53) I 3 = 170,16
6 1 68.5 (180.3 + 168.5 + 231.8) / 3 = 193.53 (156.03 + 193.53 + 208.27) / 3 = 185.94
7 231.8 (168.5 + 231.8 +224.5\ / 3 =208.27 (193.53 + 208,27 + 216.3h /3 = 206.06
8 224.5 (231.8 + 224.5 + 192.8) I 3 = 216.37 (208.27 + 216.37 + 180.07) / 3 = 201.57
9 192.8 (224.5 + 192.8 + 122.9\ / 3 = 180.07 (216.37 + 180.07 +217.40) /3=204.61
10 122.9 (192.8 + 122.9 + 336.5) / 3 = 217.40 (180.07 + 217.40 + 215.10) / 3 = 204.19
11 336.5 (122.9 + 336.5 + 185.9) / 3 = 215.10
12 185.9
On pl,otting the above data, we get the betow tine graphs:
illw
300 - 1- - 42
-**l*----^-'"z i{rt-t'6vbrM6viri'd-AvdiidddT^-"-1^**"*'"1
nd-ldvpt-M ovi n's Ave r
liti iJ
-9
6
Blue line - represents actual data points. Notice that though there seems to be some sort
of pattern, there seems to be a lot of randomness.
yellow tine - 3 point moving average. Notice that the curve is smooth and easier to
understand.
Green line - Doubte moving average. lt's the second tevel of moving average, where we
take the average of the previousty obtained average vatues. The curve is even more
smooth.
More genericatty,
Jn=(Pn-l +Pn+Pn+l)/3
Notice that att the 3 points are given equat weights (of 1/3).
Pn+t ).
We keep catcutating more tevets of moving average (such as doubte moving average) tit[
the curve obtained is smooth enough.
Exampte:
. Formulo:
St=oXt+(1-o)St-r
where:
[Xt] = ;u* Outu
[Sd = smoothened data
q = smoothing factor; 0 s q < 1
St=qXt+(1-o) St-r
Expanding St-1:
Expanding St-z:
lf we continue expanding terms recursively tike this, we witt finatty end up with:
St=qXt+q (1-q)Xt.r +s (1-o;2y,., +o (1-q)3 Xt.l+............o (1-o)tr1Xr, (1-o)tXo
Or
St = q I Xt + (1-o) Xt-r + (1-o)z Xt.2 + o (1-o)r Xt-l+............ (1- q;t-t Xr ] * (1- o)t Xo
Let us assume q to be 0.5 (or greater). Then, note that the more weight is given to the
recent data and less weight is given to older data.
. Values for o:
. lf O= 0, then St = 5t-1
. lf s < 0.5, then greater weights witt be assigned to otder data, less weights to recent
data.
. lf q = 0.5, we get an equation very simitar to moving average, except that St-1 is used
instead of Xt-1, Xt+1
o lf the curve is not smooth enough, we increase o. Ideat range is 0.6 - 0.7.
Disadvantage of Smoothing:
. ln the process of smoothing, tength of data decreases. That is, we tose
out on the end data
points.
extreme points
. usuatty, since data sets are very huge (in 100s or 1000s), tosing out on
shoutdn,t be an issue untess they contain some criticat data.
ln case end points contain criticat data, the curye we fit may be incorrect, leading
. to
inaccurate forecast vatues.
point (which is
Note: After fitting a curve for the smoothened data, we can forecast a future
in the smoothened form). We need to transform this smoothened forecast back
to the original
raw form using the reverse catcutation of smoothing'