Ecological fallacy
Simpson's paradox

A striking ecological fallacy is Simpson's paradox: the fact that when comparing two populations divided into groups, the average of some variable in the first population can be higher in every group and yet lower in the total population. Formally, when each value of Z refers to a different group and X refers to some treatment, it can happen that

When E − E {\displaystyle E-E} does not depend on Z {\displaystyle Z}, the Simpson's paradox is exactly the omitted variable bias for the regression of Y on X where the regressor X {\displaystyle X} is a dummy variable and the omitted variable Z {\displaystyle Z} is a categorical variable defining groups for each value it takes. The application is striking because the bias is high enough that parameters have opposite signs.
punctuation:no_comma