Understanding the relationship between income inequality and residential segregation of socioeconomic groups