In the labor market, statistical discrimination occurs when employers' beliefs about workers' behavior induce different groups of workers to invest at different rates in their education. Thus, even though groups may be identical ex-ante, the beliefs of the employers are self-fulfilling. Theoretically and in an experiment, we investigate under what circumstances statistical discrimination occurs. We confirm the experimental results of Fryer, Goeree and Holt (2005) who do not find systematic evidence for statistical discrimination in the standard no-competition setup of Coate and Loury (1993). When we introduce competition between workers of different groups, the non-discrimination equilibrium ceases to be stable. In line with this theoretical observation, we find systematic discrimination in the experimental treatment with competition. Nevertheless, a substantial minority of the employers refuses to discriminate even when it is in their best interest to do so. A refined model that allows a fraction of the employers to remain color blind organizes the main patterns in the data.