A mother in good condition gives her offspring a good start in life, increasing the chances of her sons’ winning harems as they mature. A mother in poor condition is likely to produce a feeble son who will fail to mate at all, whereas her daughters can join harems and reproduce even when not in top condition. So you should have sons if you have reason to think they will do well and daughters if you have reason to think they will do poorly—relative to others in the population.