When correlations mislead: restricted ranges and hidden groups
The same relationship can look weak, strong or reversed depending on who is in your sample. Learn the two traps that do this most often.
What runs in CodeSplash
- Correlation test (Pearson / Spearman / Kendall) Verified in Python and R
- Partial and semipartial correlation Verified in Python and R
- Cochran–Mantel–Haenszel test (stratified 2 × 2) Verified in Python and R
You will be able to
- Predict how restricting the range of a variable changes r
- Recognize Simpson's paradox in a table or a scatterplot
- Decide when to stratify and when to adjust
Why a test can look useless
ReadA company hires only applicants who score high on an aptitude test. Later, among those hired, test scores barely correlate with job performance. Is the test useless?
Not necessarily. Range restrictionRange restrictionSelecting a narrow slice of a variable shrinks its correlation, though the underlying relationship hasn't changed. shrinks correlations: when everyone in the sample has a similar score, there's little variation left for the score to explain.
Predict, then restrict
ExplorePredict first
Start with a correlation near across everybody, then keep only the top quarter of . What happens to r?
Reveal
It falls, often by a lot. Try it below: drag the selection window and watch r change while the relationship itself stays the same.
CExplorable · Range restriction
Why does a test seem useless among the people it was used to select?
What is the correlation among those selected?
Everyone: r = 0.62. Highlighted (300 points): r = 0.50. Corrected estimate for the full range: 0.61.
Commit your prediction above to see the result
Make your prediction to see the result.
The reverse also happens. Picking only the extremes, the very best and the very worst, inflates r.
See the reversal
ExploreEExplorable · Simpson's paradox: Berkeley admissions
Can a comparison reverse when you split the data into groups?
Overall, men were admitted more often. Within departments, who is usually admitted more often?
View
Commit your prediction above to see the result
Make your prediction to see the result.
Berkeley's 1973 admissions data is the classic case. Overall, men's odds of admission were 1.84 times women's. Department by department, the gap mostly vanished or reversed, because women applied more often to departments that rejected most applicants.
Stratify or adjust?
ReadWhen you suspect a third variable, you have two tools:
- Stratify: look at the relationship inside each group. It's transparent, but needs enough rows per group.
- Adjust: a partial correlation or a regression pools what the groups share. In
iris, sepal and petal length correlate at 0.872 overall and 0.756 within species.
For tables, the Cochran–Mantel–Haenszel test pools 2×2 tables across strata.
Which answer is right?
ReflectSimpson's paradox has no statistical fix on its own: the pooled and within-group numbers are both correct descriptions. Which one answers your question depends on why the groups differ.
If department choice happens before the admissions decision, the within-department comparison speaks to how each department decides. Think of a recent comparison of yours. What could be lurking behind it?
Check your understanding
CheckpointCheck yourself
Among students admitted to a selective college, admission-test scores barely predict first-year grades. Which is the best explanation to check first?
Show the answer
Answer: b
Selection on a variable reduces its spread, and so its correlation with other variables. The correlation among all applicants could be much larger.
Check yourself
Treatment A beats B in younger patients and in older patients, but B beats A overall. How can that be?
Show the answer
Answer: b
This is Simpson's paradox. Pooling mixes the treatment comparison with the imbalance in age.
Check yourself
Does collecting ten times as many rows fix confounding?
Show the answer
Answer: b
More rows shrink random error, not systematic bias. The interval gets narrower around the wrong value.
Check your own data
In the appPick a correlation you've reported, then add a plausible grouping column as a covariate and compare the raw and partial values on the card.
Recap
Recap- Restricting the range of a variable shrinks correlations; selecting extremes inflates them.
- Combining groups can hide or reverse a relationship.
- Stratify to see it and adjust to summarize it, but decide which number answers your question from how the data came to be.
Concepts in this lesson