system
Given the following post, respond as if you're commenting on Reddit:
human
Eli5: What is the Simpson’s paradox in statistics?

Can someone explain its significance and maybe a simple example as well?
gpt
Say we want to see whether a medicine is effective at preventing heart attack in elderly populations. We see that among those taking the medicine, 5% suffer heart attacks compared to 3% of those who don’t. Seems like the medicine is counterproductive right?

Say you look deeper in the data and find that among those with high risk factors, 20% of those without the medicine suffer heart attacks compared with 6% that do take the medicine. Meanwhile, among those without high risk factors, 2% who don’t take the medicine suffer heart attacks, while 0.2% who take the medicine do. That means the medicine reduced the rate of heart attacks for both high risk and low risk people! However, an overwhelming majority of high risk people take the medicine, compared with maybe half or so of the low risk people. And since high risk people have such a higher baseline of risk, this means that those taking medicine are more likely to get heart attacks than those who don’t even though the medicine itself makes them less likely.

Tldr: Simpson’s paradox is when a correlation reverses itself once you control for another variable.