Lurking variables and categorical variables
The relationship between two categorical variables, X and Y, can also be strongly influenced by a third lurking variable, Z.
When the direction of the relationship reverses, the effect is called Simpson's paradox. As with other 'paradoxes', there is no real contradiction; it just takes a bit more thought to understand why your initial intuition is wrong.
College admission rates for males and females
The marginal relationship between gender and college admission is misleading. The conditional relationships for different schools are much more meaningful.
Graphical representation