Statistics - Maple Programming Help

Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Data Smoothing : Statistics/ExponentialSmoothing

Statistics

 ExponentialSmoothing
 apply exponential smoothing to a data set

 Calling Sequence ExponentialSmoothing(X, lambda, options)

Parameters

 X - lambda - smoothing constant options - (optional) equation(s) of the form option=value where option is one of ignore, or initial; specify options for the ExponentialSmoothing function

Description

 • The ExponentialSmoothing function computes exponentially weighted moving averages for the original observations using the formula

${S}_{i+1}=\mathrm{lambda}{A}_{i+1}+\left(1-\mathrm{lambda}\right){S}_{i},i=1\mathrm{..}N-1$

 where N is the number of elements in A and ${S}_{1}={A}_{1}$ by default. This is useful for smoothing the data, thus eliminating cyclic and irregular patterns and therefore enhancing the long term trends.
 • The first parameter X is a single data sample - given as e.g. a Vector. Each value represents an individual observation.
 • The second parameter lambda is the smoothing constant, which can be any real number between 0 and 1.
 • For a more involved implementation of exponential smoothing, see TimeSeriesAnalysis[ExponentialSmoothingModel].

Options

 The options argument can contain one or more of the options shown below. These options are described in more detail in the Statistics[Mean] help page.
 • ignore=truefalse -- This option is used to specify how to handle non-numeric data. If ignore is set to true all non-numeric items in X will be ignored.
 • initial=deduce, or realcons -- This option is used to specify the initial value for the smoothed observations. By default, the first of the original observations is taken as the initial value.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $A≔⟨\mathrm{seq}\left(\mathrm{sin}\left(i\right),i=1..100\right)⟩:$
 > $U≔\mathrm{ExponentialSmoothing}\left(A,0.2\right):$
 > $V≔\mathrm{ExponentialSmoothing}\left(A,0.5\right):$
 > $W≔\mathrm{ExponentialSmoothing}\left(A,0.2,\mathrm{initial}=2\right):$
 > $\mathrm{LineChart}\left(\left[U,V,W\right]\right)$
 >