“Just go through (the script) and cross out a bunch of male first names and put female first names. That’s all you have to do,” Davis told the audience during a panel Saturday at AT&T’s SHAPE media conference in the Los Angeles suburb of Burbank.

Davis joined fellow actor Mayim Bialik on stage at the conference to discuss how gender parity in media can create social change. The conversation revolved around the need for diversity on screen to break stereotypes and encourage young people to pursue careers they might otherwise have felt were off limits to them.

“Of course, why wouldn’t we need to see people who are like us to be able to imagine what we could become?” Bialik said.

The panel was born from a study conducted by the Geena Davis Institute on Gender in Media that found women felt encouraged to pursue scientific, medical and engineering (STEM) careers because of “X-Files” character Dana Scully, an FBI agent and medical doctor. Of the women surveyed in the study, 63 percent of those working in a STEM field said Scully served as a role model for them growing up.

Bialik, who also holds a doctorate in neuroscience and recently wrapped her time playing the role of neuroscientist Amy Farrah Fowler on “The Big Bang Theory,” said seeing characters like Scully on screen and having real-life mentors is crucial for young women to pursue careers in science, medicine and engineering.

“I was raised in a climate where if you didn’t learn things as fast as the boys, it meant that it wasn’t for you,” Bialik said. It’s important “to have a mentor, to have someone that you can see is living the life of a scientist and also has a social life — all the things that the lone scientist in the laboratory stereotype doesn’t give us.”

“You’re seeing the full, complicated, amazing woman living life as a scientist,” Bialik said of characters like Scully and Fowler. “That’s what I needed as a young girl that wasn’t there for me.”

This doesn’t just apply for gender, either. The panelists said that all forms of diversity on screen are necessary, pointing to films like “Hidden Figures,” which is about the key role a group of African-American women played in the U.S. space program, as leading the way for more complex stories on people of any gender or race.

“As much as people think Hollywood is liberal and open-minded and progressive thinking, they’re doing a worse job of reflecting society than the abysmal numbers in real life,” Davis said. “If we show it, it will happen in real life.”

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.