Overview - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Data Smoothing Commands

  

The Statistics package provides various data smoothing functions. The following is a list of available commands.

  

 

ExponentialSmoothing

apply exponential smoothing to a data set

LinearFilter

apply linear filter to a data set

MovingAverage

compute moving averages for a data set

MovingMedian

compute moving medians for a data set

MovingStatistic

compute moving statistics for a data set

WeightedMovingAverage

compute weighted moving averages for a data set

  

The TimeSeriesAnalysis[ExponentialSmoothingModel] command also provides a form of smoothing.

Examples

Create 100 points on the curve y=sinπx10 and add some random noise.

withStatistics:

USampleNormal0,0.3,100

U−0.321727238399481−0.0987233611641195−0.1851275810729370.0643400235735872−0.007628438412715390.518646385253350−0.4904570263031710.4713516515262900.05110752642312250.3019435226255430.0806138037474931−0.439794134087633−0.0107273561518490−0.00195100903879099−0.0171549006699714−0.05538002838747870.0611566207113337−0.0296615472081370−0.0248094291125946−0.05043573843642240.0486063899603798−0.202775612901785−0.1322392932145600.2688059955778650.1383068860140070.3833931156821540.0703697885383742−0.0108823473881049−0.134654437053644−0.350211925597414−0.365382865182373−0.3464075882778750.0328977969850794−0.1859428141923850.192645301393477−0.0512312754294732−0.2460156723083950.403900558989702−0.295811568047437−0.289751638049954−0.4093877159417230.4950236158692230.404412454056052−0.3076121778559770.06893641825917290.445480373904158−0.390092716234762−0.1128393348708620.01853525900016190.240572348742312−0.03899264116525770.03374535918123980.189108177538398−0.00626878190525176−0.249132846899220−0.0787957530423553−0.2100900785904020.586670717583819−0.0778422496867822−0.02462551876872900.364673835787499−0.2949395441278970.5792071946668060.03682053257602590.129883626345462−0.1573331453588410.0672646655783495−0.1242676704295120.01065784086889160.5951136293039970.6640138768171070.2643689665880630.266056935168126−0.258499784192641−0.271983391002268−0.263019295304916−0.0652471378859968−0.1008465522867410.164812972805739−0.359264530214500−0.278253101861857−0.398985181626683−0.3391308094409330.381561075201006−0.4429546390347170.484014747280828−0.2056026208102460.324723870276193−0.233020470143960−0.1666444314283930.3217175543304750.0214058932888665−0.05463687734686660.188564863085573−0.217755193503086−0.1240141015800070.462724590346982−0.0660928282271428−0.2522448074258150.115519803619994

(1)

Vseqsinπi10+Ui,i=1..100:

PPointPlotV:

Qplotsinπx10,x=0..100,thickness=3:

plotsdisplayP,Q

Compute 5-element moving averages.

WMovingAverageV,5

W0.6216018323723710.9180844614869790.8839840768756630.9710335749790140.8399791711648790.7018935633725310.3622723449373390.0930444740469630−0.282731776822149−0.54535818604855296 element Vector[column]

(2)

RLineChartW,xcoords=seqi,i=2..98,thickness=3:

plotsdisplayP,Q,R

Apply exponential smoothing.

U1ExponentialSmoothingV,0.2

U1−0.01271024400449110.08764418302207780.1948932290780640.3589938912362000.4856694253064170.6824761205548340.6096928900582220.6995816928103310.6316902584078780.565740911251411100 element Vector[column]

(3)

U2ExponentialSmoothingV,0.8

U2−0.01271024401952270.3887074640987780.5768530234613640.9276878365872660.9794348165872811.371649284556260.5291778313686730.9531450893287450.4787286345042050.337300545001275100 element Vector[column]

(4)

RLineChartU1,U2,color=red,blue,thickness=3:

plotsdisplayP,R

Use lowess smoothing.

Xseqi,i=1..100:

RScatterPlotX,V,lowess,degree=3,color=blue,thickness=3:

plotsdisplayP,Q,R

See Also

Statistics

Statistics[Commands]

Statistics[DataManipulation]

TimeSeriesAnalysis

TimeSeriesAnalysis[ExponentialSmoothingModel]