Get startedGet started for free

Visualizing many categories

So far in this chapter, we've only considered the case of differences in a numeric variable between two categories. Of course, many datasets contain more categories. Before you get to conducting tests on many categories, it's often helpful to perform exploratory data analysis. That is, calculating summary statistics for each group and visualizing the distributions of the numeric variable for each category using box plots.

Here, we'll return to the late shipments data, and how the price of each package (pack_price) varies between the three shipment modes (shipment_mode): "Air", "Air Charter", and "Ocean".

late_shipments is available; dplyr and ggplot2 are loaded.

This exercise is part of the course

Hypothesis Testing in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Using late_shipments, group by shipment mode, and calculate the mean and std dev of pack price
___
Edit and Run Code