The US Supreme Court is considering a high-profile case that could change the way legislative maps are drawn and reshape elections. The court has invited social science to play an unusually significant role in its decision.

On October 3, the court heard oral arguments in Gill Whitforda Wisconsin case that could result in the first constitutional constraints on partisan gerrymandering. The case represents the culmination of decades of litigation on the subject. As someone who responded to the court’s call and provided a metric used in the case, I have an unusual perspective on the court’s relationship to social science and what it may say about the role of social science and the law more generally.

Partisan gerrymandering, broadly defined, is the practice of drawing the boundaries of representational districts to maximize the number of seats for one party. In 1986, the court declared this practice appropriate for judicial consideration. But the justices did not know how to define a partisan gerrymander so they could consistently identify one in a way that removed personal bias as much as possible. In the ensuing 30 years of litigation, the court has hardly strayed from this initial view—that the problem is real but difficult to define.

Partisan gerrymandering is a challenge to measure and describe because it represents the collision of two fundamental elements in American politics: geographic representation and party allegiance. Our district-based approach to elections presumes that geography trumps all other concerns. Each district is supposed to elect the best person to represent the needs of the people in that community, and each district’s needs are imagined to be distinct from the needs of other districts.

In reality, parties, not geography, drive our politics. Parties bring factions of voters in each district together into a broad, durable coalition that often has no relationship to geography at all. Voters will agree much more often with fellow partisans in other districts than they will with opposing partisans in their own district.

Parties therefore bind voters in different districts to each other. Voters who choose parties care about more than just the mechanical fact that someone has been elected to represent their district. They want their party to win, and they also want representatives from their party to be elected elsewhere.

But in our district-based system, a party that wins more votes does not necessarily win more seats. It has to win more votes in the right places: in districts where more votes will push the party over the threshold to victory.

Partisan gerrymandering exploits this fact by making sure that one party spends its votes in futile efforts: districts where it comes close to winning but will never quite get there, and districts that it will win by margins so large that victory is never in doubt. These outcomes “waste” votes because so much of the party’s support (the votes cast for losers and those cast in excess of the number required to win) do not contribute directly to victory. By playing with the number of votes each party wastes, a partisan gerrymander can manipulate the number of seats each party wins, even when the number of votes the parties receive does not change.

This leads to a real tension. One the one hand, our district-based political system suggests that parties are unnecessary and certainly not owed any particular level of representation.  On the other hand, if voters largely express their policy desires through parties, suppressing a party’s representation—as partisan gerrymandering does—seems like a serious violation of democratic norms. The court’s struggles in this area reflect this collision of ideas. The court believes the issue is real and potentially very serious, but it has trouble defining the harm within a system that does not take parties into account.

Rather than resolve this contradiction, the justices extended an open invitation to social scientists to solve it for them (or at least get them closer to a solution). This was a sensible step for the court to take. Social scientists add the most value when a clear, objective measurement is needed but the specifics of it are going to be nuanced and complex.

Moreover, social scientists have stepped up to the court’s challenge. In addition to the measure I have offered—the “efficiency gap”—social scientists have also presented several other approaches to the court. Each one measures a slightly different aspect of the concept of a partisan gerrymander, and each has its plusses and minuses. In the Whitford litigation, these quantitative options led to an unusually large amount of analysis. Graphs, tables, computer code, equations, and data all became important parts of the Whitford evidentiary record.

This is clearly a success for social science. But it also creates a problem for the court. Precisely because it takes social science to understand partisan gerrymandering, the solutions offered will be complex. The court balked at this complexity in the oral arguments, calling the social science “full of questions,” “gobbledygook,” and a “bunch of baloney.” Concerns were raised that reliance on social science would undermine the legitimacy of the court, since it might be difficult to explain the court’s decision in terms the average person could understand.

These concerns should be taken seriously, but they should not prevent the courts from addressing complex problems. As more data and computing power become available, social science will increasingly provide nuanced analyses that will be challenging to understand. These may not always be requested by the courts. In fact, it may be social science that invites the courts to get involved in issues that had once been considered untouchable—or that the courts were not even aware were problems.

The courts cannot just ignore this new evidence. Nor can they be expected to step in to defend something that they do not understand. Instead, we must find more effective ways to help the courts deal with the evidence that they see. There are a variety of options here, from staffing courts with social science experts to adding more social science analysis to law school curricula.  Perhaps we might even require judges, like doctors, to take short courses on the latest methods in order to be “re-certified” on a periodic basis.

Regardless of the solution, the struggles evident in the Whitford gerrymandering case are unlikely to get better without some change. Social science and the law are made for each other, but the marriage might need a little counseling to work itself out.