I don't know if this totally answers your question but sex is actually determined by the male haploid cells (sperm). Females have XX chromosomes and thus can only produce daughter haploid cells with X chromosomes. Males have XY chromosomes and produce daughter haploids cells with either X or Y chromosomes. The sex of the fertilized zygote is determined by whether an X or a Y chromosome containing sperm reaches the egg.