Future jobs in the United States are expected to grow most among the science, technology, engineering, and mathematics (STEM) fields. And a new study published in the journal Psychological and Cognitive Sciences may have figured out how to get more women involved.

According to the study authors, most people believe women who back out of a STEM major as an undergraduate do so for “individual differences,” when the switch might account more for “subtle cues in achievement contexts;” the biggest one being sex composition, or the proportion of men to women in a classroom. Men-dominated classrooms seem to lower women’s motivation, participation, and overall career aspiration.

But the authors find studies conducted on this difference focus mostly on the fact there is a difference, not so much data-driven solutions. These studies also go to the extreme when considering the number of men and women in STEM groups, such as a group that has all women or only 25 percent (or less) women. They don’t typically look at sex parity or groups with equal men and women. So the present study made a point to change that.

Over 100 women majoring in engineering were recruited to participate in the study, and then randomly assigned to one of three, four-person groups: groups that had 75 percent women, 50 percent women, or 25 percent women. Students first met with their group before spending some time alone in a cubicle to look over their task and indicate how worried or eager they were to figure it out with their group. After students returned back to their group to complete the task, they returned to their cubicle and assessed personal measures, such as level of confidence and career aspirations.

The results showed sex composition had a large effect on the students. Namely, women in groups with 75 percent or 50 percent women felt less anxious than women in groups with 25 percent women. Women also participated more in groups with more or even amounts of women compared to groups with lesser women. What’s more are the groups of lesser women made students feel less confident in themselves and their career aspirations.

This goes to show same-sex peer groups can enhance a student’s confidence and general liking for STEM fields, which is different from expert groups (also proven to boost confidence and STEM liking).

“…unlike experts who are successful and advanced relative to young students, peers are at the same stage of development, making their social influence psychologically different,” researchers wrote. “Female peers may be less effective because they have not reached high levels of success as experts. Alternatively, peers may be more effective because of their greater similar to young students.”

Researchers added these peer groups function as a “social vaccine,” inoculating students against “noxious stereotypes.” More research needs to be done to determine if these benefits persist in a larger group setting.

Source: Dasgupta N, et al. Female peers in small work groups enhance women’s motivation, verbal participation, and career aspirations in engineering. Psychological and Cognitive Sciences. 2015.