The U.S. has a pressing need to increase the number of well-educated graduates in science, technology, engineering and math, pretty much everyone agrees. Jeb Bush contends that we're not producing "anything approaching the numbers we need to sustain and grow our economy, much less to maintain our leadership in global technology." President Barack Obama says that "we've got a whole bunch of talent" being wasted because we're not getting enough girls interested in these fields.But why, exactly, aren't more girls focusing on math and science?It's a persistent question and, over the years, many people have answered it by suggesting that girls are simply less interested. Others have said boys have more talent; maybe their spatial skills are better (perhaps for evolutionary reasons) and that gives them higher aptitude in math. Still others suggest that boys and girls respond differently in competitive situations and that, in math and science, high levels of competition end up advantaging boys.A new study points in a different direction. It indicates that much of the problem lies with biased primary school teachers, who have major and enduring influences on female achievement. That's really hard to prove, but Victor Lavy of the University of Warwick and Edith Sand of Tel Aviv University found a way by studying children in Israel.In primary schools there, boys and girls are subject to two kinds of tests: a "blind" external exam, graded anonymously, and a "nonblind" internal exam, graded in the classroom. It is well-established that the difference between blind and nonblind assessments is a good measure of sex discrimination -- at least if the two tests are gauging the same basic thing. In this case they were, so Lavy and Sand could compare the outcomes to see whether teachers showed any tendency to downgrade girls.In tests on Hebrew language, the researchers found no bias on the basis of sex; girls did a bit better than boys on both external and internal exams. In math tests, in contrast, girls did better on the external exams, but worse on the internal ones -- a strong suggestion of bias.Moreover, some teachers showed a significant bias, whereas others showed none. Because students are randomly assigned to teachers within primary schools, Lavy and Sand were able to investigate the consequences, for both boys and girls, of having a biased primary school teacher.The biased teachers turned out to have significant effects: Girls who had a biased teacher in primary school were less likely to continue with math and science in high school. In contrast, boys with biased teachers were more likely to complete the advanced math and science studies.That's an important difference because those courses are a prerequisite for university schooling in a number of fields, including computer science and engineering. Thus, a biased fourth-grade math teacher can limit a woman's career opportunities. And if significant numbers of primary school teachers show a sex bias, they will reduce the total number of female students who pursue science, technology, engineering and math.It's possible, of course, that findings in Israel would not generalize to the U.S. But it's more reasonable to think that biased primary school teachers, reacting to stereotypes about boys and girls, would not be unique to a single nation.For those who want to produce more American graduates in science and math, the policy implication is clear. Even at early stages, primary school teachers give their students a powerful sense of who's good at what. If they treat girls and boys equally, they can help give them an equal chance.Bloomberg ViewCass R. Sunstein, a Bloomberg View columnist, is director of the Harvard Law School's program on behavioral economics and public policy.