Resampling Methods interview question

StatisticsResampling MethodsClassification Metricsmedium

Two trained fraud models are scored on the same 5,000-transaction test set: AUC 0.912 for the gradient-boosted model and 0.904 for the logistic model. You want a 95% CI for the AUC difference that reflects the sampling uncertainty of the test set. Which procedure is correct?

  1. ABootstrap each model's test predictions with its own independent resamples, compute both AUCs, and take percentiles of the difference, so the two AUC estimates stay independent.
  2. BCompute a separate 95% bootstrap CI for each model's AUC and call the gap significant only if the two intervals do not overlap, which is equivalent to a formal test of the difference.
  3. CResample test rows with replacement, compute both models' AUC on the same resampled rows, and take percentiles of the differences; pairing keeps the models' correlated errors.
  4. DResample the training data, retrain both models on each resample and score them on the fixed test set, since the variability that matters comes from retraining the models.
Show the answer and explanation

Correct answer: C, Resample test rows with replacement, compute both models' AUC on the same resampled rows, and take percentiles of the differences; pairing keeps the models' correlated errors.

Explanation Resampling Methods

Both models were scored on the same rows, so their AUC estimates are strongly correlated: transactions that are hard for one model tend to be hard for the other. The variance of the difference is

Var(AUC₁ − AUC₂) = Var(AUC₁) + Var(AUC₂) − 2·Cov(AUC₁, AUC₂),

and the covariance term is usually large and positive. A paired bootstrap keeps it:

  1. Draw 5,000 row indices with replacement from the test set.
  2. Compute both models' AUC on exactly those rows and store the difference.
  3. Repeat about 2,000 times; the 2.5th and 97.5th percentiles of the differences form the CI.

With rare fraud, resample frauds and non-frauds separately (a stratified bootstrap) so every replicate keeps the original number of frauds.

Why the other procedures fail:

  • Independent resamples for each model treat the two AUCs as independent and throw away the covariance, so the CI for the difference is too wide and real improvements can look insignificant.
  • Checking CI overlap gives no CI for the difference and is not equivalent to testing it: the check is very conservative, so two 95% intervals can overlap while the paired difference is clearly non-zero.
  • Retraining answers a different question (how much does the training procedure vary?), which matters when comparing algorithms, not two fixed, already-trained models.

A non-bootstrap alternative for correlated ROC curves is DeLong's test.

Interview tip: the general rule is "resample the unit that was sampled, and keep everything measured on it together"; here that unit is a test row with both models' scores attached.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Statistics questions

  1. A bank's prior for the mean monthly card spend μ of a new customer segment, based on similar segments, is μ ~ N(400, 20²) €. A pilot with 64 customers gives a…
  2. Which measure of central tendency is more robust to outliers, the mean or the median, and why?
  3. Which statement about the normal distribution is correct?
  4. What does the central limit theorem (CLT) state?
  5. What is the correct definition of a p-value?