The US-based economists Felipe Goncalves and Steven Mello have both had the police give them a break. It gave them a brilliant idea for uncovering racial bias in policing.

Both Goncalves and Mello had been stopped for driving above the speed limit, and when a police officer wrote their ticket, it was for less than the speed they were actually driving. The officer in both cases was being lenient. By reducing their official speed, they received a lesser fine. This kind of “speed discounting” is fairly common practice across US police departments.

Goncalves and Mello, PhD students at Princeton University who use economic analysis to study police misconduct, had stumbled on a test they could use to see if the police treated people of different races in this particular context. Were certain groups less likely to be treated leniently when caught driving over the speed limit? In a recently released paper (pdf), the researchers show that minorities are 50% less likely to get this kind of break.

In order to uncover this bias, Goncalves and Mello analyzed nearly one million tickets given out by Florida Highway Patrol from 2005-2015. They chose Florida because the state is particularly open with its fines data.

In Florida, like most states (pdf), the size of a speeding fine depends on the magnitude of the violation. In Florida, driving 6-9 miles per hour (mph) over a posted limit carries a fine of $125; 10 mph over, and it’s a minimum of least $200. Florida Highway Patrol officers give an inordinate amount of 9 mph tickets—more than 30% of all tickets were for going exactly 9 mph above the speed limit, indicating that the highway patrol does tend to be pretty lenient overall.

If racial bias plays a role in the likelihood of getting a break, we would expect minorities to get fewer 9 mph speeding tickets. That is exactly what Goncalves and Mello found. About 35% of all speeding tickets for drivers self-identifying as white are 9 mph tickets, while only 25% of tickets for minority drivers fall in that category.

Goncalves and Mello found the disparity has two causes: direct racial bias and regional differences.

“If you forced every officer to treat minorities the way they treat white people,” Goncalves told Quartz, the leniency disparity would drop, but only slightly. He and Mello found the majority of police officers actually don’t exhibit any bias at all. Their analysis suggests only 20% of officers are more lenient to a particular race—and though the majority of bias benefits whites, some officers are actually more lenient towards minorities. Women, younger officers, and minorities are all less likely to display bias.

There are regional differences, though, that hide an insidious form of bias, explains Goncalves, that is powerful enough to have about twice the impact on the leniency disparity as direct racial bias. “Minorities tend to live in areas that are less lenient towards everybody,” he says. If all people in a 90% white area are given breaks, but all people in a 90% minority are not, it amounts to huge difference in actual experience, even if no individual police officer is acting biased.

What’s to be done? After they analyzed the impact of various policies, such as firing biased officers and hiring more minorities and women, Goncalves and Mello came to the conclusion that the most impactful policy would be to put more of the lenient officers in areas with large minority populations. In other words, give everybody an equal chance at a break.