This led to medical experiments in which newborn and infant boys were surgically reassigned into girls after accidents such as botched circumcisions. Socialization theories, which were dominant in the 1900s, favored the idea that children were born "undifferentiated" and were socialized into gender roles and sexual orientation. This effect is estimated to account for between 15 and 29% of gay men, while other gay and bisexual men are thought to owe sexual orientation to genetic and hormonal interactions. Michael Bailey has described maternal immune responses as "causal" of male homosexuality. Biochemical evidence to support this effect was confirmed in a lab study in 2017, finding that mothers with a gay son, particularly those with older brothers, had heightened levels of antibodies to the NLGN4Y Y-protein than mothers with heterosexual sons. The more sons a mother has will increase the levels of these antibodies, thus creating the observed fraternal birth order effect. These antibodies are then released on future male foetuses and may neutralize Y-linked antigens, which play a role in brain masculinization, leaving areas of the brain responsible for sexual attraction in the female-typical position, or attracted to men. In response, she develops antibodies to neutralize them. During pregnancy, male cells enter a mother's bloodstream, which are foreign to her immune system. Research since the 1990s has demonstrated that the more male sons a woman has, there is a higher chance of later born sons being gay. Maternal immune responses during fetal development are strongly demonstrated as causing male homosexuality and bisexuality. While direct effects are hard to measure for ethical reasons, animal experiments where scientists manipulate exposure to sex hormones during gestation can also induce lifelong male-typical behavior and mounting in female animals, and female-typical behavior in male animals. Lesbians on average, have significantly more masculine digit ratios, a finding which has been replicated numerous times in studies cross-culturally. Supporting this are studies of the finger digit ratio of the right hand, which is a robust marker of prenatal testosterone exposure. In women, it is hypothesized that high levels of exposure to testosterone in key regions may increase likelihood of same sex attraction.
It has been hypothesized that gay men may have been exposed to little testosterone in key regions of the brain, or had different levels of receptivity to its masculinizing effects, or experienced fluctuations at critical times. This masculinizing effect pushes males towards male typical brain structures, and most of the time, attraction to females. The presence of the Y-chromosome in males prompts the development of testes, which release testosterone, the primary androgen receptor-activating hormone, to masculinize the fetus and fetal brain.
In simple terms, the developing fetal brain begins in a "female" typical state. The influence of hormones on the developing fetus has been the most influential causal hypothesis of the development of sexual orientation. Main article: Prenatal hormones and sexual orientation