Data Visualizationmedium
0:00.0

A scatter plot of employee salaries vs. years of experience shows a negative overall correlation (r=0.40r = -0.40). However, when data points are color-coded by department, Department A shows a positive correlation (r=0.75r = 0.75) and Department B shows a positive correlation (r=0.80r = 0.80). What mathematical condition in the data allows this Simpson's Paradox to occur?