Solution

Three Clinics, Three Downward Slopes

Show the problem again

Nine points $(x, y)$ come from three groups. Group 1: (0,6), (1,5), (2,4). Group 2: (2,6), (3,5), (4,4). Group 3: (4,8), (5,7), (6,6). Within each group the points lie exactly on a line of slope $-1$. What is the slope of the least-squares line fitted to all nine points pooled together? Give a reduced fraction.

Worked solution

Pooled: $\bar x = 3$, $\bar y = 17/3$. Within each group, $S_{xx} = 2$ and $S_{xy} = -2$, contributing $6$ and $-6$ in total. Between groups, the group means are $(1,5), (3,5), (5,7)$ with 3 points each: $S_{xx}^{\text{between}} = 3(4+0+4) = 24$ and $S_{xy}^{\text{between}} = 3\big((-2)(-2/3) + 0 + 2(4/3)\big) = 3(4) = 12$. Totals: $S_{xx} = 30$, $S_{xy} = 6$, slope $6/30 = 1/5$. The group effect (later groups have both higher $x$ and higher $y$) swamps the within-group trend.

Source: Simpson's paradox in regression form (ecological fallacy); data original. Statement written for AxiomIQ.