A blood test gives each patient a score: higher means more likely sick. Write ranking_score(scores, sick): how good the test is at ranking sick patients above healthy ones, before anyone chooses a cutoff. sick[i] is 1 if patient i is sick and 0 if healthy. 1 means perfect, 0.5 a coin flip, 0 exactly backwards.
| Ana | Ben | Cy | Di | |
|---|---|---|---|---|
| scores | 0.1 | 0.4 | 0.35 | 0.8 |
| sick | 0 | 0 | 1 | 1 |