Walk into any tech company or university math department, and you'll likely see a gender disparity: Fewer women than men seem to go into fields involving science, engineering, technology and mathematics.

Over the years, educators, recruiters and government authorities have bemoaned the gender gap and warned that it can have dire consequences for American competitiveness and continued technological dominance.

It isn't just that fewer women choose to go into these fields. Even when they go into these fields and are successful, women are more likely than men to quit.

"They tend to drop out at higher rates than their male peers," said Toni Schmader, a psychologist at the University of British Columbia. "As women enter into careers, the levels of advancement aren't as steep for women as for men.

When women were reminded — even subtly — of the stereotype that men were better than women at math, the performance of women in math tests measurably declined.

Schmader and a colleague, Matthias Mehl at the University of Arizona, recently came up with an innovative way to study one dimension of the gender gap in fields such as computer science and engineering.

Mehl often uses a device known as an Electronically Activated Recorder (EAR) in his research. It's an audio recorder that the psychologist can attach to volunteers. The device automatically turns itself on and off.

"We program the device to record for 30 seconds every 12 minutes," Mehl said in an interview. "That gives you about 5 soundbites per hour, or 70 soundbites per day."

By "sampling" people's daily lives, Mehl said his recorder often picks up on things that people don't notice. Most of us remember only the highlights of our days — an interesting conversation or a ballgame. But much of the time, our lives run on autopilot, and we don't notice what's going on. Mehl said getting detailed information about what people do during the majority of their time is central to understanding them psychologically.

The sampling technique has revealed flaws in common stereotypes. Take the one about how women like to talk much more than men. When Mehl actually measured how many words men and women speak each day, he found there was practically no difference — both men and women speak around 17,000 words a day, give or take a few hundred.

Mehl and Schmader said in interviews that they felt the unobtrusive sampling technique could shed some light on why women who'd made it through grueling Ph.D.s and become science and math professors might feel like throwing it all away.

They had male and female scientists at a research university wear the audio recorders and go about their work. When the scientists analyzed the audio samples, they found there was a pattern in the way the male and female professors talked to one another.

When male scientists talked to other scientists about their research, it energized them. But it was a different story for women.

"For women, the pattern was just the opposite, specifically in their conversations with male colleagues," Schmader said. "So the more women in their conversations with male colleagues were talking about research, the more disengaged they reported being in their work."

Disengagement predicts that someone is at risk of dropping out.

There was another sign of trouble.

When female scientists talked to other female scientists, they sounded perfectly competent. But when they talked to male colleagues, Mehl and Schmader found that they sounded less competent.

One obvious explanation was that the men were being nasty to their female colleagues and throwing them off their game. Mehl and Schmader checked the tapes.

"We don't have any evidence that there is anything that men are saying to make this happen," Schmader said.

But the audiotapes did provide a clue about what was going on. When the male and female scientists weren't talking about work, the women reported feeling more engaged.

For Mehl and Schmader, this was the smoking gun that an insidious psychological phenomenon called "stereotype threat" was at work. It could potentially explain the disparity between men and women pursuing science and math careers.

What Is Stereotype Threat?

Several years ago, psychologist Claude Steele posed an interesting question about an everyday scenario: Let's say you stopped by a math classroom and saw boys and girls learning together.

"The teacher is the same; the textbooks are the same; and in better classrooms, these students are treated the same," Steele wrote. "Is it possible, then, that they could still experience the classroom differently, so differently in fact as to significantly affect their performance and achievement there?"

When women look at tech companies and math departments, they see few women. This activates the stereotype that women aren't good at math. The stereotype, Toni Schmader said, makes it harder for women to enter those fields. To stay. To thrive.

Steele and other psychologists said a psychological phenomenon could be influencing the performance of students.

When there's a stereotype in the air and people are worried they might confirm the stereotype by performing poorly, their fears can inadvertently make the stereotype become self-fulfilling.

Steele and his colleagues found that when women were reminded — even subtly — of the stereotype that men were better than women at math, the performance of women in math tests measurably declined. Since the reduction in performance came about because women were threatened by the stereotype, the psychologists called the phenomenon "stereotype threat."

Stereotype threat isn't limited to women or ethnic minorities, Steele wrote elsewhere. "Everyone experiences stereotype threat. We are all members of some group about which negative stereotypes exist, from white males and Methodists to women and the elderly. And in a situation where one of those stereotypes applies — a man talking to women about pay equity, for example, or an aging faculty member trying to remember a number sequence in the middle of a lecture — we know that we may be judged by it."

Mehl and Schmader said they believed the same psychological phenomenon was responsible for the different ways in which conversations between male and female scientists were leaving the scientists engaged or disengaged.

"For a female scientist, particularly talking to a male colleague, if she thinks it's possible he might hold this stereotype, a piece of her mind is spent monitoring the conversation and monitoring what it is she is saying, and wondering whether or not she is saying the right thing, and wondering whether or not she is sounding competent, and wondering whether or not she is confirming the stereotype," Schmader said.

All this worrying is distracting. It uses up brainpower. The worst part?

"By merely worrying about that more, one ends up sounding more incompetent," Schmader said.

Mehl and Schmader think that when female scientists talk to male colleagues about research, it brings the stereotype about men, women and science to the surface.

When the female scientists talked to men about leisure activities, it didn't activate the stereotype. It wasn't that women liked to talk only about their weekends and personal lives. When the women talked to other women about science, the stereotype wasn't activated. It was the combination — women talking to men, and women and men talking about science, that activated the stereotype threat.

Now, most scientists say they don't believe the stereotype about women and science, and argue that it won't affect them. But the psychological studies suggest people are affected by stereotype threat regardless of whether they believe the stereotype.

Mehl, for example, knows all about stereotype threat. He even studies it for a living. The psychological phenomenon affects even him. In Mehl's case, the stereotype that threatens his performance has to do with dancing — and the fact he's from Germany and his wife is from Mexico.

"When I go dancing in Mexico, the stereotype of Germans not being good dancers is very salient," he said. "So I find myself much more aware of the way I dance when I dance among a group of Latinos, compared to when I dance among a group of Germans."

I asked Mehl whether worrying about his performance could be undermining his dancing.

"It's, well, possible that it undermines my performance," he said. Mehl said he's tried to fight the stereotype by reminding himself about how the psychological phenomenon works.

"What takes place is really mostly in my head," he said he tells himself. "'Guess what? The Latinos around me don't really care about how I dance.'"

The Wrong Conclusion

Mehl and Schmader said the stereotype threat research does not imply that the gender disparity in science and math fields is all "in women's heads."

The problem isn't with women, Mehl said. The problem is with the stereotype.

The study suggests the gender disparity in science and technology may be, at least in part, the result of a vicious cycle.

When women look at tech companies and math departments, they see few women. This activates the stereotype that women aren't good at math. The stereotype, Toni Schmader said, makes it harder for women to enter those fields. To stay. To thrive.

"If people like me aren't represented in this field, then it makes me feel like it's a bad fit, like I don't belong here," she said.

Shirley Malcom, a biologist who heads education programs at the American Association for the Advancement of Science calls it a chicken and egg problem: "The fact that there are maybe small numbers in some areas keeps the numbers down."

It may sound like a Zen riddle, but Malcom, Schmader and Mehl's solution to the problem of stereotype threat in science, technology and engineering is actually simple.

In order to boost the numbers of women who choose to go into those fields, you have to boost the number of women who are in those fields.