An A/B test (/ab-test) answers «does it work?» when you could assign at random. Here, what it doesn't cover: data where assignment was NOT random, and the fact that the effect isn't the same for everyone.
A drug, 1,000 patients. Severe cases get the drug more often (the doctor decides so) and recover less, with or without the drug.
| With the drug: recover | Without the drug: recover | Difference | |
|---|---|---|---|
| Mild | 89% (111 de 125) | 84% (322 de 385) | +5.2 points |
| Severe | 40% (158 de 393) | 22% (21 de 97) | +18.6 points |
| All together | 52% (269 de 518) | 71% (343 de 482) | −19.2 points |
In each group, the drug cures more. Together, it may come out as curing less, because among the treated there are many more severe cases. Bring the confounding down to 0 (random assignment, like an A/B test) and the paradox disappears.