Variation in population sex ratio can be influenced by natural selection on alternate sex phenotypes as well as nonselective mechanisms, such as genetic drift and founder effects. If natural selection contributes to variation in population sex ratio, then sex ratio should covary with resource availability or herbivory. With nonselective mechanisms, sex ratio should covary with population size. We estimated sex ratio, resource availability, herbivory and size of 53 populations of gynodioecious Lobelia siphilitica. Females were more common in populations with higher annual temperatures, lower soil moisture and lower predation on female fruits, consistent with sex-specific selection. Females were also more common in small populations, consistent with drift, inbreeding or founder effects. However, small populations occurred in areas with higher temperatures than large populations, suggesting that female frequencies in small populations could be caused by sex-specific selection. Both selective and nonselective mechanisms likely affect sex ratio variation in this gynodioecious species.