Lauren Rogers, head of the Upper School at St. Mary’s said the school has a “moral obligation” to staunch the widening gender gap in STEM education.