Earlier quoted context omitted.
Your function r = r(pp, red shirts, race of offender, etc) exists. A model of the form a x r + b x something_else + ... will detect the bias you've described, assuming of course the biasing variable is either present or redundantly encoded in the data set. We've now established the existence of a statistical model which can detect this bias. Now, any other model which is capable of expressing your specific r(p) can d…
Regarding your last paragraph, there's two different angles here. The "machine learning is racist" angle I think is quite valid, but covers a different topic than what we've been discussing here. To be more specific, there's two different ways in which we can have racist models: 1. The algorithm is biased in a way that reflects reality but does not reflect how we wish it to behave. This is the "machine learning is ra…
(1) is only possible if your data provides access to the biasing variable, perhaps via redundant encoding. This is the standard critique folks make.
As per (1), the biasing variable is available. Now if the algorithm is expressive enough to describe the functional form of the bias (e.g. the bias is quadratic, and the model includes quadratic terms), it will fix that bias.
You're right that there are lots of hidden variables that we can't use in a predictor. Murderous intent and mafia membership are also not available as predictive factors. You could build a more accurate model if you had that data. So what?