Skip to content

box plot and plot whiskers

3 messages · Barbara Uszczynska, David L Carlson, S Ellison

#
The whiskers will not be symmetrical if 1.5*IQR extends beyond the maximum or minimum values. In that case, the whisker stops at the maximum or minimum.

-------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352


----- Original Message ----- 

From: "Barbara Uszczynska" <uszczynska at gmail.com> 
To: r-help at r-project.org 
Sent: Friday, July 13, 2012 7:40:30 AM 
Subject: [R] box plot and plot whiskers 

Dear R users, 

I have question concerning box plot and it's whiskers. As I understood from 
the description of the boxplot() function, if the range value is positive 
the plot whiskers extend out from the box to the most extreme data points 
defined by the values of the IQR times range (default 1.5). It suggests 
that the upper and lower plot whiskers should be more less the same length. 
What does it mean if they are not? How it's possible? I'm using default 
value of the range. 

Would be garateful for any hint. 

Kind regards, 

Barbara 


______________________________________________ 
R-help at r-project.org mailing list 
https://stat.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 
and provide commented, minimal, self-contained, reproducible code.
#
... from the box. For a normal distribution (N(mu, sigma) the expected position of the whisker ends would be at mu+-4*0.674*sigma (that corresponds to a two-tailed 99.3% interval, if I've not lost a factor of two somewhere).
The end of each whisker is always a data point in your data set. Data can be anywhere.

In small data sets (under 20 per group) the whiskers can vary quite a lot by chance; for example try
set.seed(1027)
y <- rnorm(150)
g <- gl(10,15)
boxplot(y~g)


#and note group 2.

In bigger data sets the quantiles are less variable and different whisker length, like the different lengths of the box parts, becomes a more reliable indicator of asymmetry. 

S Ellison