Grouped Summary Statistics
You'll learn how to slice your data by category and compare numeric distributions across groups—one of the most powerful techniques in exploratory analysis.
What Are Grouped Summary Statistics?
Grouped summary statistics let you split your dataset by categories and calculate summary measures (like mean, median, or standard deviation) for each group separately. Instead of asking "What's the average?" you ask "What's the average for each category?"
Think of it like sorting students by grade level, then calculating average test scores per grade—you can instantly see which grades perform differently.
Why This Matters
When exploring relationships between a categorical variable and a numeric one, overall statistics hide critical patterns. For example:
- Average salary might be 45k for Group A and $75k for Group B
- Median age could differ dramatically between customer segments
- Spread (standard deviation) might reveal one group is highly variable while another is consistent
The Core Workflow
- Group your data by the categorical variable (e.g., product category, region, customer type)
- Select the numeric variable you want to summarize
- Calculate statistics like mean, median, min, max, std, or count for each group
- Compare the distributions across groups to spot differences
Real-World Example
Imagine analyzing house prices by neighborhood. Instead of one city-wide average, you calculate average price, median price, and price range per neighborhood. Suddenly you see Downtown has high prices with little variation, while Suburbs show lower averages but huge spreads.
Key Takeaway: Grouped summary statistics reveal how numeric distributions differ across categories—turning "one number" into a meaningful comparison that uncovers patterns hidden in overall averages.