Lets say I have following data:

Row X Y
1 11 101
2 12 102
3 13 103
4 14 104
5 15 105
6 40 106
7 16 107
8 17 108
9 18 112.7

Now lets say I would want to remove the outliers that are 1.5xIQR above the third quartile or 1.5xIQR below the first. Looking at the data I have

1. Quartile 13 103
Median 15 105
3. Quartile 17 107
1.5*IQR 6 6

Now only row 6 has an outlier in the X column, because X=40 would be 1.5*IQR above of the 3. quartile of X. When I remove the whole row, then the new stats would look like:

1. Quartile 12.5 102.5
Median 14.5 104.5
3. Quartile 16.5 106.5
1.5*IQR 6 6

Now with the removal of one row we have a new outlier in row 9 in the Y column, because before the removal it was barely below the cut-off of 113 and now the 3. Quartile dropped to 112.5, which would make 112.7 an outlier.

Is this a wrong approach to outlier removal? How should I proceed from here on?

  • 1
    $\begingroup$ Please tell us why you are removing outliers. I have to ask, because the algorithmic approach you are following is rarely useful. $\endgroup$
    – whuber
    Jan 16, 2021 at 18:51
  • $\begingroup$ I wanted to perform a regression on bivariate data. It looked like some values for both parameters had outliers and I was thinking that I should remove those before performing a regression. The reason I had this outliers is not because the measurements were incorrect but because it is a rare occurence. Imagine a survey of the Age of people that just married and then you have cases of 14 year olds or 95 year olds. I wanted to remove these edge cases. $\endgroup$ Jan 17, 2021 at 21:43
  • $\begingroup$ Please add new info as an edit to the Q and not only in comments! Not everybody reads comments ... $\endgroup$ Jan 20, 2021 at 3:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.