Group sex ratio and sex reversal