Skip to main content
added 13 characters in body
Source Link
rhermans
  • 37.4k
  • 4
  • 61
  • 152

From Wolfram MathWorld's explanation of Box-and-Whisker Plot outliers are defined as being the data points further than $3/2$ times the InterquartileRange from the MeanMedian.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean median = Mean[data]Median[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( meanmedian -iqr < # < mean+iqrmedian +iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this uses a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]

From Wolfram MathWorld's explanation of Box-and-Whisker Plot outliers are defined as being the data points further than $3/2$ times the InterquartileRange from the Mean.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean  = Mean[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( mean-iqr < # < mean+iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this uses a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]

From Wolfram MathWorld's explanation of Box-and-Whisker Plot outliers are defined as being the data points further than $3/2$ times the InterquartileRange from the Median.

removeoutlier[data_]:=Block[
    {mean, iqr},
    median = Median[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( median -iqr < # < median +iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this uses a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]
added 36 characters in body
Source Link
rhermans
  • 37.4k
  • 4
  • 61
  • 152

From Wolfram MathWorldMathWorld's explanation of Box-and-Whisker Plot outliers are defined as being the data points further than $3/2$ times the InterquartileRange from the Mean.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean  = Mean[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( mean-iqr < # < mean+iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this useuses a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]

From Wolfram MathWorld explanation of Box-and-Whisker Plot outliers are defined as being $3/2$ times the InterquartileRange from the Mean.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean  = Mean[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( mean-iqr < # < mean+iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this use a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]

From Wolfram MathWorld's explanation of Box-and-Whisker Plot outliers are defined as being the data points further than $3/2$ times the InterquartileRange from the Mean.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean  = Mean[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( mean-iqr < # < mean+iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this uses a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]
added 273 characters in body
Source Link
rhermans
  • 37.4k
  • 4
  • 61
  • 152

From Wolfram MathWorld explanation of Box-and-Whisker Plot outliers are defined as being $3/2$ times the InterquartileRange from the Mean.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean  = Mean[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( mean-iqr < # < mean+iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this use a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]

From Wolfram MathWorld explanation of Box-and-Whisker Plot outliers are defined as being $3/2$ times the InterquartileRange from the Mean.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean  = Mean[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( mean-iqr < # < mean+iqr )& ]
]

From Wolfram MathWorld explanation of Box-and-Whisker Plot outliers are defined as being $3/2$ times the InterquartileRange from the Mean.

removeoutlier[data_]:=Block[
    {mean, iqr},
    mean  = Mean[data] ;
    iqr   = 3/2*InterquartileRange[data];
    Select[data, ( mean-iqr < # < mean+iqr )& ]
]

Other functions also remove "outliers", for instance, the HampelFilter, however, this use a different definition of "outlier".

ResourceFunction["HampelFilter"][data2]
Source Link
rhermans
  • 37.4k
  • 4
  • 61
  • 152
Loading