Causes of racial and socioeconomic differences in cognitive tests