I was a bright and precocious child—or a nerd, or a teacher’s pet, depending on whom you asked. I loved reading more than TV. I took science classes as an after-school activity for fun. Things at school came easily to me.

Except when they didn’t. When I was confronted with a challenge I couldn’t immediately solve, my whole world crumbled. It didn’t take long. Just a few minutes of grappling with something unfamiliar could leave me sobbing and declaring I would never try it again. That may be why I tried and quickly tossed aside piano lessons, ballet classes and basketball teams in turn.

And I never quite shook that habit. When I arrived at college, a small fish in an enormous pond, I received less than perfect grades for the first time in my life. What many might shrug off as meaningless in the grand scheme of life shook my foundations. Did I deserve to be there? Was I smart? Have I gotten everything wrong? Maybe I should have stayed in a smaller pond that would be easier to dominate, I thought.

This reaction to getting lower grades is, apparently, not unique to my perfectionism and me. Women have overtaken men in college attendance. Yet they end up being just about 30 percent of the people who graduate with economics degrees and 41 percent of those from science and engineering programs.

And a pair of studies diagnose one source of this leaking pipeline: these disciplines grade on a tough curve, and as women’s grades fall in economics or STEM (science, technology, engineering and math) classes, their likelihood of ditching those classes rises. Catherine Rampell, who draws the studies together in The Washington Post, worries this means women are self-selecting out “because they fear delivering imperfection in the ‘hard’ fields” and urges women “to overcome our B-phobia.” She concludes, “Rinse yourselves of the intoxicating waters of Lake Wobegon, ladies, and embrace meaningful mediocrity.”

It is troubling that women might be pulling themselves out of a whole area of study because they fear lower grades—a metric that rarely follows students into their professional lives. Yet while Rampell’s tough talk might work for some, it ignores the fact that women are brought up to rightly fear failing. Women have been taught to be B-phobic.

In a series of studies in the 1980s, psychologist Carol Dweck looked at how bright fifth graders handled challenging materials. She found that girls quickly give up when given something new and complex. Boys, on the other hand, see it as a challenge and are more likely to try again instead of throwing in the towel. In writing about this study, Heidi Grant Halvorson, says, “The only difference was how bright boys and girls interpreted difficulty—what it meant to them when material seemed hard to learn.” Bright girls lost confidence quickly, and researchers found it’s because they think their abilities are something innate and immutable. Boys think that can gain abilities by trying harder.

Why? Because parents and teachers tell girls that they are “good” or “smart,” which “implies that traits like smartness, cleverness, and goodness are qualities you either have or you don’t,” Halvorson writes. Boys have a much harder time following direction, though, so the feedback they get is about effort—asking them to try harder or pay more attention.

This isn’t just something we signal to bright girls and boys taking on challenges. Boys will be boys, right? They may mess up a lot in grade school but we know they’ll turn out fine in the end. High-risk entrepreneurs—a group that is heavily male-dominated—are more likely than the rest of us to engage in illicit activities when they’re younger, but it pays off later when they earn more.

But girls need to dig within themselves to excel. They are rewarded when they control themselves and follow the rules. What of those who can’t find it within to behave perfectly, though? At an early age, we signal to girls that they have sole ownership of their failure.

And there is no second chance, because these girls grow up into a world where they find out that their innate talents have to be twice as good. That’s why when Janet Yellen is “always meticulously prepared” and thinks logically and carefully—not by the seat of her pants—she is deemed to be not good enough. Women get better grades, but they are offered lower starting salaries when they graduate. For every degree they earn, a man with the same credentials will make more.

This is particularly true of these male-dominated science and math fields. Without a prospective employer knowing anything about you, if you are a woman you are half as likely to get hired for a job in mathematics because you’re expected to perform worse on a task that, statistically speaking, you’re equally likely to do well on. You have to beat a man to join him.

If the world demands that you work twice as hard to get half the reward, why would you handicap yourself by starting out somewhere that makes it harder to shine? When the chances of getting ahead are lower just because you wear a skirt and not a suit, you seek out any advantage you can get.

This may mean that women self-select out of risky undertakings or environments that dish out fewer rewards. And Rampell is right that this is a big problem. Higher risk can bring higher returns. These “hard” fields that award stingy grades pay really well (although, of course, women in these jobs still make less than men).

But ours is not a society that wants women to take risks and it is unforgiving when they don’t beat the odds. As Ta-Nehisi Coates points out, “’twice as good’ ultimately means half as many arrive.” The other half who are left behind may be just as good. Some may be failures. We don’t get to see them because they are discarded so much more readily than the white, straight, privileged men who automatically have our faith.

If we want women to take on bigger challenges, we have to tolerate their failures. Girls need the chance to try harder the next time. Women need the chance to prove their worth without having it weighed at half of a man’s. Then perhaps we can be more tolerant of getting a B grade.