Lesson 5: Summary Statistics
Before making charts, you need to understand your data numerically. Summary statistics — mean, median, mode, and range — give you a quick picture of what your data looks like and where most values fall.
Key Concepts
Mean (Average)
Add all values, divide by count.
mean = sum(data) / len(data)
The mean is pulled toward outliers. If one student scores 0, the mean drops for everyone.
Median
Sort the data, find the middle value. If even count, average the two middle values.
The median is resistant to outliers — great for things like house prices or salaries.
Mode
The value that appears most often. A dataset can have no mode, one mode, or multiple modes (bimodal). Example: [5,5,3,2,5] → mode = 5.
Range & Standard Deviation
Range = max − min. It tells you the spread. Standard deviation measures how far values typically fall from the mean. Large std dev = data is spread out. Small = data is clustered.
🔬 Interactive Lab: Statistics Calculator
Enter a list of numbers (comma-separated). Click Compute to see all summary statistics and a histogram.
✅ Check Your Understanding
1. Which statistic is least affected by outliers?
2. For the dataset [3, 3, 5, 7, 9], what is the mode?
3. Standard deviation measures: