STENDHAL once wrote that all geniuses who were born women were lost to the public good. At least in the rich world, that wasteful truth has been triumphantly overcome. More than half of new graduates in the OECD club of mostly rich countries are now female. In several the share is around 60%. Former male redoubts such as medicine and law have increasingly been captured by women. Indeed, elite American colleges are widely suspected of admitting male applicants with lower grades, to even up the numbers. Yet despite this monumental advance, prejudices continue to hamper girls—and boys, too. Happily, neutralising them, at least within schools, should be much easier than reversing centuries of patriarchy.

Educational results still seem to support the old idea that male and female intellectual capabilities differ. An analysis by the OECD of PISA tests for 15-year-olds in 60-odd countries turns up some eerily similar patterns. Girls trounce boys in literacy, but boys do better in mathematics. Boys do less homework and are more likely to fail in all subjects. The courses that both sexes choose at university mirror their earlier strengths at school. Women dominate in education, health, arts and humanities; men lead in computing, engineering and physics (see article).

All this might suggest that intellectual differences are hard-wired, with women abler and more assiduous, but men better at the exact sciences. A closer look at the data reveals a new version of Stendhal’s lament: that much ability, both male and female, is wasted because of tenacious stereotypes.

One startling fact uncovered by the OECD number-crunchers is that, when teachers mark a reading test without knowing who took it, the gender gap shrinks by a third. Most of the world’s teachers are now women, who find it easier to spot ability when it appears in their own likeness. They give better marks, perhaps unconsciously, to the punctual, orderly and neat: fine qualities that society associates with girls, but which are not the same as reading and understanding a text. Poor grades damage motivation and mean that pupils are put in lower ability groups, so that biased assessments turn into self-fulfilling prophecies. Falling behind in literacy, as boys disproportionately do, is particularly worrying, since reading is needed to learn anything else. The solution is simple: whenever possible, school tests should be made anonymous.

INTERACTIVE: The glass-ceiling index - the best and worse places in the world to be a working woman Sometimes it makes sense to go with the grain. Young boys are more likely to read when the topic is zombies or superheroes; older ones prefer newspapers or comic books. So make them all available. More often stereotypes get in the way: if girls believe they cannot do sums and boys think that books are sissy, neither will do as well as they could. Pupils live down to low expectations or pick up subtle cues about gender differences. In maths, for instance, when female teenagers are asked how confident they feel about solving an abstract equation, they rate their chances almost as highly as boys. But when the question involves calculating a car’s fuel efficiency, many balk.

Easy on the carburettors

The most encouraging finding is that gender gaps can be narrowed as attainment rises across the board. Even more important than rooting out hidden bias is improving education for all. Boys in countries with the best schools read better than girls elsewhere. In Shanghai hardly any youngsters, of either sex, fail in everything, and girls are almost as good at maths as their male classmates—and far ahead of boys elsewhere. Had there been a Mrs Stendhal, she would have smiled.