A 'This week in Science' section of Science Magazine points to the work of Efferson et al. :
In human social interactions, it is not uncommon to draw inferences about hidden characteristics (attitudes, beliefs, or behavioral norms) on the basis of observable markers that may bear no fundamental connection to the underlying quantity but have become associated with specific groups over time. For instance, individuals sporting insignia of the Boston Red Sox or Manchester United may be classified as friends (or foes, if one should happen to be a New York Yankees or Chelsea fan). Although much research has been devoted to how a member of one cultural or ethnic group views other in-group and out-group members, less is known about the process by which symbolic markers come to be used as signals to define group membership. Efferson et al. have designed a laboratory-based economic game in which subjects were free to associate arbitrary markers with varying payoffs. Cultural groups (those in which members had adopted the same marker) and consequent ingroup favoritism developed only when the marker was both predictive of behavior in the game as well as changeable over time.The abstract from Efferson et al.:
Cultural boundaries have often been the basis for discrimination, nationalism, religious wars, and genocide. Little is known, however, about how cultural groups form or the evolutionary forces behind group affiliation and ingroup favoritism. Hence, we examine these forces experimentally and show that arbitrary symbolic markers, though initially meaningless, evolve to play a key role in cultural group formation and ingroup favoritism because they enable a population of heterogeneous individuals to solve important coordination problems. This process requires that individuals differ in some critical but unobservable way and that their markers be freely and flexibly chosen. If these conditions are met, markers become accurate predictors of behavior. The resulting social environment includes strong incentives to bias interactions toward others with the same marker, and subjects accordingly show strong ingroup favoritism. When markers do not acquire meaning as accurate predictors of behavior, players show a markedly reduced taste for ingroup favoritism. Our results support the prominent evolutionary hypothesis that cultural processes can reshape the selective pressures facing individuals and so favor the evolution of behavioral traits not previously advantaged.