2 The Data Revolution in Justice 23 and earnings. Randomizing sentences is unethical, but randomizing cases to judges who are systematically harsher or more lenient than others generated the inference on the long-run impacts of sentences lengths. Thus, in countries where cases are randomly assigned, the random assignment itself can be used as an exogenous source of variation to evaluate the impact of judicial decisions. This method has become widely used since the credibility revolution.

For instance, Dobbie and Song (2014) investigate the causal effect of consumer bankruptcy–one of the largest social insurance programs in the United States–on debtors by exploiting the random assignment of bankruptcy filings to judges. The authors find that debt relief increases individuals’ earnings and employment and decreases mortality and foreclosure rates. In Norway, Dahl, Kostol, and Mogstad (2013) evaluate the existence and importance of family welfare cultures, where the receipt of a welfare program by one generation causes increased participation in the next generation. The authors exploit the random assignment of judges to applicants for disability insurance whose cases are initially denied, by comparing the implications of being assigned an appeal judge who is systematically more lenient than a harsher one. They find strong evidence for a causal link across generations, where the adult child’s participation increases if the parent also participated in the insurance program.

Another policy question that has been answered by leveraging the random assignment of cases to judges is the impact of pretrial detention on defendants. Arnold, Dobbie, and Yang (2017) use the detention tendencies of quasi-randomly assigned bail judges to evaluate the impact of pretrial detention of subsequent defendant outcomes. They find that pretrial detention–due to comparably harsher judges–decreases formal sector employment and the receipt of government benefits.

This “judge leniency” design may be applied to other characteristics of judicial decisions. For example, what is the impact of the speed of justice? These kinds of questions can be studied in administrative data where random case assignment exist. Judges predicted to be fast also tend to be fast in other cases. The causal effect of faster case resolution can be studied by linking to long-term outcomes where the data infrastructure permits.

Overall, experimentation brings the opportunity to implement rigorous causal evidence to the legal realm. Whether it is via RCTs or leveraging the random assignment of cases to judges, “clinical trials” can bring important lessons on why rule of law matters for development outcomes, and perhaps more importantly, on what is the impact of specific policies and reforms on the litigants’ well-being.

# **2.C Machine Learning Applications**

In this section, we discuss avenues to leverage machine learning to improve judicial decision-making and increase the effectiveness of justice. Moreover, we propose a multistep approach to leverage administrative data to analyze disparities in judicial decisions. We also explore the potential of machine learning and natural language processing (NLP) techniques to process large quantities of text to improve the knowledge and efficiency of justice systems. These techniques currently allow researchers and policy makers to analyze texts to an extent that was not humanly possible before. Such opportunity has arisen not only due to the increase in the large volumes of data available, but also thanks to the recent development of computational tools that make it possible to process and analyze such large and complex data.

## **Applications of Administrative Data**

Even though the adoption of machine learning tools in the justice system is in its early stages, the preliminary results showcase the potential of these methods while also highlighting the risks that