Does environment affect male/female ratios?
Yes it does. Going to dig up my mmj growers handbook so I can cite the source and specifics, but it's affected by humidity and temperature. Seedlings that are highly stressed tend to be males, which might explain why the prettiest un-sexed plants tend to be males due to their vigor and hardiness.(Just a personal observation.). Also, I'm sure genetics play a role Regarding male / female ratio.
I also noticed that after adding more environment controls to my "Pre-Veg" area,such as heat pad controls with temperature probes, dedicated T-5 lights and automated temperature regulating fans, not only did I have a much higher success rate of seed germination, healthier and uniform growing plants, I noticed a higher ratio of females. Also, starting them healthy from day 1, I found far more keepers and saved time and money on care for my plants and seedlings.
Give me several hours and I'll dig up that book and post a screen shot with its details. I can personally confirm it's true from experience.