The fatal shooting of Michael Brown in August in Ferguson, Missouri — and the protests that followed — have brought renewed attention to a range of issues, including the underrepresentation of blacks on local police forces and in the leadership of many U.S. cities and towns. Ferguson, for example, is 67 percent black and has a police force of more than 50 officers, yet you can count its black police officers on one hand. Its mayor is white, as are five of its six City Council members.

That’s no coincidence. Across U.S. cities, there is a causal relationship between those two issues: Elect black officials, and the share of black police officers rises.

We would expect cities with larger black populations to be more likely to elect black mayors and more likely to have black police officers. So, how do we know that black mayors influence the composition of the police force? For one thing, there are examples where the relationship is quite clear. In 1991, for instance, Dwight Tillery won a close election to become mayor of Cincinnati. A proponent of bringing Cincinnati into compliance with a decade-old lawsuit, he oversaw the rapid hiring of black police officers. Three years after his election, the share of the police force that was black had grown by 18 percentage points.

Beyond the anecdotal evidence, there is credible quantitative evidence that electing black mayors increases the share of the police force that is black. In a 2012 article (ungated) in American Politics Research, Princeton University’s Katherine McCabe and I examined 149 general elections for mayor in which a black candidate ran against a non-black candidate, as Tillery did. These elections took place in 74 different large and midsize cities between 1989 and 2006.

At first glance, this data would seem to have the problem I brought up earlier: Correlation doesn’t equal causation. But in this case, we can get leverage from a basic fact about electoral math, which is that a candidate who wins 50.1 percent of the vote gets to be mayor and a candidate who wins 49.9 percent of the vote does not. On average, the cities where black candidates narrowly win should be similar to those where they narrowly lose — and the candidates should be similar, too. But a few chance votes either way put some candidates in City Hall and others into another line of work.

Following that logic, we can isolate the effect of narrowly being elected mayor as distinct from the effect of cities where black mayors win more support. In the figure below, from our paper, we plot the change in the share of the police force that is black over the three years post-election (on the y-axis) as the support for the black candidate in a given mayoral election changes (the x-axis). Each black diamond represents one election. The key change to notice is the upward shift just after the 50 percent mark, when the black candidate wins and can influence police hiring.

Based on the model, a city where the black candidate wins one vote more than 50 percent should expect to see its share of black police officers jump by 3.8 percentage points. (The associated 95 percent confidence interval spans from 0.7 to 6.9). That’s the discontinuity illustrated by the break in the lines with black circles at 50 percent. And even if we drop Cincinnati as an outlier, the estimated effect of a narrow victory by the black candidate is still 2.2 percentage points, as the line defined by gray triangles demonstrates. (Incidentally, that is quite close to the change we’d see in Ferguson with the hiring of one new black officer.)

Of course, there is variation in police hiring across cities, with some black mayors presiding over declining shares of black officers and some non-black mayors overseeing increases. But overall, cities with black mayors appear to hire black officers in a way that other cities do not. It’s not just that blacks are too frequently underrepresented in city halls and police departments. It’s that underrepresentation in the halls of power leads to underrepresentation on the beat.