The notion that intellectual ability in men has a greater variability — that the most brilliant and the most deficient brains are found in men — first arose in 1894 to explain why there were more men in mental hospitals and fewer women geniuses. It has been discredited by empirical studies, most recently in June, by Janet Hyde and Janet Mertz of the University of Wisconsin, who showed that in some countries there is no difference between men and women at the highest level. Where a difference remains, it is shrinking and correlated with gender inequality, suggesting that cultural, rather than intrinsic, factors are at play.

But stereotypes run deep. At a presentation to high school girls a few years ago, Gigliola Staffilani, a professor of mathematics at the Massachusetts Institute of Technology, was asked whether for a woman being smart “makes it hard to date.” Mathematics departments in several universities lament a drop in the number of female applicants. At M.I.T., for example, the share of women applicants to the mathematics graduate program has declined to 13 percent this year from about 17 percent in previous years, Ms. Staffilani said. (But the quality of their applications was so strong, she added, that they will make up 22 percent of the student intake.)

The lack of women role models worries her. It reinforces a view that for girls, well, math class is tough.

Often, conditioning starts early. Blanca Treviño, a Mexican computer scientist and chief executive officer of Softtek, the largest private information-technology service provider in Latin America, recalls that the kindergarten teacher would call her to complain about her daughter, who was playing with a calculator instead of with dolls.

“The lady told me that my daughter was making up stories, saying that her mother had an office and an assistant,” Ms. Treviño said. “The idea that this could be true did not occur to her.”

In India, women scientists have complained that even in science textbooks women are depicted in traditional roles. And in the United States, some psychologists say that the surge in computer games marketed to boys is one explanation for the widening gap in computer sciences since the 1980s.

“There should be a concerted effort to undo these continuing stereotyped expectations,” said Lotte Bailyn, a professor at M.I.T.’s Sloan School of Management, who studied the phenomenon. “We need more TV shows with women forensic and other scientists. We need female doctor and scientist dolls.”