A tale as old as time. You have two different groups, and you want to really figure out not only if there is a difference, but also which is best. In New York City, this question materializes as Mets vs Yankees (Mets obviously).
When you have two different groups with a numeric data point, one of the first (and best) things to do is to compare the two means. There is more to uncover than just seeing if there is a difference between the actual means, which is exactly what we are going to be covering today.
Not only will we be answering this question, but weβll also walk through a complete workflow for comparing two groups. Starting from creating and reshaping data, we will move to visualizing differences, then to formally testing whether those differences are statistically meaningful. While this chapter uses baseball teams as the example, the same workflow applies to any two groups you might want to compare.