3
$\begingroup$

Let's say I have a set of data which are lognormal-distributed and I want to create boxplots. The part of the values which is symbolized by the box may lie somewhere around 1. In that case, the inter quartile range will also be single digit. With the lower values lying somewhere below 0.1, even the most extreme values will be covered by 1.5 times the IQR, and thus by the lower whisker. On the contrary, the upper whisker will be quite short, making every value of 10 or higher a possible outlier.

As I have up to 9000 observations in each plot, ranging from 10^-7 to 1, I always get plots with very long lower whiskers and a huge field of outliers to the top.

This makes me wonder: 1. Is there a rule (of thumb) for what should be considered an outlier among logarithmically distributed data? 2. Is there a more elegant way to configure the whiskers for boxplots with logarithmic y-axis?

For R-users, this may serve as a minimal example: data <- rlnorm(50) # random-generated lognormal data IQR(data) # interquartile range boxplot(data, log='y')

$\endgroup$

1 Answer 1

3
$\begingroup$

Since none of your values are negative or zero, you can just take the log of the value and then do a boxplot of that. Given that you say your values are lognormal distributed, this seems like the easiest way to proceed.

$\endgroup$
1
  • $\begingroup$ Thanks for your answer! I don't know if i made clear that i already set the y-axis logarithmically. But i also realize that when i transform the actual data to log10 before plotting, only what i would consider "real outliers" is displayed as such. Which makes sense, as all values are now single-digit and may be covered by the IQR. $\endgroup$
    – Levent B.
    Jan 16, 2013 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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