We investigate the sources of differences in school performance between students of different races by focusing on identity issues. We find that having a higher percentage of same-race friends has a positive effect of white teenagers' test score while having a negative effect on blacks' test scores. However, the higher the education level of a black teenager's parent, the lower this negative effect, while for whites, it is the reverse. It is thus the combination of the choice of friends (which is a measure of own identity) and the parent's education that are responsible for the difference in education attainment between students of different races but also between students of the same race. One interesting aspects of this paper is to provide a theoretical model that grounds the instrumental variable approach used in the empirical analysis to deal with endogeneity issues.