Watch an aggregate trend reverse while both subgroup trends stay positive.
Imagine two subgroups. Within each subgroup, higher X is associated with higher Y. Now suppose the subgroup with generally higher Y becomes concentrated at the low end of X, while the subgroup with generally lower Y becomes concentrated at the high end.
1a. What do you predict will happen to the correlation if you ignore subgroup membership and pool everybody together?
1b. What do you predict will happen to the two within-group slopes?
The slider changes how unevenly the two groups occupy the X-range. It does not change either group's internal relationship between X and Y.
Keep the view on Aggregate only. Record the pooled relationship at the listed slider positions.
| Imbalance | Pooled r | Pooled slope | Direction |
|---|---|---|---|
| 0% | |||
| 25% | |||
| 50% | |||
| 75% | |||
| 100% |
Q1. At approximately what imbalance did the aggregate line stop being positive and begin pointing downward?
Q2. Did any individual point suddenly switch from a positive to a negative within-group mechanism at the reversal? What actually changed?
Set the slider to 100%, then click Reveal subgroups. Colored regression lines now show the relationship within Group A and Group B.
Q3. Compare the black pooled line with the two colored within-group lines. Describe the paradox without using the phrase “the statistics are wrong.”
Q4. The within-group slopes stay at about +0.90 throughout the slider. Why can the pooled slope become negative anyway?
Q5. Which variable is acting like the lurking variable here?
The aggregate line answers: Across everybody, what happens to Y as X changes?
The colored lines answer: Among people in the same subgroup, what happens to Y as X changes?
Those are different questions. Simpson's paradox matters because researchers often intend one question and accidentally analyze the other.
Q6. Suppose Group A and Group B were two clinics with different patient severity. Give one research question for which the pooled answer might be useful and a different question for which the within-clinic answer would be more relevant.
Q7. Why is “always use the subgroup result” also too simple as a rule?
The book's real example uses UCBAdmissions, built into R. Run the code first. It computes the overall admission rates, then the admission rate within each department.
data(UCBAdmissions) # Overall admission rates by gender overall <- prop.table( margin.table(UCBAdmissions, c(1, 2)), 2 )["Admitted", ] round(overall, 3) # Admission rates within each department by_dept <- apply( UCBAdmissions, 3, function(tab) prop.table(tab, 2)["Admitted", ] ) round(by_dept, 3) # How applicants were distributed across departments margin.table(UCBAdmissions, c(3, 2))
Overall admitted:
Male Female
0.445 0.304
Within department:
Dept
Gender A B C D E F
Male .621 .630 .369 .331 .277 .059
Female .824 .680 .341 .349 .239 .070
Applications by department (Male / Female):
A 825 / 108
B 560 / 25
C 325 / 593
D 417 / 375
E 191 / 393
F 373 / 341
Q8. In how many departments is the female admission rate equal to or higher than the male admission rate? How does that compare with the aggregate rates?
Q9. Which departments attracted disproportionately more female applicants, and how do their admission rates compare with Departments A and B?
Q10. Map the Berkeley example onto the simulator: what corresponds to X, Y, and the subgroup/lurking variable?
Q11. Re-read your Step 1 predictions. What did you get right, and what part of the reversal was less intuitive than you expected?
Q12. Complete this sentence: “Before trusting an aggregate relationship, I should ask ___.”
Filename: simpsons-paradox-slider_lastname1_lastname2.pdf