Sumber : http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc4.htm What are Moving Average or Smoothing Techniques? Smoothing data removes random variation and shows trends and cyclic components Inherent in the collection of data taken over time is some form of random variation. There exist methods for reducing of canceling the effect due to random variation. An often-used technique in industry is "smoothing". This technique, when properly applied, reveals more clearly the underlying trend, seasonal and cyclic components. There are two distinct groups of smoothing methods Averaging Methods Exponential Smoothing Methods Taking averages is the simplest way to smooth data Mean squared error is a way to judge how good a model is Average weighs all past observations equally In summary, we state that 1. The "simple" average or mean of all past observations is only a useful estimate for forecasting when there are no trends. If there are trends, use different estimates that take the trend into account. 2. The average "weighs" all past observations equally. For example, the average of the values 3, 4, 5 is 4. We know, of course, that an average is computed by adding all the values and dividing the sum by the number of values. Single Moving Average Taking a moving average is a smoothing process An alternative way to summarize the past data is to compute the mean of successive smaller sets of numbers of past data as follows: Recall the set of numbers 9, 8, 9, 12, 9, 12, 11, 7, 13, 9, 11, 10 which were the dollar amount of 12 suppliers selected at random. Let us set M, the size of the "smaller set" equal to 3. Then the average of the first 3 numbers is: (9 + 8 + 9) / 3 = 8.667. This is called "smoothing" (i.e., some form of averaging). This smoothing process is continued by advancing one period and calculating the next average of three numbers, dropping the first number. The next table summarizes the process, which is referred to as Moving Averaging. The general expression for the moving average is Mt = [ Xt + Xt-1 + ... + Xt-N+1] / N Results of Moving Average Supplier $ 1 2 3 4 5 6 7 8 9 10 11 12 MA Error Error squared 9 8 9 8.667 0.333 12 9.667 2.333 9 10.000 -1.000 12 11.000 1.000 11 10.667 0.333 7 10.000 -3.000 13 10.333 2.667 9 9.667 -0.667 11 11.000 0 10 10.000 0 0.111 5.444 1.000 1.000 0.111 9.000 7.111 0.444 0 0 The MSE = 2.018 as compared to 3 in the previous case. Centered Moving Average When computing a running moving average, placing the average in the middle time period makes sense In the previous example we computed the average of the first 3 time periods and placed it next to period 3. We could have placed the average in the middle of the time interval of three periods, that is, next to period 2. This works well with odd time periods, but not so good for even time periods. So where would we place the first moving average when M = 4? Technically, the Moving Average would fall at t = 2.5, 3.5, ... To avoid this problem we smooth the MA's using M = 2. Thus we smooth the smoothed values! If we average an even number of terms, we need to smooth the smoothed values The following table shows the results using M = 4. Interim Steps Period Value MA Centered 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 9 8 9.5 9 9.5 9.5 12 10.0 10.5 9 10.750 11.0 12 9 This is the final table: Period Value Centered MA 1 2 3 4 5 6 7 9 8 9 12 9 12 11 9.5 10.0 10.75