“You know what those people are like.” When we think about people outside our group, we often reduce them to essentials: They are like this, we think, always have been, always will be. A recent study of such stereotypes shows just how wrong this can be.

The research concerns the central question of game theory, which is broadly defined as the study of decision-making in human societies: Should I cooperate with this person?

If...