i

R Programming Complete Tutorial

Outlier Detection

Now, we will discuss the critical part, outlier detection. We basically use the interquartile range-based method (Tukey's Method). We can define outlier to be an observation outside the min-max outlier range. 

  • We can define outlier, to be an observation outside the range:

    [Q1-k*IQR, Q3+k*IQR], If k=1.5, Mild outliers. If k=3, Extreme outliers

Example:

In this example, we will detect outliers from Sepal.Width column of the IRIS dataset. 

Box Plot presentation of Outliers:

This Boxplot will display the outliers of Sepal.Width column from the IRIS dataset.