2 The Data Revolution in Justice 24 their inappropriate use may present. Recent research examines the potential of machine learning techniques to “improve human decision”, in specific by evaluating the potential of machine learning to decide whether defendants should await trial at home or in jail in different US urban cities (Kleinberg et al., 2017). The authors focus on bail decisions, in which judges have to assess whether the defendant will flee or commit a new crime if released, and trade off these risks against the cost of incarceration. In brief, the judges have to decide, based on their prediction, what a defendant would do if released. This specific prediction task makes an algorithm particularly promising for this job.

The authors use a large data set of cases heard in New York City from 2008 to 2013 to build an algorithm that assesses the risk of fleeing or recidivism. The algorithm then makes a prediction based only on data available to the judges at the time of the bail hearing. After comparing results, the authors find that the algorithm improves judicial decisions, and has the potential to reduce crime as much as 25% without changing the numbers of people waiting in jail. By evaluating the results, they realize that judges release many defendants the algorithm ex ante identifies as very high risk, and that stricter judges do not jail the riskiest defendants first. These results are not restricted to New York City, as the authors report similar findings in a national data set as well. Moreover, the authors show the potential of machine learning tools to diagnose why judges mispredict.

The results from the aforementioned study suggest a promising avenue for future research on the application of machine learning to predict the risk of recidivism and improve the precision in judicial decisions. According to the United Nations (2018), the proportion of prisoners held in detention without being sentenced for a crime has remained almost constant between 2003–2005 and 2014–2016, and still affects almost one third of all prisoners. Thus, the importance of potential developments in this field may be particularly relevant all over the world to better identify those who should stay in prison–or at home–while expecting a trial.

In addition, clear predictions about the length of a trial or expected gains from it may be helpful to improve litigants’ decisions on their cases. In Mexico, the rate of settlement in mediation in specialized labor courts remains low because of overconfidence on the client-side and low-quality legal representation (Sadka, Seira, and Woodruff, 2017). Many plaintiffs spend more on legal fees than what they recover in court. Quality of legal aid and predictions about the case are both effective in correcting these erroneous perceptions regarding their entitlement and the importance of particular types of evidence. Sadka, Seira, and Woodruff (2017)find that providing information to litigants reduces the level of overconfidence of litigants, and nearly doubles the overall settlement rate. Nonetheless, the increase in settlement rates only occurs for the subset of cases for which the plaintiff is present to receive the information, as the information provided to lawyers does not have an effect. Thus, administrative data may also be able to improve litigants’ expectations of a case, identify the optimal path to resolve a specific case and–as in the case of Mexican labor courts–lead more litigants to settle, freeing up space in court proceedings.

Nonetheless, the implementation of machine learning tools in the judicial sector entails relevant risks that may not be overlooked. Inappropriate application of these tools can lead to decisions that may violate due process or that may discriminate based on race, gender or other characteristics. This may be of particularly high risk when the tools represent a black box with no clear explanation of how it works (Rudin and Ustun, 2017). Without appropriate safeguards, letting machines make judicial decisions could amplify existing biases and discrimination.

# **Analyzing Disparities in Justice Systems**

Equal treatment before the law is an essential feature of democratic societies. According to the Universal Declaration of Human Rights, “All are equal before the law and are entitled without any discrimination to equal protection of the law.” As a consequence, everyone must be treated equally