Ethnic background is a well recognized complementary factor in human capital accumulation process. This paper investigates how three aspects of ethnicity affect human capital formation: group's quality, size and closeness of ties. Relying on heteroskedasticity to identify parameters in the presence of endogenous regressors, I find evidence of heterogenous effects of ethnicity for men and women. The results show that women in groups characterized by close ties benefit from high-quality ethnic environment, regardless of the group's size. In contrast, among men, the group's size appears to be of importance, and men in large groups characterized by loose ties benefit the most from higher quality of the ethnic group. The results are consistent with different socialization patterns, as evidenced by the literature.