Exponential smoothing or exponential moving average (EMA) is a technique for smoothing time series data using the exponential window function. Whereas in the simple moving average the past observations are weighted equally, exponential functions are used to assign exponentially decreasing weights over time. It is an easily learned and easily applied procedure for making some determination based on prior assumptions by the user, such as seasonality. Exponential smoothing is often used for analysis of time-series data. Exponential smoothing is one of many window functions commonly applied to smooth data in signal processing, acting as low-pass filters to remove high-frequency noise. This method is preceded by Poisson's use of recursive exponential window functions in convolutions from the 19th century, as well as Kolmogorov and Zurbenko's use of recursive moving averages from their studies of turbulence in the 1940s. The raw data sequence is often represented by {xt} beginning at time t=0, and the output of the exponential smoothing algorithm is commonly written as {st}, which may be regarded as a best estimate of what the next value of x will be. When the sequence of observations begins at time t=0, the simplest form of exponential smoothing is given by the following formulas:
s0=x0st=αxt+(1−α)st−1,t>0 where α is the smoothing factor, and 0<α<1. If st−1 is substituted into st continuously so that the formula of st is fully expressed in terms of {xt}, then exponentially decaying weighting factors on each raw data xt is revealed, showing how exponential smoothing is named. The simple exponential smoothing is not able to predict what would be observed at t+m based on the raw data up to t, while the double exponential smoothing and triple exponential smoothing can be used for the prediction due to the presence of bt as the sequence of best estimates of the linear trend.
Basic (simple) exponential smoothing The use of the exponential window function is first attributed to Poisson as an extension of a numerical analysis technique from the 17th century, and later adopted by the signal processing community in the 1940s. Here, exponential smoothing is the application of the exponential, or Poisson, window function. Exponential smoothing was suggested in the statistical literature without citation to previous work by Robert Goodell Brown in 1956, and expanded by Charles C. Holt in 1957. The formulation below, which is the one commonly used, is attributed to Brown and is known as "Brown’s simple exponential smoothing". All the methods of Holt, Winters, and Brown may be seen as a simple application of recursive filtering, first found in the 1940s to convert finite impulse response (FIR) filters to infinite impulse response filters. The simplest form of exponential smoothing is given by the formula:
st=αxt+(1−α)st−1, where α is the smoothing factor, with 0≤α≤1. In other words, the smoothed statistic st is a simple weighted average of the current observation xt and the previous smoothed statistic st−1. Simple exponential smoothing is easily applied, and it produces a smoothed statistic as soon as two observations are available. The term smoothing factor applied to α here is something of a misnomer, as larger values of α actually reduce the level of smoothing, and in the limiting case with α = 1 the smoothing output series is just the current observation. Values of α close to 1 have less of a smoothing effect and give greater weight to recent changes in the data, while values of α closer to 0 have a greater smoothing effect and are less responsive to recent changes. In the limiting case with α = 0, the output series is just flat or a constant as the observation x0 at the beginning of the smoothening process t=0. The method for choosing α must be decided by the modeler. Sometimes the statistician's judgment is used to choose an appropriate factor. Alternatively, a statistical technique may be used to optimize the value of α. For example, the method of least squares might be used to determine the value of α for which the sum of the quantities (st−xt+1)2 is minimized. Unlike some other smoothing methods, such as the simple moving average, this technique does not require any minimum number of observations to be made before it begins to produce results. In practice, however, a "good average" will not be achieved until several samples have been averaged together; for example, a constant signal will take approximately 3/α stages to reach 95% of the actual value. To accurately reconstruct the original signal without information loss, all stages of the exponential moving average must also be available, because older samples decay in weight exponentially. This is in contrast to a simple moving average, in which some samples can be skipped without as much loss of information due to the constant weighting of samples within the average. If a known number of samples will be missed, one can adjust a weighted average for this as well, by giving equal weight to the new sample and all those to be skipped. This simple form of exponential smoothing is also known as an exponentially weighted moving average (EWMA). Technically it can also be classified as an autoregressive integrated moving average (ARIMA) (0,1,1) model with no constant term.
Time constant The time constant of an exponential moving average is the amount of time for the smoothed response of a unit step function to reach 1−1/e≈63.2% of the final value. The relationship between this time constant, τ, and the smoothing factor, α, is given by the following formula:
α=1−e−ΔT/τ, thus τ=−ΔTln(1−α) where ΔT is the sampling time interval of the discrete time implementation. Some math libraries provide the function expm1(x) = exp(x) - 1 to provide more accurate results when x is close to 0 and this may be used directly to compute
α=−expm1(−ΔTτ) Similarly the inverse function log1p(x) = log(1+x) may be used to compute the time constant from the smoothing factor:
τ=−ΔTlog1p(−α) But if the sampling time is very small compared to the time constant (ΔT≪τ) then, by using the Taylor expansion of the exponential function,
α≈ΔTτ, thus τ≈ΔTα
… excerpt ends here. Continue reading the full article.