2
$\begingroup$

This is quite a general question, perhaps somewhat opinion-based.

In most papers people use boxplots to visualize a certain distribution, yet violinplots are able to give more information. Violinplots are made by performing a kernel density estimation on your distribution.

Are there objective arguments to use one over the other? Or maybe there are specific situations in which one would prefer one over the other?

An example of both can be found here: enter image description here

$\endgroup$
  • $\begingroup$ You might also want to look at ridgeline (formerly joy) plots, available in the ggridges package in R. It is another, similar way to represent these distributions. $\endgroup$ – Eumenedies Feb 21 '18 at 10:55
2
$\begingroup$

Hugely dependent on both user and audience preference (violin plots being more unusual could throw people), so it is mostly up to you.

One main reason to go for a violin plot is to give more detail about the distribution, as box plots just give hard stops at the mean, stddev and 2 stddevs. Therefore if you think there is interesting information contained in the distribution between those points go violin.

The other main reason is they're more eye catching on Kaggle ;)

| improve this answer | |
$\endgroup$
1
$\begingroup$

Well, that is not true that Boxplot only gives hard stops! Violin plots are rather contemporary version of Boxplots I would say, and easy for the eyes to see the distribution of data. Boxplots also can reveal how data is distributed. For example, here you see a Boxplot of a normally distributed data that is symmetrical with the mean and median in the center (top), as well as a non-normal data (bottom). The source is here.

enter image description here

More details of how to interpret a Boxplot in terms of a normal distribution, look here:

enter image description here

Sidenote: Boxplots usually are used for easy and quick outliers detection as well.

Said that I totally agree with jshep that it is the matter of taste of both user and audience, and usually academics lean towards less fancier presentations like Boxplots.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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