You are on page 1of 5

SMOOTHING

. Smoothing is a technique used to remove irregutarities in the data.


o lt is easier to comprehend and analyze smoothened data.
o ln the process of smoothing, we bring the data points ctoser to each other (that is, we
shrink the data).
. Some techniques used for smoothing are:
(a) Moving Average
(b) Exponentiat

(a) Moving Average Method:

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.

. Let us take an example:

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:

l Sales over Time Period


400 r-*-'"-"--r'****r***-'T*-*""'-""r*-*j|
el
2E^i....-!,,,;",*-*,-,*-,;--..--.J.-..-.,.',,,.--),,,,,-,'-*,------|--.*
IL
'"" I I '
ll:;1i:i1
l--****-t ** i'':"':: i::: ::' *_:_I _,_ *_t*__"ir
' '-m"i3-pointiMovingAverageiT i:
,
1

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

-*---'t-------:- t-- -------r------


6789
Time Period

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.

3-point Moving average (T) is given by:


Tr=(Pr.P2.P3)/3

More genericatty,
Jn=(Pn-l +Pn+Pn+l)/3

Notice that att the 3 points are given equat weights (of 1/3).

3-point Doubte Moving Average (T') is given by:


T't=(Tt,T2*T3) /3
=[ *P2*P3) / 3] + [(Pz*Pr*Pr)
[(P1 / 3] + [(Pr*Pr*Ps) I 31] / 3

= (Pr *2Pz+ 3P: *aPq, Ps) / 9


More genericatty,

f'p = (Pn-2 + 2Pn-l + 3Pn + 2Pn+1 + Pn+z) / 9


Notice that the current point (Pn) has a greater weight than the most immediate points
(Pn-1, Pn+1), which in turn have greater than weight than the next immediate points
(Pn-1,

Pn+t ).

We keep catcutating more tevets of moving average (such as doubte moving average) tit[
the curve obtained is smooth enough.

4 polnt moving average:


For even numbers of points, catcutation of moving average can be done in 2 ways.

Exampte:

current ooint + 1 previous point + 2 ng&IgUts


+ 2 orevious ooint + 1 next
(b) Exponential Method

. Formulo:

St=oXt+(1-o)St-r

where:
[Xt] = ;u* Outu
[Sd = smoothened data
q = smoothing factor; 0 s q < 1

. Expanding the formuta to have onty raw data points:

St=qXt+(1-o) St-r

Expanding St-1:

St = q Xt + (1-o) [o Xt-r + (1-o) St.z]

St= a Xt+ o (1-q) Xt-r + (1-q)2 St-z

Expanding St-z:

St = q Xt +o (1-q) Xt.t + (1-o)z [o Xt.z + (1_o) St.s]


St = q Xt + q (1-o) Xt.t + q (1-o)z y,-, + (1-o)3 St.t

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:

We know that, St = o Xt + (1-o) St-1

. lf o = 1, then St = Xt. We get the original series itsetf.

. 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

. lf q is close to 1 (0.8 - 0.9), we witt again be very ctose to original data.

o Hence, as a convention, we start off with q = 0.6.

o lf the curve is not smooth enough, we increase o. Ideat range is 0.6 - 0.7.

Moving Average vs Exponential Method:


. Exponential method is considered more efficient than Moving Average method.
. Since exponential method takes current data point and smoothened vatue of the previous
data point, it arrives at a smoother curye faster.
o ln case of moving average, we woutd require muttipte iterations/levets of smoothing to
arrive at a smoother curve.

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'

You might also like