Performing univariate analysis using a violin plot
A violin plot is quite like a boxplot because it depicts the distribution of our dataset. The violin plot shows the peak of our data and where most values in our dataset are clustered. Just like boxplots provide summary statistics about our data, violin plots do the same along with providing additional information about the shape of our data.
Figure 4.6: Violin plot illustration
In the preceding figure, we can see the following components of a violin plot:
- The thick line: This represents the interquartile range (25th percentile/1st quartile to the 75th percentile/3rd quartile).
- The white dot: This represents the median (50th percentile).
- The thin line: This is similar to the upper and lower whisker limits of the boxplot. It represents the range of values in our dataset that are not outliers. The lower and upper limits of the line are calculated from the IQR between the 1st quartile and...