compute inequality