8
$\begingroup$

I am trying to figure out what happens if you apply Hampel's outlier detection technique based on the median and the MAD to data that is skewed. Apparently, the advantage of Hampel's method over z-scores is that it is much less influenced by outliers itself. However, several papers and websites say that this method should not be applied when the data distribution is skewed, so when the data is not normally distributed. However, I did not find any literature about what happens if you apply this method to skewed data. Does it not detected any outliers at all? Or does it detected false positives? I found several questions in this forum about whether using z-scores or Hampel's approach and even when data is skewed but no one gave an answer of what the outcome of Hampel's method is when it is applied to skewed data.

The closest comment I found in this forum is the following:

"Using the MAD amounts to assuming that the underlying distribution is symmetric (deviations above the median and below the median are considered equally). If your data is skewed this is clearly wrong: it will lead you to overestimating the true variability of your data." Mean$\pm$SD or Median$\pm$MAD to summarise a highly skewed variable?

It says "it will lead you to overestimating the true variability of your data" but what does that actually mean? Does it lead to the identification of too many or too less outliers?

In addition, can anyone see a problem of applying this technique to studies of small sample sizes compared to z-scores??

Can anyone help to shed light on that?

$\endgroup$
2
  • $\begingroup$ Well, I read the whole page again but still cannot find/see the answer to my question? With "For your second question" do you refer to the question of applying hampel's technique to small sample sizes. I am asking as I do not want to assign your answer to the wrong question. $\endgroup$
    – user969113
    Apr 24, 2013 at 15:20
  • 1
    $\begingroup$ Your question appears to confuse "symmetric" and "normal". You don't give any references for the statements you allude to. Precisely how such rejection rules will behave when data are skew will depend on the exact shape of the generating distribution, so it is hard to say anything firm. If you are determined on using such a rule, then @user603 is giving very clear hints: use different rules for each tail and simulate something close to what you think is going on to judge how any rule would work. $\endgroup$
    – Nick Cox
    May 22, 2013 at 7:26

2 Answers 2

4
$\begingroup$

It seems to me that these rejection rules make most sense if you have grounds to believe that your data are drawn from some majority distribution PLUS a contaminating heavier-tailed distribution. That picture of a contaminated situation should ideally draw upon subject-matter knowledge of the real generating process (physical, biological, economic, whatever).

Conversely, if you don't have independent grounds to believe that there are contaminants, how can you expect that choosing any rejection rule is the right thing to do?

But there is at least one alternative world-view, which is that outliers may be just what you expect from a heavy-tailed (and in this question asymmetric) distribution, which may or may not resemble some textbook distribution, say a lognormal.

With marked asymmetry, I would expect first to try a transformation and then see whether outliers are apparent on a more nearly symmetric scale. Alternatively, and increasingly commonly, the answer is not to reject outliers but to use a model that is based on a heavy-tailed distribution.

What I want to do here is underline one view, which is that outlier rejection rules may cause quite as many problems as they solve, and that they need not be part of routine data analysis.

I realise that some people have large datasets of dubious quality arriving in real time and they may judge that they have no alternative but to filter them with some outlier rejection rule, but I suspect I am not alone among statistical people in being deeply suspicious of such rules.

It's elementary but worth mentioning that very often the outliers are genuine and important, even though I routinely encounter students determined to omit them as awkward to analyse.

It's lose-lose: you could devise an outlier rejection rule if you had a good understanding of the precise generation process, but you don't, and so who knows what are the real properties of any rule you use.

$\endgroup$
3
  • 1
    $\begingroup$ @user603: No, I don't think I am confusing or even conflating these. I said "make most sense"; I didn't say and didn't mean that rejection rules make absolutely no sense in other situations. $\endgroup$
    – Nick Cox
    May 22, 2013 at 7:00
  • $\begingroup$ ok, then I misunderstood your answer. $\endgroup$
    – user603
    May 22, 2013 at 8:56
  • $\begingroup$ I think most experienced data analysts would find it a challenge to encapsulate what to do about outliers in a clear, concise, coherent statement. At least I do. Whatever you do can seem quite wrong from some other point of view. For example, there are robust versions of many methods, but by no means all, so sometimes outlier rejection (or something else, say Winsorizing) is essential to avoid crazy results. $\endgroup$
    – Nick Cox
    May 22, 2013 at 9:02
4
$\begingroup$

If the uncontaminated data in your sample is drawn from an asymmetric distribution and the measure of scale you use to determine the width of the rejection region assumes that the good part of your data is symmetric, then, these rejection regions will be larger than they need to be. For illustration, if the distribution of the data is really right skewed. This would lead you to

  • Reject genuine observations from the right tail as outliers.
  • Fail to detect outliers from the left tail for what they are.

Overall, the combined effect would be that your (inappropriately) cleaned dataset will look more symmetric than it really is.

The alternative here is to use an outlier detection rule that treats the left and right tails of your sample separately. Of course, compared to the mad and median, this will also halve the breakdown point of your procedure (this is inevitable because the contamination rate of an half sample can be potentially twice as high as the contamination rate the full sample).

In my opinion, the best procedure for this problem is to use the rejection regions from the adjusted boxplots. In my experience (drawn from numerical simulation), they can be expected to reliably detect asymmetric contaminations even when the data contains as much as 10-15% outliers concentrated in one tail. Adjusted boxplots are widely implemented and their connection with the classical boxplots makes them easy to understand and use. This answer explains and illustrates the use of adjusted boxplots in a context quiet like yours.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.