At the level of math or science PhD’s, the differences can be explained away by a tiny stretching of the Normal curve for males, compared to that for females. A tiny fraction more males than females have very high math abilities — comparable to the larger proportion of males who have very low abilities. (Or, so the hypothesis goes.)
At the level of ordinary undergraduate math and science, men and women are, for all practicle purposes, equally able. IMHO, the differences are probably due to social factors. Math and science is a tough grind, and the course work tends to be largely a solitary effort. Hence the stereotypical math geek. Women tend to gravitate toward courses that allow more social interaction. Also, there is still some legacy of the “Mrs.” degree — where women enrolled in “finishing school” courses like art appreciation, rather than grind courses like physics.
Women, who want to study math or science — and who are prepared for the grind — should not hesitate to do so. They're as capable as almost all men in that regard.
There is still some question as to whether women are as capable at the advanced PhD level of science or math. Larry Summers, quondam President of Harvard, got pilloried for simply suggesting that some more research might be required on this subject — so, don't hold your breath waiting for the actual research to be done and published. Regardless — almost all of us men are not capable of such advanced math or science work either.
It may be only blatantly obvious at the extreme...but it's pretty substantial within several sub-areas of math...like geometry...not far past the median. ...Like the spacial manipulation capabilities of which the 50th percentile male is equivalent to the 90th percentile female.