When I was breeding for 20-30 foals a season, years ago, the ratios of filly/colt for my stallions was of concern as I found it to carry through within a small percentage of change. None of my original stallions were purchased as young stock, so there was stud book backgrounds to check. There are times when a mare's PH will influence her ability to maintain live filly/colt sperm for a different period of time but, ultimately I have always felt the stallion was producing more filly/colt sperm and determined the percentage of outcome.
I did have one mare who broke all rules -- blessed are the mares -- and seemed to prefer to carry only colts. In 8 foals, different stallions 6 times, she gave me ONE filly...next to last foal. Heck, I had to keep checking that one to be SURE I was seeing things correctly!!! Bless her heart. The same mare also passed genetics for downsizing to every foal she had.
If you look at mating, growth tendancies, conformation tendancies, you will see that those can be guestimated to a fairly good amount based on past production. One of my guys, Indian Snow, felt it was his job to populate the herd with boys, apparently. 75% + were colts...one of his sons has taken pitty on me and given me 80% fillies!
Another guy I bought a few years back for conformation, bloodline, etc. is also a high filly producer. In fact, I would love a colt by him.
IMO -- the boys determine the sex, and I believe medically it's true but don't know all the reasons -- more one kind of sperm, longer lived sperm, etc, etc, or why it is that way. Maybe one of our doctors will give us the actual medical answer.