Something that you've probably known intuitively for years is finally official: mothers of daughters are different to mothers of sons, and we produce the sex of children we're most suited to bring up.

Traditional perception is that the sex of your baby is pure toss-of-the-coin chance, but ten years ago, Dr Valerie Grant, a reproductive scientist at the University of Auckland, came up with the theory that dominant women have high levels of testosterone (often considered the male sex hormone) and are much more likely to give birth to boys.

A small group of researchers, from anthropologists to evolutionary biologists, have known for years that something other than chance affects the human sex ratio which, rather than remaining at a constant 50:50 male to female, is prone to fluctuations; during both World Wars, for example, there was an increase in the number of male births. Grant, who has a PhD in psychology, was the first to suggest that it was down to the character of the mother. "Scientists already knew that mothers behave differently towards their babies according to their sex [mothers of boys are more initiating, mothers of girls more responsive], but the conclusion was that this was because of the strength of sex stereotyping. I'd say there was evidence that the mothers were behaving in ways that were natural to them."

Having three sons herself, Grant became fascinated with the subject 40 years ago, when she found that she could tell in advance which sex of child her friends were likely to have. The link between female dominance and sex of offspring had already been documented in mammals such as deer but Grant came up with the Simple Adjective Test, which asked women how often they felt proud, vigorous, rejected, selfsatisfied, fearful and so on and, at the same time, measured their blood for testosterone. She found that women who are confident, assertive, influential and with a strong sense of self have high levels of testosterone (you normally know one when you've met one) and produce sons, whereas mothers of daughters tend to be more nurturing, empathic and tolerant and have lower testosterone.

Although the research was widely published in respected scientific journals, Grant admits that even after six separate studies over 20 years, the theory is still considered controversial and has only recently become an accepted academic subject. "Most people don't even know that women even have testosterone," she says.

She has found that those who most dislike the theory tend to be men and mothers of daughters. "Because assertiveness is now very valued among Western women, a lot of people don't like being told that they haven't got it and will impose value judgments, such as superiority, on these characteristics" she says. "More respectful characteristics, typical of mothers of daughters, are highly valued in other cultures, such as those of China, where assertiveness in women is not necessarily a good thing." And, she agrees, in most cultures there is a still a certain patriarchal pride in having sons.

The people most enthusiastic about the theory tend to be women who have noted similar differences among their own friends. I love it because it explains why the ratio of sons to daughters among my female hockey-playing friends is the statistically improbable 34:2 - testosterone and competitive team sports, Grant says, go hand in hand.

"It's also quite likely that if you have one-sex children, your closest friends will have the same. Not only are you similar people, but you'll probably feel more comfortable with their parenting style." Which certainly rings true for anyone who has felt criticised for the way their children behave; you can bet it comes from someone with the other sex.

Grant has new research published this month which, she says, puts her theory on a firmer footing and yet again turns reproductive biology on its head. What she has come up with is a mechanism that has proved (albeit in cows, which sounds odd but is considered an acceptable model) that levels of testosterone in the follicles (which produce the egg) reliably predict the sex of the embryo and, more startling, that the egg may well come out already adapted to receive an X or Y chromosome-bearing sperm. In lay terms this means that the female has already "decided" which sex offspring to have before sperm get involved.

Anecdotally, it is always going to be easy to dismiss Grant's theory by coming up with someone who does not fit the mould. That is because most women can produce both-sex children. If you draw a normal distribution curve of testosterone, most women will fall in the middle; they have a medium amount and fluctuate from side to side across a middle line month to month, perhaps producing an egg adapted to an X chromosome one cycle, a Y chromosome the next. In women, testosterone is also very influenced by external stresses - on a grand scale, war, but also smaller stresses such as a death in family or changing jobs. But, Grant asserts, there are some women at either extremes of the line, still within a normal range, with high or low levels who will always have boys or always have girls - roughly 68 per cent in the middle, and 16 per cent at either end. Grant says that before contraception was widely used, she saw families with 12 or 13 children of the same sex. "I would still never say 'never' to these women, though," she admits. "Testosterone dips with age. You could have six boys in a row and suddenly produce a girl in your forties".

Because of her expertise, Grant receives e-mails from people asking her how they can produce a boy or a girl, having had three or four of the opposite sex. She is firmly opposed to family balancing. "If women conceive the sex of infant that they are most suited to raise, I would be very against manipulating the sex of the child," she says. "I always say 'Please try to be content with what you've got - consider yourself a specialist at that sex, be proud of that and don't yearn for the other'.

"I think that, deep down, women know this; it is their husbands who are pushing for the other sex or, as in China and India, it is because of cultural pressures." She also says that nature does a brilliant balancing act to ensure that we don't one sex dominating get too much. Research has indicated that dominant men do not usually go for dominant women. "It tends to be artistic, scholarly men who like dominant women and have sons. It's something about liking their energy".

There are plenty of websites offering advice on how to conceive a boy or a girl, with tips on diet, the type of underwear to wear(loose for a boy apparently) and when, and in what position, to have sex.

Grant is not impressed: "Thirty or forty years ago, people came up with the timing of intercourse theory, that male, Y-chromosome bearing sperm, swim faster than X, so if you had sex close to ovulation, you would have a boy. It was all good fun for a while, but there are a lot of flaws and it's unlikely to be very helpful." Her research does not just undermine a few old wives' tales, it could also have serious ramifications for fertility treatment.

"It could be that the low success rate of certain forms of assisted fertilisation, particularly ICSI [intracytoplasmic sperm injection], whereby sperm is injected directly into the egg, can be explained because some of the time the wrong chromosome-bearing sperm is injected into an egg already adapted to receive the other type. It could even be that the uterus is adapted to receive an embryo of a particular sex."

Presumably, that also means that there are also couples undergoing IVF who get the "wrong"-sex baby than the one they are best suited to raise. Grant thinks that in such cases human nature is flexible enough to adapt. "Most people could bring up a baby of either sex. It would be important only at the extremes. When it might be problematic is when parents adopt a child to achieve family balance -ie, they already have two sons, and adopt a daughter. I'm not saying that this would be a huge problem; perhaps it would simply be a mismatch between parental style and child characteristics."

Grant admits that it is strong stuff. "I'm a scientist; if I find out farther down the line that my research doesn't add up, I'll be the first to retract it. But my current evidence supports what I'm saying".

Now in her sixties, she has spent her working life on this theory, even though it never did her career any good. "However difficult the work got, I could never quite give it up, I'm entranced by it. It's such a relief to see my latest research published. I thought I might die without seeing it through."