Box plot
IQR=QU-QL
Draw two lines at Q3+1.5IQR and Q1-1.5IQR , which are the same as the median line, called the inner fences.
Draw two lines at Q3+3IQR and Q1-3IQR, which are called outer fences.
Observations falling between the inner and outer fences are considered suspicious outliers
Observations falling outside the outer fences are considered highly suspicious outliers
A |
B |
|
1 |
=file("D://titanic.csv").import@qtc() |
|
2 |
=A1.(Fare) |
|
3 |
=A2.median(1:4) |
=A2.median(3:4) |
4 |
=B3-A3 |
|
5 |
=B3+3*A4 |
=B1-3*A4 |
6 |
=A1.select(Fare>A5 || Fare<B5) |
For example, detect outliers for the "Fare" variable in the Titanic data by using box plot
A3 B3 Calculate the lower and upper quartile
A4 Calculate IQR
A5 B5 Calculate the outer fences value
A6 Values that fall outside the outer fences are judged to be outliers.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_SPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL