Science and technology are upending how we learn. We separate the science from the snake oil and look at how parents, teachers, and policymakers respond.

In a recent standardized science test given to 15-year-olds in 72 countries, there was almost no gap in the scores between boys and girls. The latest Programme for International Student Assessment (PISA), a test administered by the OECD every three years to more than half a million students, found that boys scored 4 points, or less than 1%, better than girls in science. In the assessment, in 2015, boys outperformed girls in 24 places, with the biggest gaps in Austria, Costa Rica, and Italy. Girls outperformed boys in 22, with Finland, Qatar and Jordan among those with the biggest gaps favoring girls.

But the OECD find one notable difference between the sexes: in every single country tested, girls had much higher levels of schoolwork- and test-related anxiety than boys. On average across OECD countries, girls were about 13 percentage points more likely than boys to report they get very tense when they study. Girls were also 17 percentage points more likely to feel “very anxious” ahead of a test, even if they were well prepared.

The OECD offers a few possible explanations. Girls could be less confident than boys and as a result they worry more before tests. Subjects like mathematics and science could pose what psychologists call a “stereotype threat,” the OECD says, with the feeling that poor performance will confirm negative assumptions about a group producing excess stress. Another option is that boys underreport their anxiety due to social norms around appearing confident and strong.

A closer look

Women make up 48% of the US workforce, but only comprise 24% of workers in science, technology, engineering, and mathematics—the so-called STEM fields. The small difference in science-test performance among teenagers can’t explain the much larger difference in workplace outcomes. McKinsey applied machine learning to the OECD’s extensive PISA dataset to try and pick apart what factors most affect how students learn, and found that the test-anxiety gap might go a long way in explaining why there are so few women in high-paying STEM jobs.

To figure out what factors drive high PISA science scores, McKinsey examined the 100 most predictive variables of performance (out of more than 1,000). It then grouped them into four categories: home environment, school resources, teachers and teaching, and mindsets. Mindsets, it found, have double the effect on test outcomes than factors related to students’ socioeconomic backgrounds.

The consultants found that it wasn’t motivation—the desire to get good grades—that most influenced test scores, but “motivation calibration,” or the ability to know what motivation looks like in real life. In practice, this could mean knowing that those who do best study more, go beyond what is asked of them, and work to perfection. Students with high levels of motivation calibration outperformed those without it by 12-15%. Kids who had a “growth mindset,” believing that their performance is related to their efforts and not to innate or genetic abilities, outperformed those who believe in raw ability by 9-17%.

Researchers think that anxiety cancels out motivation, ultimately affecting the choices girls make later in life.

Here’s where the STEM twist comes in. Girls are slightly more likely to have strong motivation calibration than boys, and to think that their work in science class will be useful in the future. But remember that they also have higher levels of test anxiety. The authors think that the anxiety cancels out the motivation, ultimately affecting “the choices they make later in life.”

Emma Dorn, a practice manager for the education group at McKinsey, said these findings should help inform how schools teach STEM subjects. “This suggests that mindset interventions around reducing school-work related anxiety, and around increasing joy in science might help more girls persist into STEM careers.”

Another large study, published in Plos One this week, underscores these findings. Researchers from Stanford and the University of Minnesota examined test results from 10 large introductory college biology courses from the fall of 2016, including more than 1,500 students. Women underperformed men on the exam, and also reported higher levels of test anxiety. The researchers found that regardless of academic standing, test anxiety negatively impacted women’s exam performance, while interest in topics related to the science course improved exam scores. Find ways to reduce test anxiety and make science course material interesting, and that gap may shrink, the authors suggest.

Beyond science to math

The findings extend beyond science. Jo Boaler, a professor of math education at Stanford and author of the book “Mathematical Mindsets,” said the story is similar with math: anxiety is worse among girls. And like science, it is not based on ability, but rather the messages girls receive from a very young age. “A large part of anxiety rests upon this idea that you’re a math or a science person or you are not,” she said. “Girls get more anxious than boys because of that myth that math is for boys is so strong.”

“A large part of anxiety rests upon this idea that you’re a math or a science person or you are not.”

The erroneous stereotype that math is for boys, combined with this so-called “fixed” mindset—believing that you have it or you don’t, rather than believing you can work at it and improve—negatively affects performance, she says. “We know that when you are anxious, it impedes working memory,” said Boaler. Since working memory is the “search engine of the brain”, it is useful to have it fully engaged in a test-taking environment.

And it goes beyond performance, says Mario Piacentini, an analyst and lead author of the PISA report on well-being. “We also observe a strong negative correlation between schoolwork-related anxiety and indicators of well-being: higher levels of worry and stress about exams and schoolwork could thus be one reason why girls in most countries report a lower satisfaction with their life then boys.”

Parents and teachers play a critical role here. Elementary school teachers, who are likely to be women, are often themselves anxious about math. Research shows that they transmit this message, which girls absorb more, Boaler said. Parents who are anxious about math can also transmit their anxiety to children.

“The message to all kids, girls and boys, is there’s no such thing as a math or a science person,” Boaler said. She co-founded of Youcubed, a website dedicated to changing how math is taught to all children to make it more engaging and creative.

It’s a message that has to start early. According to the OECD, in 2014 women accounted for less than 20% of computer science graduates in OECD countries and only around 17% of engineering graduates. Kids decide early: in those countries, 15-year-old boys are, on average, more than twice as likely as girls to expect to work as engineers, scientists, or architects.