Z-score

 

Possible outliers:|z|>2

Highly suspicious outliers:|z|>3

..

Detect outliers for the "Fare" by using Z-score


A
1 =file("D://titanic.csv").import@qtc()
2 =A1.avg(Fare)
3 =sqrt(var@s(A1.(Fare)))
4 =A1.derive((Fare-A2)/A3:Fare_z)
5 =A4.select(Fare_z>3 || Fare_z<-3)


A2 Calculate the mean of Fare

A3 Calculate the standard deviation of Fare

A4 Calculate the Z-score of Fare

A5 Select the samples which |z|>3