7
$\begingroup$

I have a data set shown as box-whisker graphs after disaggregating. See below.

enter image description here

I am wondering why Tableau (the product I am using) automatically plots a whole bunch of values outside the box-whisker. I thought the whiskers of the box are minimums and maximums. It says that the values above the maximum whisker are outliers but I don't see the need to show it and second not sure what logic it uses to calculate it. So just wondering whether anyone knows why someone would want to look at a box-whisker graph which has outliers shown as well rather than them being contained within the box-whisker? (I.e. is this common statistical practice?)

$\endgroup$
4
  • 3
    $\begingroup$ I can't comment easily on Tableau, which I have never used -- but if its documentation doesn't explain its practices, then why take it seriously? But your last question has an easy answer. Showing data points individually if they are more than 1.5 IQR away from the nearer quartile is common (so far as I can judge, the most common single flavour of box plots). That is, show points higher than upper quartile + 1.5 IQR or lower than lower quartile - 1.5 IQR. Here IQR = upper quartile - lower quartile. At a guess, Tableau is here showing all data points plus a superimposed box for each group. $\endgroup$
    – Nick Cox
    Nov 26, 2014 at 2:29
  • 3
    $\begingroup$ Not the question, but your example data cry out to be shown on a transformed scale, notably a logarithmic scale if all values are positive. They are reminiscent of city population data. To return to your question: the extra data points show important detail that the boxes omit, so getting rid of it is the wrong direction to go. $\endgroup$
    – Nick Cox
    Nov 26, 2014 at 2:31
  • $\begingroup$ Many questions here on boxplots, as the existence of a tag does hint. $\endgroup$
    – Nick Cox
    Nov 26, 2014 at 2:31
  • 1
    $\begingroup$ You can right click on your affected axis and choose "Edit Reference Line" and set the whiskers to extend to the min/max of the dataset - this won't remove outliers, but the whiskers will no longer be extending to 1.5 X's the IQR -- instead, they'll extend to the min and max of the data being considered. $\endgroup$
    – user73832
    Apr 17, 2015 at 18:34

2 Answers 2

8
$\begingroup$

The usual (and original) definition of a box and whisker plot does include outliers (indeed, Tukey had two kinds of outlying points, which these days are often not distinguished).

Specifically, the ends of the whiskers in the Tukey boxplot go at the nearest observations inside the inner fences, which are generally at the upper hinge + 1.5 H-spreads and lower hinge - 1.5 H-spreads (basically, UQ + 1.5 IQR and LQ - 1.5 IQR). What's outside those is marked as outliers.

That's what R does, for example:

boxplot of stopping distances

There are many variations on the box plot, and some packages implement other things than the Tukey boxplot, but it's the most common one. Indeed, Wickham & Stryjewski's "40 years of boxplots" mentions numerous variations (and that's only a fraction of what can be found out there).

See Wikipedia's article on the box plot for some basic details.

Incidentally, Tableau isn't just showing outliers - it's showing all the data there. You can see it's marking points between the ends of the whiskers, and even points inside the boxes, not just the ones outside the inner fences.

Tableau describes its boxplots here; as you see the description broadly matches what I describe for Tukey boxplots above.


Edit: This is just to add a drawing of what the boxplot elements look like in the Schmid and Crowe references mentioned in comments so people don't have to chase them down to see what was being discussed:

enter image description here

(the Crowe version is slightly tweaked here in a couple of ways, one of which makes it seem a bit more boxplot-like; I may do a more faithful version later)

$\endgroup$
14
  • 2
    $\begingroup$ The paper cited appears to have stalled given lukewarm reviews. github.com/hadley/boxplots-paper publicises what appear to be two reviews by American Statistician reviewers and comments sent privately by David Hoaglin and myself. More crucially, the comments underline that the history is much longer than the 40 years of the title (which has been much cited on the internet). $\endgroup$
    – Nick Cox
    Nov 26, 2014 at 3:06
  • $\begingroup$ @NickCox I agree that 40 years is an underestimate -- indeed, I mentioned a reference to Hadley several years ago (an old book by Schmid, around 1949 if I remember correctly, which shows a clear precursor, rather like some of the variants in the paper) that is now mentioned (since some time in 2012) in a comment in the paper's tex file at github but doesn't yet seem to in the references. Nevertheless, it's about the best coverage of variants I can easily point to in one place. $\endgroup$
    – Glen_b
    Nov 26, 2014 at 3:38
  • $\begingroup$ @NickCox (Edited) -- It was Calvin F. Schmid Handbook of Graphic Presentation, 1954. Fig 114, p178 (see here, noting that page numbers don't quite correspond to what's printed on the page); the graph is of quantiles (5-25-50-75-95) of new house prices vs (categories of) area in square feet, from a 1949 report. I've drawn what the boxes within the chart look like at the bottom of my answer above. $\endgroup$
    – Glen_b
    Nov 26, 2014 at 8:02
  • 4
    $\begingroup$ I support @Glen_b's lucid and concise presentation, which I upvoted, but I'd like to emphasise that the spirit of Tukey's rule for identifying which points should be plotted individually beyond the whiskers was that those data points needed thought and if need be action. Indeed in Tukey's work a box plot with a tail of such values was often the signal for a transformation. Sometimes the idea is encountered that 1.5 IQR etc. is the basis for a rule for identifying which points should be discarded, or regarded as dubious, which I think was a very long way indeed from Tukey's intent. $\endgroup$
    – Nick Cox
    Nov 26, 2014 at 9:48
  • 1
    $\begingroup$ Figure 2 seems to have been omitted from the on-line version. From my notes: His figure 2, a map of Europe with several climatic stations, shows monthly medians, quartiles, and octiles. Other references: Crowe, P.R. 1936. The rainfall regime of the Western Plains. Geographical Review 26: 463-484. Matthews, H.A. 1936. A new view of some familiar Indian rainfalls. Scottish Geographical Magazine 52: 84-97. Hogg, W.H. 1948. Rainfall dispersion diagrams: a discussion of their advantages and disadvantages. Geography 33: 31-37. $\endgroup$
    – Nick Cox
    Nov 27, 2014 at 15:57
4
$\begingroup$

Tableau offers two options - Schematic box plot which is often referred to as Tukey box plot and skeletal box plot. Latter has whiskers extending from minimum to maximum. Former whiskers extending to the nearest data points within 1.5 IQR from the hinges. There is an option to toggle whether to show all points in the visualization or just the outliers.

$\endgroup$
1
  • $\begingroup$ I found it tough to track down the option for plotting the points other than outliers. You can get to it by right clicking the axis for the box plot's measure, selecting "Edit Reference Line", and then toggling "Hide underlying marks (except outliers)". $\endgroup$
    – josliber
    Jul 22, 2017 at 1:30

Your Answer

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

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