Order the data from least to greatest then calculate these values:
- Q1 – quartile 1, the median of the lower half of the data set
- Q2 – quartile 2, the median of the entire data set
- Q3 – quartile 3, the median of the upper half of the data set
- IQR – interquartile range, the difference from Q3 to Q1
- Extreme Values – the smallest and largest values in a data set
Outliers
In order to be an outlier, the data value must be:
- larger than Q3 by at least 1.5 (some times 3) times the interquartile range (IQR), or
- smaller than Q1 by at least 1.5 (some times 3) times the IQR.
References
https://en.wikipedia.org/wiki/Box_plot
https://www.shmoop.com/basic-statistics-probability/box-whisker-plots.html
https://pupli.net/2019/05/31/detect-outlier-using-boxplot-in-java/