📚 Understanding Median
The median is the middle value in a dataset when numbers are arranged in order. It divides the dataset into two equal halves - 50% of values are below it and 50% are above it. Unlike the mean (average), the median is not affected by extreme values or outliers, making it a robust measure of central tendency. Understanding median is crucial for analyzing skewed data, handling outliers, understanding income distributions, analyzing home prices, and making data-driven decisions when extreme values would mislead. Median provides a better representation of typical values when data contains outliers or is not normally distributed.
🔑 Key Median Concepts
- Definition: Median = middle value when data is sorted. For odd count: middle value. For even count: average of two middle values.
- Robustness: Not affected by extreme values or outliers, unlike mean.
- Percentile: Represents the 50th percentile - divides data into two equal halves.
- Use When: Data has outliers, is skewed, or extreme values would mislead.
- Advantage: Better represents typical values in skewed distributions.
🔢 Step-by-Step Median Calculation
Example 1 (Odd Count): Find median of [5, 1, 9, 3, 7]
Step 1: Sort ascending = [1, 3, 5, 7, 9]
Step 2: Count = 5 (odd)
Step 3: Middle position = (5+1)/2 = 3 → Median = 5
Example 2 (Even Count): Find median of [1, 2, 3, 4]
Step 1: Sorted = [1, 2, 3, 4]
Step 2: Count = 4 (even)
Step 3: Middle values at positions 2 and 3 → Median = (2+3)/2 = 2.5
📊 Median vs Mean vs Mode
| Measure | Definition | Best For |
|---|---|---|
| Median | Middle value | Skewed data, outliers present |
| Mean | Arithmetic average | Normally distributed data |
| Mode | Most frequent value | Categorical data, finding what's typical |
Example: Dataset [1, 2, 2, 2, 100] → Median: 2 (middle), Mean: 21.4 (average), Mode: 2 (most frequent). Each measure tells you something different!