Berkson's Paradox Visualiser

Berkson's paradox is the appearance of a spurious association after conditioning on a selection rule. Here, two Gaussian variables can look negatively correlated after conditioning on a combined threshold such as aX + bY > T. It is also a case of the explaining away effect.
selected cases rejected cases fitted line in selected sample selection boundary
Population correlation
r ≈ 0.00
Estimated from the full simulated population
Selected correlation
r ≈ 0.00
Estimated only from the blue points
Selected cases
0
0% of the simulated population

Controls

Suggested demo:
Set ρ to about 0.20. Compare X > tₓ with aX + bY > T. As you raise the threshold, the first typically stays positive in expectation, while the second can turn negative. Then try |aX + bY - T| < δ to make the trade-off especially vivid.