One of the enduring fertility myths is that you can increase your chance of having a boy or a girl if you time sex just right. This is loosely based on scientific data. Your baby’s sex is determined by which sperm penetrates the egg: an X (female chromosome) or a Y (male chromosome). Studies have shown that Y-bearing sperm do swim a bit faster, but have a shorter life span after ejaculation. In theory, if you had sex at the time of ovulation, it would increase the chance of having a boy because the Y sperm would reach the egg the fastest, and if you had sex several days before ovulation you’d boost the chance for a female, because the female sperm will have outlived the males. However, when put to the test, these methods have failed. Other recommendations regarding your sexual position, men wearing boxers versus briefs, and timing of sex to your vaginal pH have all been scientifically tested and disproven.
Excerpt from Perfect Hormone Balance for Fertility