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.