The economist Girija Borker’s brilliant new research (pdf) uncovers one of the unseen ways sexual harassment changes lives and the economy.

Her study begins with a simple question: Why are women in New Delhi, India’s capital city, choosing to go to worse colleges than men, despite the fact that they score higher than them on college entrance exams? Part of the answer, according to her research, is to avoid sexual predators.

Borker finds that women are willing to make large tradeoffs in terms of the quality of the school they attend in order to have a safer route to school. She estimates that for a 3% annual decrease in the probability of being raped, women attending Delhi University are willing to go to a college in the bottom 50%, rather than one in the top 20%. Men barely take safety into consideration at all. (For context: Delhi University is made up of 77 colleges, and admittance is entirely based on school-leaving exam scores.)

Women also end up spending more on transportation in order to avoid harassment. For a safer route to school, she finds that women are willing to spend tens of thousands of rupees—which is often more than the tuition itself.

Safety first

The simplest way to see how sexual harassment impacts women is to look at how they commute. According to Borker’s survey of 2,700 Delhi university students who live at home and travel to college daily, buses are a less popular mode of transport for women than autos and the metro. One the other hand, for men, taking the bus is the most popular way to get to school.

When Payal Sharma, now 24, got admission to the prestigious Lady Shri Ram College in Lajpat Nagar, she decided to go even though many of her friends settled for second-best choices closer to home. But safety was still on her mind: For the entirety of her three-year course ending in 2015, Sharma chose the longer one-hour metro ride instead of a 20-minute bus trip to college. “I don’t know if it’s a perception that the metro is safer, maybe it is. But good connectivity by metro was the first thing I checked for when I got in,” Sharma told Quartz. “Most people choose to take the metro even though it takes more than double the time.”

This overwhelming concern is hardly unfounded. Despite enacting tougher sentences for rapists and setting up “fast-track” courts, India’s rape crisis remains dire, thanks to ill-equipped police officials, victim-blaming doctors, and a lack of legal assistance.

The capital city of New Delhi is especially notorious for being unsafe for women. In 2012, the gruesome gang-rape of a 23-year-old physiotherapy student on a bus served as a wake-up call but little changed. Four years after the incident, New Delhi still ranked the fourth-worst city in the world for women using public transport. The Delhi police registers an average of 50 crimes against women daily, including at least four alleged rape.

But Borker’s study went beyond simply looking at the these students’ mode of transport.

In order to quantify how gender impacted college choice, Borker used data on the location of surveyed students’ homes along with potential routes to each of the schools they were admitted to. Based on Google Maps, she developed an algorithm to generate as many as 12 plausible routes for each school. She then took those routes and assigned them a safety score based on data from the mobile applications Safetipin and Safecity. According to Borker’s analysis, men who scored highly on entrance exams used their expanded choices to go to a better school, but women would often use that choice to find a school for which they had a safer route.

Jennifer Doleac, an assistant professor of public policy and economics at the University of Virginia, calls Borker’s study “well done, careful, and thorough.” Still, she cautions that the study is mostly identifying a strong correlation between route safety and school choice, rather than definitively showing that route safety is causing school choice. However, it still proves incredibly valuable because “it is the first study I know of that credibly quantifies the economic impact of sexual harassment,” Doleac added.

The problem is probably even worse than her research suggests, says Borker, because she is only able to examine those who attend college. There are likely many women who are not allowed to go to college at all or choose not to attend because of safety concerns. She thinks the government needs to take these safety issues into consideration. “If you are designing transport systems or walkways and you don’t take into account women’s safety, then you are never going to have inclusive development,” Borker told Quartz.