Mathwords logoMathwords

Median-Median Line — Definition, Formula & Example

The median-median line is a line of best fit built from medians instead of means. Because it uses medians, a few extreme data points pull it much less than they pull a least-squares regression line.

Sort nn data points by xx and split them into three groups of nearly equal size. If n=3k+1n = 3k+1, the middle group gets the extra point. If n=3k+2n = 3k+2, each outer group gets one extra point. In each group, take the median of the xx-values and, separately, the median of the yy-values. This gives three summary points (xL,yL)(x_L, y_L), (xM,yM)(x_M, y_M), (xR,yR)(x_R, y_R). The median-median line has the slope of the segment from the left to the right summary point. Its yy-intercept is the mean of the intercepts of the three parallel lines with that slope through the three summary points.

Key Formula

m=yR−yLxR−xL,b=(yL−mxL)+(yM−mxM)+(yR−mxR)3m = \frac{y_R - y_L}{x_R - x_L}, \qquad b = \frac{(y_L - m x_L) + (y_M - m x_M) + (y_R - m x_R)}{3}
Where:
  • (xL,yL)(x_L, y_L) = Summary point of the left group (smallest x-values): median x, median y
  • (xM,yM)(x_M, y_M) = Summary point of the middle group
  • (xR,yR)(x_R, y_R) = Summary point of the right group (largest x-values)
  • mm = Slope of the median-median line
  • bb = y-intercept of the median-median line, so the line is y = mx + b

Worked Example

Problem: A shop's weekly sales (in hundreds of dollars) for weeks 1 through 9 are (1, 2), (2, 5), (3, 3), (4, 10), (5, 12), (6, 13), (7, 14), (8, 16), (9, 15). Find the median-median line.
Step 1: The points are already sorted by x. Nine points split into three groups of 3. Find the median x and the median y in each group. The left group has y-values 2, 5, 3. The middle group has 10, 12, 13. The right group has 14, 16, 15.
L=(2,3),M=(5,12),R=(8,15)L = (2, 3), \quad M = (5, 12), \quad R = (8, 15)
Step 2: Compute the slope using the left and right summary points.
m=15−38−2=126=2m = \frac{15 - 3}{8 - 2} = \frac{12}{6} = 2
Step 3: Find the intercept through each summary point with slope 2, then average the three intercepts.
b=(3−4)+(12−10)+(15−16)3=−1+2−13=0b = \frac{(3 - 4) + (12 - 10) + (15 - 16)}{3} = \frac{-1 + 2 - 1}{3} = 0
Answer: The median-median line is y=2xy = 2x. It predicts sales of 2(7)=142(7) = 14 hundred dollars ($1,400) in week 7, matching the recorded value. Predicting beyond week 9 would be extrapolation, and sales are leveling off (16, then 15), so a straight line would likely overestimate them.

Why It Matters

Some Algebra 1 and statistics courses teach this method because it is easy to compute by hand, using medians instead of squared residuals, and outliers affect it less than a least-squares line. TI-83/84 calculators include it as Med-Med in the STAT CALC menu. It is a good choice when a scatter plot has an outlier that would tilt a least-squares line.

Common Mistakes

Mistake: Picking the middle data point of a group as its summary point, so the summary point is always an actual data point.
Correction: Find the median of the x-values and the median of the y-values separately. In the example, the left group's points are (1, 2), (2, 5), (3, 3), but the summary point is (2, 3), which is not one of the data points.

Related Terms