In various species of reef fishes called wrasses, sex reversal is associated with age and size. For example, the Caribbean bluehead wrasse is a protogynous species in which only the largest (usually oldest) individuals change from female to male. These fish live in harems consisting of a single male and several females.
If the male dies or is removed in experiments, the largest female in the harem changes sex and becomes the new male. Within a week, the transformed individual is producing sperm instead of eggs.
In this species, the male defends the harem against intruders, and thus larger size may give a greater reproductive advantage to males than it does to females.
Excerpt from my Biology text.