Box and Whisker Plot (Text-based)

 

Menu location: Graphics_Box and Whisker (Text).

 

Box and Whisker plots, described by Tukey (1977), give a pictorial representation of nonparametric descriptive statistics.

 

In nonparametric terms, the central "box" represents the distance between the first and third quartiles with the median between them marked with a diamond (an asterisk in the text-based plot), with the minimum as the origin of the leading "whisker" and with the maximum as the limit of the trailing "whisker".

 

The quartiles are calculated by the conventional definition used in the descriptive statistics (centile type 2): with the data sorted into ascending order, the lower quartile is the (n+1)/4th value and the upper quartile the 3(n+1)/4th value, interpolating between neighbouring values when this is not a whole number. Note that some software plots the upper and lower hinges (the medians of the upper and lower halves of the data) rather than the quartiles; hinges can differ slightly from quartiles.

 

This convention can also be extended to parametric representation of data using the arithmetic mean bounded by one standard deviation or by its confidence interval. StatsDirect enables you to choose one of these two parametric schemes or the nonparametric scheme for each plot. See descriptive statistics for the formulae used.

 

This is a useful way to present data to an audience; it is often easier to convey the central location and spread of values pictorially than by quoting a list of descriptive statistics.

 

Example

Test workbook (Nonparametric worksheet: Town Boys, Farm Boys).

 

These are the fitness scores of 36 boys from homes in the town and 12 boys from farm homes that are used in the Mann-Whitney U test example (Conover, 1999).

 

To draw this plot in StatsDirect open the test workbook using the file open function of the file menu. Then select Box and Whisker (Text) from the Graphics menu. Select the columns marked "Town Boys" and "Farm Boys" when prompted for data, and accept the default options (median, quartiles and range, with fences). The plot is written to the report window in a fixed-width font; the columns are listed from the top of the plot downwards, in the order they were selected.

 

For this example:

 

                            Box & whisker plot from test

 

              +

    Town Boys |   >-------------[.......*..............]-------------------<

              +

    Farm Boys |         >---------[............*........]----------<

              /+-------+-------+-------+-------+-------+-------+-------+---

               0.0     2.5     5.0     7.5     10.0    12.5    15.0    17.5

                   min < LQ < median > UQ > max, fences (1.5 & 3.0 IQR)

 

Each row is one column of data: the box runs from the lower quartile ([) to the upper quartile (]) with the median marked by an asterisk, and the whiskers run from the minimum (>) to the maximum (<). For Town Boys (n = 36) the minimum is 1, the lower quartile 5.15, the median 7.75, the upper quartile 12.4 and the maximum 18.6; for Farm Boys (n = 12) they are 2.7, 5.775, 9.8, 12.8 and 16.1. A value more than 1.5 interquartile ranges beyond a quartile, that is outside the inner fences (-5.725 to 23.275 for Town Boys and -4.7625 to 23.3375 for Farm Boys), would be plotted as a point (o) beyond a whisker that ends in a bar (|) at the fence, and a value more than three interquartile ranges beyond a quartile, outside the outer fences (-16.6 to 34.15 for Town Boys and -15.3 to 33.875 for Farm Boys), as a dot (.); there is none here, so the whiskers run to the extremes. The two groups of scores spread over similar ranges, with the farm boys' median the higher.

 

See also the graphical box and whisker plot.