{"id":3604,"date":"2014-02-01T22:20:26","date_gmt":"2014-02-02T03:20:26","guid":{"rendered":"http:\/\/labrigger.com\/blog\/?p=3604"},"modified":"2014-02-02T11:44:09","modified_gmt":"2014-02-02T16:44:09","slug":"box-plots-vs-bar-charts","status":"publish","type":"post","link":"http:\/\/labrigger.com\/blog\/2014\/02\/01\/box-plots-vs-bar-charts\/","title":{"rendered":"Box plots vs. bar charts"},"content":{"rendered":"<p align=\"center\"><a href=\"http:\/\/www.nature.com\/nmeth\/journal\/v11\/n2\/full\/nmeth.2807.html\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2014\/02\/box.png\" alt=\"box\" width=\"500\" height=\"271\" class=\"aligncenter size-full wp-image-3618\" srcset=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2014\/02\/box.png 500w, http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2014\/02\/box-300x162.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>Nature Methods has <a href=\"http:\/\/blogs.nature.com\/methagora\/2014\/01\/bring-on-the-box-plots-boxplotr.html\">a special on box plots<\/a>, and in particular, the web app <a href=\"http:\/\/boxplot.tyerslab.com\/\">BoxPlotR<\/a>.<\/p>\n<p>Box plots are great. However, the conventions for box plots are not completely uniform (see below), and that can lead to confusion and make it take longer for a general audience to interpret the graphical representation of the data and understand the story it tells. And furthermore, it&#8217;s usually pretty simple to supplement a humble bar chart (mean +\/- standard error or standard deviation) with a plot of all of the data points, so the reader can see the distribution.<\/strong> In 1969, when <a href=\"http:\/\/en.wikipedia.org\/wiki\/John_W._Tukey\">Tukey<\/a> came up with the box plot, we didn&#8217;t have the fast and powerful graphing tools that we have today. Even in the cases of large sample sizes, where it&#8217;s not practical to plot every point, a histogram can still provide more visual information than a box plot. For example, if the distribution appears bimodal, this is immediately obvious in a histogram, but not so in a box plot (nor a bar chart, of course).<\/p>\n<p>What do you think?<\/p>\n<h2>Some features of box plots are always the same, others aren&#8217;t<\/h4>\n<p><strong><em>Center bar<\/em><\/strong><br \/>\nAlways the median.<\/p>\n<p><strong><em>Top and bottom of the box<\/em><\/strong><br \/>\nAlways the first and third quartiles.<\/p>\n<p><strong><em>Whiskers<\/em><\/strong><br \/>\n<strong>Sometimes<\/strong> the max and min values, <strong>sometimes<\/strong> some extreme percentiles (e.g., 9th and 91st, or 2nd and 98th percentiles) to exclude the influence of extreme outliers, <strong>sometimes<\/strong> the whiskers are based on standard deviation, and <strong>sometimes<\/strong> none of the above.<\/p>\n<p><strong><em>Data markers<\/em><\/strong><br \/>\nRelated to the whiskers, if there are data points outside of the whiskers, they are <strong>sometimes<\/strong> drawn in the box plot, but <strong>sometimes<\/strong> not. And <strong>sometimes<\/strong> they&#8217;re outliers, and <strong>sometimes<\/strong> they&#8217;re just the extreme tails of the sample.<\/p>\n<p><strong><em>Width<\/em><\/strong><br \/>\n<strong>Sometimes<\/strong> the width of the box plot is used to indicate sample size, <strong>sometimes<\/strong> not.<\/p>\n<p><strong><em>Notches<\/em><\/strong><br \/>\n<strong>Sometimes<\/strong> notches are used to give a visual cue as to the potential significance for the difference between two means, <strong>sometimes<\/strong> not. However, the actual math behind the notches, is not as trivial as looking for overlapping standard error bars, which serves a similar purpose. Neither is perfect of course, but it&#8217;s easy to see the appeal of the simpler solution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p align=\"center\"><a href=\"http:\/\/www.nature.com\/nmeth\/journal\/v11\/n2\/full\/nmeth.2807.html\"><\/a><\/p>\n<p>Nature Methods has <a href=\"http:\/\/blogs.nature.com\/methagora\/2014\/01\/bring-on-the-box-plots-boxplotr.html\">a special on box plots<\/a>, and in particular, the web app <a href=\"http:\/\/boxplot.tyerslab.com\/\">BoxPlotR<\/a>.<\/p>\n<p>Box plots are great. However, the conventions for box plots are not completely uniform (see below), and that&#8230;<\/p>\n<div class=\"read-more\"><a href=\"http:\/\/labrigger.com\/blog\/2014\/02\/01\/box-plots-vs-bar-charts\/\">Read More<\/a><\/div><\/p>\n","protected":false},"author":1,"featured_media":3618,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[25,24],"class_list":["post-3604","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-analysis","tag-dissemination"],"_links":{"self":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/3604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/comments?post=3604"}],"version-history":[{"count":17,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/3604\/revisions"}],"predecessor-version":[{"id":3622,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/3604\/revisions\/3622"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/media\/3618"}],"wp:attachment":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/media?parent=3604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/categories?post=3604"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/tags?post=3604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}