Contextual and compositional determinants of inequalities