Vitaliy V. answered 09/08/22
Math and Statistics Tutor with 30+ years of experience
This could be Simpson's paradox: relationship appears in several different groups but disappears or reverses when these groups are combined.
You can view the illustration below:
https://commons.wikimedia.org/wiki/File:Simpsons_paradox_-_animation.gif