How economic inequality might affect a society's well-being