ADVERTISEMENT
Google AdSense Slot (headerLeaderboard)
Set your Publisher ID in src/config/ads.ts to display live ads.
Data Science & Statistical Analysis• 6 min read
Descriptive Statistics: Mean, Median, Mode & Spread
Differentiate measures of central tendency from measures of dispersion and understand why median outperforms mean for skewed distributions.
Central Tendency: When to Use What
Mean: The arithmetic average. Highly sensitive to extreme outliers.
Median: The 50th percentile value. Robust against extreme skewness (e.g., house prices, net worth).
Mode: The most frequently occurring value. Best for categorical data.
Mean vs. Median with Extreme Outliers
import numpy as np
# Salaries of 5 employees plus 1 billionaire founder
salaries = [45000, 50000, 52000, 58000, 60000, 10000000]
print("Mean Salary:", round(np.mean(salaries), 2))
print("Median Salary:", np.median(salaries))Pro Tip
When data is skewed, report the Median and Interquartile Range (IQR) rather than the Mean and Standard Deviation.
ADVERTISEMENT
Google AdSense Slot (inContentBanner)
Set your Publisher ID in src/config/ads.ts to display live ads.
Test Yourself With Exercise
Which measure of central tendency is least distorted by extreme outliers?