10.6084/m9.figshare.1544525.v1 Gerard Ridgway Gerard Ridgway A simple comparison of box plots and violin plots figshare 2015 visualization visualisation plotting Statistics 2015-09-15 15:27:01 Figure https://figshare.com/articles/figure/A_simple_comparison_of_box_plots_and_violin_plots/1544525 <p>This figure compares box plots and violin plots (or cat-eye plots) for three different sample sizes of standard normal data (the four "groups" in each plot are independent samples; the box and violin plots use the same data).</p> <p>Violin plots seem to be rapidly gaining popularity. I believe they are useful for large sample sizes (e.g. n>250 or ideally even larger), where the kernel density plots provide a reasonably accurate representation of the distributions, potentially showing nuances such as bimodality or other forms of non-normality that would be invisible or less clear in box plots.</p> <p>However, I believe violin plots are potentially misleading for smaller sample sizes, where the density plots can appear to show interesting features (and group-differences therein) even when produced for standard normal data. For example, in the figure here, for n=64, there appear to be differences in kurtosis between groups 1 and 2, differences in skew between 2 and 3; for n=16, group 4 hints at bimodality.</p> <p>Because box plots provide a coarser summary of the data, they seem safer to use with smaller samples. Though here, with n=64, it's still tempting to infer (false) differences between the groups visually, despite the overlapping notches.</p> <p>For very small sample sizes, violin plots provide no direct indication that the sample is very small, worsening the above problem. In contrast, notched box plots show wide notches compared to their interquartile ranges with very small samples -- an ugliness that helpfully indicates that they might not be the best way to display very small samples (showing the individual data points and indicating only the mean and/or median seems better in such cases).</p> <p>The above issues could be a particular concern in the situation where the sample sizes differ between groupsĀ  within a single plot (though this is not allowed in the cateye function used here, it is possible in MATLAB's boxplot and probably in other violin plot implementations). For example, here none of the four groups for n=16 look anywhere near as "normal" as the four groups for n=256.</p>