Skip to content

boxplot statistics

5 messages · Karin Lagesen, PIKAL Petr, Roger Bivand +2 more

#
I have read and reread the boxplot and the boxplot stats page, and I
still cannot understand how and what boxplot shows. I realize that
this might be due to me not knowing enough statistics, but anyway...

First, how does boxplot determine the size of the box? And is the line
inside the box the mean or the median (or something completely
different?) And how does it determine how long out the whiskers should
go?

Also, the boxplot.stats page talks about "hinges", what are those?  
"The two "hinges" are versions of the first and third quartile, i.e.,
close to 'quantile(x, c(1,3)/4)'."

Thankyou very much.

Karin
#
Hi

Try to find some textbook about statistics. You can get many 
explanations just by finding "boxplot" by e.g. Google and reading 
whot you found.

And of course you can get some information from help pages you 
mentioned.

coef: this determines how far the plot "whiskers" extend out from
          the box.  If 'coef' is positive, the whiskers extend to the
											^^^^^^^^^^^^^^^^^
          most extreme data point which is no more than 'coef' times
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          the length of the box away from the box. A value of zero
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          causes the whiskers to extend to the data extremes (and no
          outliers be returned).

HTH
Petr
On 4 Oct 2005 at 11:24, Karin Lagesen wrote:
To:             	r-help at r-project.org
From:           	Karin Lagesen <karin.lagesen at medisin.uio.no>
Date sent:      	Tue, 04 Oct 2005 11:24:04 +0200
Subject:        	[R] boxplot statistics
Petr Pikal
petr.pikal at precheza.cz
#
On Tue, 4 Oct 2005, Karin Lagesen wrote:

            
The reference on the help page is:

     Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A.
     (1983) _Graphical Methods for Data Analysis._  Wadsworth &
     Brooks/Cole.

and a search in BIBSYS suggests that a copy is in your university library:

 author = Chambers and title word = Graphical and material type = Books

The references are there to suggest where to look for the information you 
asked for.

  
    
#
Received Tue 04 Oct 2005  7:26pm +1000 from Karin Lagesen:
Wikipedia has a reasonable description

	   http://en.wikipedia.org/wiki/Boxplot

Regards
#
On Tue, 4 Oct 2005, Karin Lagesen wrote:
Part of the problem is that there are lots of different definitions of the 
quartiles (quantile() has 9 of them). If the number of observations is one 
more than a multiple of 4 then all the definitions agree, otherwise they 
are slightly different.

For the case where the number of observations is one more than a multiple 
of 4 the line in the middle is the median, the ends of the box are the 
upper and lower quartiles, and the whiskers extend to the furthest point 
that is within 1.5 box lengths from the end of the box.

When the number of observations is not one more than a multiple of four 
this is all still true, but you have to be careful about which definition 
of "quartile" you mean, for which you can read either the book referenced on 
the help page, or the code.

 	-thomas