Removing Outliers from List
- To: mathgroup at smc.vnet.net
- Subject: [mg127665] Removing Outliers from List
- From: Murta <rodrigomurtax at gmail.com>
- Date: Tue, 14 Aug 2012 04:20:41 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
Hi All Some simple idea on how to remove the outliers from a list like this?: l={24, 24, 3, 2, 1, 1, 1, 1} to get this: l={3, 2, 1, 1, 1, 1} I have one complicated one that need a lower sigma parameter to work: ------------------------------------------------ l={24, 24, 3, 2, 1, 1, 1, 1} removeNormalOutliers[data_,\[Alpha]_:2.09]:=Block[{removeSub}, removeSub[dataSub_]:=Module[{\[Sigma],\[Mu],return}, If[Length[dataSub]>1,\[Mu]=N@Mean[dataSub]; \[Sigma]=N@StandardDeviation[dataSub]; return=Select[dataSub,#<=\[Mu]+\[Alpha] \[Sigma]&],dataSub] ]; FixedPoint[removeSub,data,20] ] removeNormalOutliers[l, 1] ------------------------------------------------ Some better/simple idea? tks in advance Murta
- Follow-Ups:
- Re: Removing Outliers from List
- From: Bob Hanlon <hanlonr357@gmail.com>
- Re: Removing Outliers from List