Relationship between income inequality and residential segregation of socioeconomic groups