This paper is prepared for the Handbook of the Economics of Identity; we thank the editors, George A. Akerlof and Rachel E. Kranton, for great support and comments. The views expressed herein are those of the authors and do not necessarily reflect the views of the National Bureau of Economic Research.