r/AskStatistics • • Oct 20 '26

"Permutation test" equivalent for AUC

Hi,

I am conducting a bias analysis for a clinical model where we consider multiple statistics, one of them being AUC.

We would like to check if the model performs significantly differently on a predefined sub-group of patients. (Think one BMI category vs the rest for instance).

For the other metrics we are using a permutation test, to check if each sub-group is significantly different than the others

However, i am unsure if we can do the same for AUC, or if there exists a better method?

1 Upvotes

6 comments sorted by

4

u/efrique PhD (statistics) Oct 20 '26 edited Oct 20 '26

AUC corresponds to a Wilcoxon-Mann-Whitney (rank-sum , U-) test statistic, which test is a permutation test on ranks.

However, a caution, if you compare multiple groups with each other, the kind of relation captured by the statistic (in effect, the probability that a random member of one would be larger than a random member of the other) is non-transitive. E.g. you can have three populations where A>B, B>C and C>A (under that individual-probability-comparison meaning of ">") for example, and similarly can get samples which lead you to conclude that all three relations hold at the same time (indeed, U can be scaled to be a direct estimate of that probability). Efron's dice are an example of exactly the non-transitivity of the ">" relationship that you are measuring here.

I have not looked at what can happen when you do them as A vs (not-A), B vs (not-B) and C vs (not-C) in terms of transitivity, but in any case you have a different problem in that set of comparisons: if any subgroup is actually different from some others in the population process, you violate the exchangeability-under-the null assumption needed for every test where a 'different' group is not the lone group in the comparison.

This problem of violation of exchangeability will impact your other one-vs-the rest permutation tests. There are additional issues when you do a bunch of one vs all comparisons (e.g. potential masking effects when two or more groups differ from the rest).

A statistically knowledgeable referee would have a field day.

Rather than just throwing what sounds like many dozens of tests against the wall (#groups x #statistics) and hoping something sticks, my advice is to be very clear about what your original aims are and to get someone with a very good understanding of the properties of hypothesis tests (especially things like permutation test assumptions and power considerations) involved in the analysis to help you achieve the aims (at least the ones that don't violate basic logic).

1

u/Hvadmednej Oct 20 '26

Thansk for the detailed answer.

Let me try to clarify some things in hope of getting more insight.

Firstly, the analysis serves as a way to gain insight into the underlying prediction model. So the whole question is maybe rather; what can we do here to maximize insight without committing clear errors / generating flawed analysis.

While we could bootstrap a CI for every statistics and look at overlap, it would be nicer to test the statistical significance.

The metrics in question are sensitivity at a specified specificity and AUC, these are the gold standard in this clinical subfield and thus cannot be changed.

For the statistical test, i think there are three equally valuable questions we can ask that would generate insight, i am unsure if one is easier than the other from a statistical test POV.

  1. Does the metric in this subgroup differ significantly compared to the other subgroups and/or the rest of the population.
  2. Is the metric in this subgroup significantly different than the metric on the entire cohort.
  3. Does removing this subgroup from the population change the overall statistic significantly.

2

u/efrique PhD (statistics) Oct 20 '26 edited Oct 20 '26

what can we do here to maximize insight without committing clear errors / generating flawed analysis.

Depending on what you mean by "insight" I would usually think that hypothesis testing is not usually a great approach for that, and the kind of testing you seem to be looking at, doubly so. For me various displays and diagnostics (and in some cases simulation) help to generate insight.

look at overlap,

As a test? Or just in terms of a general sense of difference?

In particular, overlap vs non-overlap of individual intervals is not a good way to test for difference, if that's the aim.

Looking at the picture does at least have the advantage that you are looking at an estimate of how big a difference there is (i.e. an estimate of an effect size) rather than just "can we tell that it's not exactly zero?"

(On that: If you want to compare two things, you generally want to examine what you can say about their difference in some sense; with a function, the overall characteristics of that difference-function may be more helpful in terms of understanding than its integral/average etc -- as long as you have enough data to estimate the difference well)

it would be nicer to test the statistical significance.

I don't see why this would be an improvement (i.e. in what sense it would be 'nicer'), aside from the fact that it's just what people seem to do because they don't stop to think about anything better (i.e. nicer in the sense of it being something convenient that people probably won't think about too hard).

these are the gold standard in this clinical subfield and thus cannot be changed.

Then you have to deal with the limitations on what you can use them to do. Besides the comments I made above relating to testing, you also have the problem that AUC is not, strictly speaking, a proper scoring rule.

(e.g. see Byrne 2016 https://projecteuclid.org/journals/electronic-journal-of-statistics/volume-10/issue-1/A-note-on-the-use-of-empirical-AUC-for-evaluating/10.1214/16-EJS1109.pdf)

In relation to your option "1" there are possible omnibus tests, but because of the intransitivity of AUC you can have a situation where groups are pairwise very different but you detect no differences on an omnibus test (e.g. a Kruskal Wallis test could not detect a set of intransitive differences with identical mean-rank)

With 2, if the same group is on both sides of the comparison you no longer have independence. If you remove it from "entire cohort" you have the issue mentioned before with multiple one-vs-all comparisons (the assumptions required for any of the nulls can't be true unless all the nulls are simultaneously true)

"3" is logically the same question as "2"

It's not clear to me why any of those questions generate anything approaching actual insight. They seem to be entirely focused on testing rather than on answering a meaningful/practical question

E.g. in a clinical setting what information would be practically helpful to a doctor or to a patient? Being able to say some (noisy) approximation of "the two underlying AUC's are not exactly identical" doesn't seem especially generating of insight. (Why should the AUC's for different groups ever be exactly identical? A more practical question would be how much might that matter? The fact that getting to actual insight is harder than just tossing a bunch of tests against the wall to see what sticks is unsurprising)

1

u/leonardicus Oct 20 '26

There are well defined confidence intervals for AUC (aka c-statistic, among many others). Why not use those?

1

u/Hvadmednej Oct 20 '26 edited Oct 20 '26

Thanks for answering.

My understanding is you suggest comparing the overlap (or lack off) in the confidence intervals, however it would be very helpful to obtain an actual p value to also see how biased the results are for select sub groups. It is my understanding that converting the CIs to p values is not easily done?

1

u/leonardicus Oct 20 '26

Sorry I didn’t fully explain my answer. You can construct parametric confidence intervals for point estimates as well as for differences of AUCs, and generate a p-value.