I found a piece from two years ago on the notoriously far right, alt-right Public Broadcasting Service website entitled Column: Why the STEM gender gap is overblown by Denise Cummins, a research psychologist.
She begins by noting that men don’t outnumber women in all areas of STEM, and she provides this graph:
(Click to embiggen.)
She then goes on:
At the Ph.D. level, women have clearly achieved equity in the biosciences and social sciences, are nearly there (40 percent) in mathematics and the physical sciences, and are “over-represented” in psychology (78 percent). Again, the only fields in which men greatly outnumber women are computer science and engineering….
When we look at the actual workforce, we see the same pattern. Women are as likely as men to be biological scientists, medical scientists and chemists. They are much less likely than men to be computer scientists, but have achieved equity in three out of five areas, with computer science and geoscience being exceptions.
She then goes on to note that the genders have different innate preferences, on average, that affect the rate at which men and women go into different fields. She links to a paper entitled Sex differences in human neonatal social perception. Here’s the abstract to that paper:
Sexual dimorphism in sociability has been documented in humans. The present study aimed to ascertain whether the sexual dimorphism is a result of biological or socio-cultural differences between the two sexes. 102 human neonates, who by definition have not yet been influenced by social and cultural factors, were tested to see if there was a difference in looking time at a face (social object) and a mobile (physical-mechanical object). Results showed that the male infants showed a stronger interest in the physical-mechanical mobile while the female infants showed a stronger interest in the face. The results of this research clearly demonstrate that sex differences are in part biological in origin.
Not linked to in Cummins’ piece, but making a similar point is Sex Differences in Infants’ Visual Interest in Toys:
Evidence indicating that sex-linked toy preferences exist in two nonhuman primate species support the hypothesis that developmental sex differences such as those observed in children’s object preferences are shaped in part by inborn factors. If so, then preferences for sex-linked toys may emerge in children before any self-awareness of gender identity and gender–congruent behavior. In order to test this hypothesis, interest in a doll and a toy truck was measured in 30 infants ranging in age from 3 to 8 months using eye tracking technology that provides precise indicators of visual attention. Consistent with primary hypothesis, sex differences in visual interest in sex-linked toys were found, such that girls showed a visual preference (d[1.0) for the doll over the toy truck and boys compared to girls showed a greater number of visual fixations on the truck (d = .78). Our findings suggest that the conceptual categories of ‘‘masculine’’ and ‘‘feminine’’ toys are preceded by sex differences in the preferences for perceptual features associated with such objects. The existence of these innate preferences for object features coupled with well-documented social influences may explain why toy preferences are one of the earliest known manifestations of sex-linked social behavior.
Cummins also notes more evidence that gender differences in preferences are innate, linking to a paper entitled Sex differences in rhesus monkey toy preferences parallel those of children.
Anyway, this would seem to suggest that men and women, on average, have different interests and seek out different fields of study when given a choice. Perhaps the relative paucity of women in programming (brought to the fore by the James Damore Google memo) is because they do have a choice and prefer to work in other fields. That would suggest an obvious way to achieve gender parity in computer science and every other area of human endeavor: randomly assign everyone to one or another field and punish them severely if they deviate from it. I leave the consequences to the reader as an exercise.