
Descriptive score-by-group disparity
Source:R/fairness_predpol.R
morie_fairness_predpol_score_disparity.RdDescriptive score-by-group disparity
Examples
set.seed(7); n <- 80L
group <- rep(c("X", "Y"), each = n / 2L)
score <- ifelse(group == "X", rnorm(n, 0, 1), rnorm(n, 2, 1))
morie_fairness_predpol_score_disparity(score, group)
#> Predictive-Policing Score Disparity (descriptive)
#> =================================================
#> Group-mean spread 1.8528
#> ANOVA F 72.42
#> ANOVA p-value 9.6468e-13
#> Reference group X
#>
#> Group mean risk scores span 1.85 points (reference 'X'). A one-way ANOVA finds the between-group difference statistically significant (F = 72.42, p = 0.0000). Note: a score gap is not itself evidence of bias — it can reflect genuine base-rate differences. Pair this with morie_fairness_predpol_calibration_audit, which compares the score against realised outcomes.