country where crime is more or less severe. If these distributions of crime severity are correlated with the ethnic distributions of defendants and plaintiffs, then we may again falsely perceive in-group bias.

The rest of this section proceeds as follows. Subsection 4.1 presents the qualitative justification that judge assignment is as good as random (at least in the most recent years). Subsections 4.2 and 4.3 present quantitative evidence through balance tests that the random assignment assumption does in fact hold across the full time period for both gender and ethnicity, respectively. The econometric approaches for examining gender and ethnic in-group bias are described in detail in subsections 4.4 and 4.5, respectively. We also aim to examine whether judge gender slant in written opinions is correlated with outcomes for female defendants and plaintiffs. The approaches to these analyses are described in subsection 4.6. Finally, subsection 4.7 presents the specifications for examining the relationship between in-group bias and textual variables other than slant, for both gender and ethnicity.

# **4.1 Random Assignment of Cases to Judges**

To evaluate the existence of in-group bias, we exploit the quasi-random assignment of cases to judges. In Kenyan High Courts, cases filed in a court are categorized by court type and sent to the deputy registrar of the relevant court division (family, commercial and admiralty, labour and employment, constitutional, land and environment, or criminal). The deputy registrar then assigns the case to a judge based on the judge’s caseload and calendar, without considering case characteristics. This exogenous assignment is orthogonal to case characteristics such as the gender or ethnicity of the parties. Thus, this system produces as-good-asrandom assignment of plaintiffs and defendants to judges, conditional on court division. This is consistent with the World Bank Doing Business’ Index, which asserts that cases are in fact randomly assigned to judges in Kenya (World Bank 2021). Nonetheless, it must be noted that this randomized procedure may be a recent phenomenon. Indeed, introducing randomization was allegedly one of the goals of the reform team following the implementation of the 2010 Kenyan Constitution (Gainer 2015). Therefore, it is necessary to provide further evidence that case selection by judges has not been a common feature across our sample. To do so, we present balance tests in the following two subsections. Considering the possibility that assignment has become de jure random after 2010, in addition to conducting the tests for the full sample, we also split the balance tests for de facto randomization before 2011 and after 2010. As a robustness check, we also conduct the main analysis for only after 2010.

# **4.2 Gender Balance Tests**

To confirm that judge assignment to cases is random in terms of gender majority, we use the following balance test for the analysis sample, for case _i_ filed in court _c_ at time _t_ as: where Φ _c,t_ is a court-year fixed effect and _Xi,c,t_ is a vector of additional control variables, which may include: binary variables for judge, defendant, and plaintiff plurality ethnicity; variables for the numbers of judges, plaintiffs, and defendants; a binary variable indicating whether the case is an appeal; and binary variables indicating the case type. Court-year fixed effects are used to ensure that we are comparing defendants and plaintiffs that are in the same court at the same time. Court-year periods with insufficient variation for regression analysis are dropped from the regressions. For this and all other models, we cluster standard errors at the judge level. As a robustness check for the main analyses, we use HC1 robust standard errors.

The results of the balance test are shown in Table D1 in Appendix D. Column (1) does not include additional controls. Column (2) includes controls for ethnicity, and Column (3) adds additional controls (as listed in the table notes). The results indicate that male- and female-majority defendant groups are equally likely to be assigned male- and female-majority judge panels (including single-judge panels). Likewise, maleand female-majority plaintiff groups are equally likely to be assigned male- and female-majority judge panels. In light of the concern that cases have only become randomized after the creation of the new constitution and the accompanying judicial reforms, Tables D2 and D3 present balance tests for pre-2011 and since 2011, respectively. The results are consistent with Table D1.

8