Quant interview toolkit · ranking metrics

What does an AUC of 0.72 buy a two-ticket review desk?

A surveillance analyst has time to open two of six flagged tickets before the close. Last week’s validation report quotes an area under the ROC curve of 0.72. Does that mean the analyst should expect 1.44 genuine issues? Reconstructing a six-ticket example shows exactly what the number counts.

Change review depth

Expected issues found

Uses the article’s six scored tickets and a fair tie break at score 0.60.

Pick one ticket of each kind

Suppose all six historical tickets received a score before review and all eventually received a reliable label. Larger scores indicate greater concern. Here are the scores separated by outcome. The numbers are ranking scores and need no probability interpretation.

Confirmed issuesClean tickets
0.900.60
0.600.40
0.200.10

Pick one issue and one clean ticket uniformly from their respective columns. Award a point if the issue has the higher score and half a point for a tie. The first issue wins all three comparisons. The second beats two clean tickets and ties one. The third beats only the 0.10 ticket. The mean credit is (3+2.5+1)/9=13/18≈0.722(3+2.5+1)/9=13/18\approx0.722. That is the empirical ROC AUC with the usual linear interpolation across tied scores.

Where the area comes from

Lower a threshold from above the largest score to below the smallest. Plot the fraction of clean tickets admitted on the horizontal axis and the fraction of issues admitted on the vertical axis. Passing a clean ticket moves the curve right by one third. The height on that strip equals the fraction of issues that scored above it. Thus the strip’s area counts winning issue-clean pairs, divided by nine.

At 0.60 one issue and one clean ticket enter together. The curve goes from (0,1/3)(0,1/3) to (1/3,2/3)(1/3,2/3). Connecting those points with a straight line gives mean height 1/21/2 on that interval. This is precisely the average over the two possible tie orders. Sorting equal scores by a column that reveals outcomes would quietly inflate the area.

Now give the analyst two slots

Ticket 0.90 takes slot one. A fair tie-break selects either the issue or the clean ticket at 0.60 for slot two. Expected confirmed issues in this historical top two equal 1+0.5=1.51+0.5=1.5. Expected precision at two is 75%, and expected recall at two is 50%. Change capacity to three and both tied tickets are admitted. Precision becomes 2/32/3 and recall rises to 2/32/3 for that three-ticket queue.

AUC gives equal weight to all nine issue-clean comparisons. The analyst’s capacity makes a reversal at the admission cutoff much more consequential than a reversal among tickets nobody opens. Record the tie policy and report the yield at the review depth the analyst can actually sustain.

from itertools import product

issues = [0.90, 0.60, 0.20]
clean = [0.60, 0.40, 0.10]
credit = sum((i > c) + 0.5 * (i == c) for i, c in product(issues, clean))
assert credit == 6.5

Who supplied the labels?

If the desk only investigates the highest scores, the outcomes of lower-ranked tickets are missing. Treating every unreviewed ticket as clean would reward the model that picked the original review queue. A randomly selected audit of otherwise unreviewed tickets can supply evidence about that part of the ranking. The evaluation must account for the selection design. Estimating totals with unequal inclusion probabilities

Practice

TransformationWhat happens to AUC if every score is cubed?
Show answer

Cubing preserves strict order and ties, so all nine comparisons receive identical credit. A change in numerical scale can still matter to a system that admits scores above a fixed number.

Base rateIf every clean ticket is copied ten times, what happens to AUC and to precision at a threshold of 0.60 inclusive?
Show answer

Each issue-clean comparison appears ten times, so AUC is unchanged. At the threshold there are still two admitted issues, now alongside ten clean tickets. Precision falls from 2/32/3 to 2/122/12. This replication changes prevalence while preserving the empirical score distribution within each class.