Ribas et al. (2017) claim that the sex of zebrafish Danio rerio is influenced by stocking density. The authors describe a series of experiments in which four breeding pairs were reproduced, and the resulting larvae were stocked at four different densities and then raised to maturity. At the two higher densities, the percentage of males was significantly higher than 50%, and this was not the case at the two lower densities. Based on this evidence, it was suggested that higher stocking densities induce masculinization. However, offspring from each breeding pair were not represented in each density treatment (Fig. 1). Larvae from individual breeding pairs were split into two to 12 tanks, and tanks from breeding pairs were distributed unequally across treatments (Ribas et al., 2017, table 1). Liew et al. (2012) demonstrated that sex ratio in unselected zebrafish families can range from 5% to 97% male owing to genetic variation between individual broodstock, and therefore it is crucial that genetic variation be controlled in any study examining environmental effects on sex determination in zebrafish.This oversight has serious consequences for the interpretation of the authors' data. At the lowest two densities, breeding pair number one gave offspring groups with female-biased sex ratios, and breeding pair three gave male-biased offspring groups. Offspring from breeding pair one were not tested at the two higher densities, and only offspring from breeding pair three were tested at the highest density. Thus, sex ratio at the higher rearing densities was skewed towards being male-biased by genetic differences in the fish that were tested. If we examine sex ratios produced by individual breeding pairs, we see there is high variation between pairs, and it is difficult to make conclusions about any trend across treatments because pairs were not tested at all densities (Fig. 1). The appropriate experimental design would be to control for genetic variation by equally representing each breeding pair at all stocking densities.Liew et al. (2012) report the results of two experiments assessing the effects of density on sex ratio in zebrafish. In the first experiment, genetic variation was not controlled -egg batches were assigned unsystematically to different density treatments -and a statistically significant difference was found, with higher densities resulting in masculinization. However, the authors then repeated the experiment and controlled for genetic variation -embryos collected on the same day were pooled, divided and assigned equally to all three density treatments -and there was no longer a statistically significant effect of density on sex ratio. This perfectly illustrates the importance of accounting for genetic variation. Hazlerigg et al. (2012) also examined the effect of stocking density on sex ratio and did control for genetic variation by stocking larvae from the same pool of embryos in the various density treatments. That study found no relationship between the two variables. As noted by Ribas et al. (2017)...