S, selection (that is participation in the study); X, trait; Gx, genotype causing X. The assumed causal paths are shown in blue, and the induced correlations are shown in red. Three scenarios exist in which sex can become heritable due to selection. a, Sex causes X which in turn causes selection. b, X and sex influence the selection independently. c, The effect of X on selection is different between the two sexes. This is the scenario discussed in the paper. We have run simulations (Supplementary Fig. 3) and scenarios a and b are less likely to be observed because the effect of the trait on selection would need to be extremely large.