Mathematica Asked by Szabolcs on January 15, 2021
BoxWhiskerChart
can detect and show outliers:
SeedRandom[39]
BoxWhiskerChart[
RandomVariate[NormalDistribution[], 100],
"Outliers"
]
iqrc = "IQRCoefficient" /. ChartElementData["BoxWhisker", "Options"];
1.5
fences = Quartiles[data][[{1, 3}]] + {-1, 1} iqrc InterquartileRange[data]
outliers = Select[Not @* Between[fences]] @ data
{-3.0844, -3.4005}
which matches the vertical coordinates of outlier glyphs:
Cases[BoxWhiskerChart[data, "Outliers", PerformanceGoal -> "Speed"],
Inset[_, {_, a_}] :> a, All]
{-3.0844, -3.4005}
Correct answer by kglr on January 15, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP