Abstract
The area under the Receiver Operating Characteristic (ROC) curve (AUC) is a standard metric for quantifying and comparing binary classifiers. A popular approach to estimating the AUCs and the associated variabilities – the variance of the AUC or the full covariance matrix of multiple correlated AUCs – is the one proposed by DeLong et al [1], which is based on the Mann Whitney two-sample U-statistics. The bias of a variance estimator is an important factor in applications such as hypothesis testing and construction of confidence intervals – a negatively biased variance estimator may lead to incorrect conclusions, and a positive bias is conservative hence preferable. In this work, we show that the (co-)variance estimate in DeLong’s approach is always positively biased. More specifically, the difference matrix between the expectation of the estimated covariance and the true covariance is a positive semi-definite matrix. This bias is non-negligible when the sample size is small, and quickly diminishes as the sample size increases. Our method relies on constructing, from the AUC kernel, a random variable whose (co-)variance matrix coincides with the bias, thereby establishing the claim. We also discuss alternative approaches to AUC variance estimation that may potentially reduce the bias.
Keywords: binary classification, receiver operating characteristic (ROC), area under the ROC curve (AUC), structural components, jackknife, H-decomposition, ANOVA
1. Introduction
The area under the receiver operating characteristic (ROC) curve (AUC) is widely used to quantify binary classification performance [2, 3, 4]. Unlike other performance measures, such as accuracy or precision, the AUC is independent of the decision threshold and the class prevalence. These properties make the AUC a more meaningful metric in cost sensitive situations or with imbalanced data, which are common in machine learning and medicine [5, 6]. In addition to being a performance metric, the AUC can also be used as a training objective for learning to improve classification performance [7].
Given a fixed (trained) classifier, a set of classifier scores and the corresponding class labels (Fig. 1), a popular way to estimate the AUC and the associated statistical variability is to apply DeLong’s nonparametric approach [1], which is equivalent to the Mann Whitney (MW) U-statistics [8]. When comparing the performance of multiple classifiers using the same test samples, DeLong’s approach can estimate the covariance matrix of the multiple AUCs that properly takes into account the correlated nature of the classifier scores.
Fig. 1.

(a) A binary classifier takes input class-1 features and generates rating scores ; it then takes input class-2 features and generates class-2 scores . (b) Comparing multiple classifiers , using the same leads to correlated scores for class-1 and for class-2.
A main application of a variance estimate is to construct confidence intervals (CIs) of a statistic of interest. For such tasks, a less biased estimator can have more favorable properties [9, 10]. Furthermore, a negatively biased variance estimator leads to CIs with low coverage probabilities which is undesirable; a positively biased variance estimator is conservative and more preferable [9].
In this work, we show that the covariance estimate in DeLong’s approach is always positively biased. That is, the difference matrix between the expectation of DeLong’s covariance estimate and the true covariance is a positive semi-definite matrix. For the special case of a single AUC variance estimate, the positive bias in DeLong’s approach has been empirically observed [11]. The conservative (larger) standard error estimation also leads to conservative confidence intervals (regions) and sample size estimation, which is more preferable than the contrary for practical applications.
The rest of the paper is organized as follows. We discuss our problem setup and the related work in Sec 2. In Sec 3 we first derive the bias of DeLong’s variance estimate of a single AUC; this bias is then shown to be non-negative by constructing a random variable, from the AUC kernel, whose variance coincides with the bias. This construction is then extended to the covariance estimate of multiple correlated AUCs. We conclude the paper in Sec 5. Some calculation details are deferred to the appendix.
2. Related work
2.1. Binary AUC and its estimation
As shown in Fig. 1, we denote by the classifier scores for class 1 and class 2 features , respectively. Without loss of generality, we assume , and , i.e., follows the cumulative distribution function , and that and are independent. The area under the empirical ROC curve (AUC) can be characterized as [12, 13]
| (1) |
Given two sets of i.i.d. samples , a popular nonparametric AUC estimate is the Mann-Whitney two-sample U-statistic:
| (2) |
where the kernel is given by
| (3) |
It is clear that is an unbiased estimate of the AUC (1).
The variance of the AUC estimate (2) can be expressed using product moments of the kernels :
| (4) |
where , and are second central moments of the kernels :
| (5a) |
| (5b) |
| (5c) |
The derivation of (4) can be found in textbooks, see e.g., [14, chapter 6.3] and [15, chapter 3.3].
2.2. The variance estimate of a single AUC
The variance expression (4) is given in terms of the population quantities . In practice, these population quantities need to be estimated from sample observations. DeLong’s approach [1] employs the so-called structural components [16], given by
| (6a) |
| (6b) |
Obviously, . Let and be the sample variances of the structural components (6):
| (7a) |
| (7b) |
then a consistent estimate of the AUC variance (4) is [1]
| (8) |
2.3. Multiple correlated AUCs
The previous discussion on a single AUC can be modified to accommodate multiple correlated AUCs. A relevant scenario (Fig. 1(b)) is when we compare multiple classifiers using the same set of test data. In this case, the classifier scores are correlated; and this correlation must be properly accounted for in order to make correct inference about the observed difference in the classifier performance [17, 18].
Assume there are competing classifiers , and be the -th classifier scores for class 1 and class 2 features, respectively. The classifiers’ individual AUCs () and the AUC variance can be obtained from (1), (2), (4), and (12) by inserting the proper classifier index to the classifier scores. Furthermore, the correlation between the AUC estimates for the -th and -th classifier can be shown to be [1]
| (9) |
where , parallel to (5), are the kernel’s cross (central) moments:
| (10a) |
| (10b) |
| (10c) |
Similar to the single AUC case, the covariance expression (9) involves population quantities that need to be estimated from sample observations. From the theory of U-statistics, a consistent covariance estimate is
| (11) |
where, as in (7), and are the sample covariance of the structural components :
| (12a) |
| (12b) |
and are defined similar to (6) by inserting proper classifier indices.
3. Method
We first calculate the bias in the AUC variance estimates (8), (11). Then we consider the case of a single AUC, and show that the bias is always non-negative. We further extend our analysis to multiple correlated AUCs.
3.1. The bias in (8) and (11)
We consider the two terms in (8) separately, and define correspondingly the following short-hand notation:
then (8) is equivalent to . We show in the appendix that
| (13a) |
| (13b) |
Then combining (13a) and (13b),
| (14) |
where the underlined term is the bias. The numerator of the bias, , is a property of the population distribution; the bias in (14) is of the order , which may be non-negligible for small sample sizes but diminishes quickly as the sample size increases.
By inserting proper classifier indices, a similar derivation as above leads to the following bias expression for the covariance
| (15) |
3.2. The bias in (8) is non-negative
We define the following kernel conditional expectations that will be used shortly.
| (16a) |
| (16b) |
| (16c) |
Apparently is just ; this definition is simply for notational consistency. Note that all three random variables in (16) have mean . Further, it can be verified that the (co-)variance of these kernel conditional expectations can be related to the kernel moments (5), as shown in Table 1.
Table 1.
(Co-)variance of the kernel conditional expectations, where are the kernel (central) moments in (5).
| 0 | |||
| 0 | |||
As an example, we derive the first entry in Table 1. Starting from the definition of in (5a),
| (17) |
As the mean of is , (17) says that the central kernel moment is simply the variance of the conditional expectation . Similar derivations can verify the other entries in Table 1.
With Table 1 set up, we are ready to construct the random variable whose variance coincides with the bias in . Denote by the following quantity:
| (18) |
Obviously, . Aided by Table 1, the variance of is calculated as
| (19) |
Note that the right hand side of (19) coincides, up to a constant factor, with the bias in the variance estimate (14), establishing our claim that the bias is always non-negative.
3.3. Extension to covariance estimate of multiple AUCs
The previous result on a single AUC can be extended in a straightforward manner to multiple correlated AUCs. For this, we define as in (18) for each classifier :
| (20) |
where are modified from (16) by inserting the proper classifier index. Similar to (17), we can relate these kernel conditional expectations to the kernel cross moments (10). The results are tabulated in Table 2.
Table 2.
Cross covariance of the kernel conditional expectations, where are the kernel (central) moments in (10). The only difference with Table 1 is the insertion of classifier indices .
| 0 | |||
| 0 | |||
Using as a shorthand notation for (20), we assemble all of them from the classifiers to form
The covariance matrix of is of the form . Using Table 2, the entries of the covariance matrix are
| (21) |
Again, up to a constant, (21) coincides with the bias of the covariance estimate (15). As the covariance matrix (21) is always positive semi-definite, so is the bias (15).
3.4. Comments on the construction of V11
The construction of (18) can be motivated by the H-decomposition originally developed by Hoeffding [19] for analyzing U-statistics. Analogous forms of the decomposition can be found in [20, 21], and also [22, chapter 2] discusses the H-decomposition for generalized (multi-sample) U-statistics. It turns out that, for the two-sample, degree-1 U-statistic such as the AUC , this decomposition has a simple form.
Consider the following definition:
| (22a) |
| (22b) |
| (22c) |
From the expression , we can further deduce that
| (23a) |
| (23b) |
| (23c) |
where (23c) involves the expression . Summing all equations in (23), and recall , we arrive at the following decomposition of into the constituents (22):
| (24) |
Unlike the original expression of where all terms in the summation are correlated, it can be shown that in (24) all random variables are zero-mean and uncorrelated due to their construction (22). The decomposition form (24) often provides more insights into the analysis of variance (ANOVA) of .
Our discussion here is intentionally brief as for our purpose the decomposition form (24) is not needed per se but provides the background for the origin of . Interested readers should consult the publications we cited.
4. Numerical examples
We performed numerical studies to empirically verify the bias in DeLong’s (co-)variance estimate (8), (11). To obtain the ground truth (4), (9) for bias calculation, we assumed the classifier ratings , were random variables (r.v.s) following either (a) uni-variate normal for a single classifier or (b) bivariate normal, the correlation coefficient, for a pair of classifiers. Under these assumptions, the analytical results related to the ground truth calculation are provided in Appendix B.
Our numerical parameter setting was based on the application of DeLong’s approach to lesion detection using medical images. For such studies, it is often the case that the rating scores share a common (co-)variance. More specifically, we set the variance for all classifier scores (both class-1 and class-2), and varied the classifier correlation coefficient and the class mean score differences to achieve certain target AUC values. We considered two settings: (i) a single classifier, and (ii) a pair of classifiers. To estimate the empirical mean, we ran Monte Carlo (MC) trials of DeLong’s approach. These MC trials were repeated for different sample sizes that are relevant in medical imaging.
4.1. A single classifier
The classifier ratings were generated as independent uni-variate r.v.s, for class-1 and for class-2. We fixed , and adjusted to {0.358, 0.954, 1.812} to achieve AUCs of . The percent bias of AUC variance was defined as
| (25) |
where is the ground truth AUC variance (4), , for each MC trial , was calculated as in (12).
In Fig. 2, we show the ground truth AUC variance (, the denominator of (25)) on the left for reference, and show on the right the bias estimated from MC trials and the analytically calculated bias using (14). As the AUC increases, the ground truth AUC variance decreases while the percent bias increases. At each fixed AUC value, both the AUC variance itself and the bias (25) decrease as a function of the sample size. For the high AUC , the bias decreases from ~ 12% for the small sample size to under 1% as the sample size increases.
Fig. 2.

(Left) AUC ground truth variance (4) and (right) percent bias in AUC variance (25) using DeLong’s method for different sample sizes. The ratio of class-1 and class-2 samples was fixed at for all cases.
4.2. A pair of classifiers
The rating values of two correlated classifiers were simulated as bivariate normal r.v.s. for class-1 scores, and for class-2 scores. We fixed and , and adjusted to achieve a fixed and varying . Also, we varied the correlation coefficient to emulate both low and high correlation scenarios. A scalar measure of the covariance bias was defined as
| (26a) |
| (26b) |
where Det in (26a) is the matrix determinant, is the ground truth AUC covariance (9), and , for each , was calculated using DeLong’s approach (11). The square root in (26b) was to place the bias for the bi-variate case on an equal footing as the uni-variate case (25). The definition (26) ensures that the sign of the bias reflects the definiteness of the bias in the covariance matrix estimate.
In Fig. 3, we show on the left the baseline covariance for reference, and show on the right the bias estimated from MC trials and from the analytic result (15). For each sample size, a higher AUC or a higher correlation reduces the baseline covariance, while at the same time leads to a higher bias. As the sample size increases, both the covariance itself and the bias in the covariance decrease, ranging from ~ 10% for the small sample size to under 1% for the larger sample size.
Fig. 3.

(Left) Baseline covariance and the percent bias of the AUC covariance (26) for different sample sizes. The ratio of class-1 and class-2 samples was fixed at for all cases.
5. Summary and discussions
In this work, we showed that DeLong’s nonparametric approach always produces positively biased variance (for a single AUC) and covariance (for multiple correlated AUCs) estimates of the AUC statistics. Our approach is based on constructing a random variable whose (co-)variance coincides with the bias. The bias is of the order , where are the number of class-1 and class-2 observations. For moderate to large sample sizes, the bias would be negligible.
DeLong’s approach is quite popular in biomedicine [18, 23, 24] and has been applied to, in addition to AUC, many AUC variants such as the partial AUC [25], the clustered AUC [26], and the multi-class AUC [27]. The positive bias is expected to hold in these applications as well.
It is known that DeLong’s approach is equivalent to the jackknife variance estimation applied to the two sample U-statistics [28]. Other resampling methods, including the Monte Carlo bootstrap [29] and the ideal bootstrap [30], have also been used to assess the statistical variability of the AUC. Another interesting approach is the one-shot method [31, 32] that produces an unbiased variance estimate of the AUC. These alternative methods may potentially reduce or eliminate the bias in the AUC variance estimate. As the main utility of a variance estimator is for hypotheses testing and CI construction, it is important to consider both the bias and the variance [9]. For the one-sample U-statistics, these properties have been investigated both analytically and numerically for different variance estimation methods [33]. It is a natural next step to perform a similar analysis for the two-sample U-statistics such as the AUC.
Highlights.
We claim that the bias in DeLong’s AUC variance estimation is always non-negative.
We claim that the bias matrix in DeLong’s covariance estimation of multiple correlated AUCs is semi-positive definite.
We construct a random variable whose (co-)variance coincides with the bias, thereby establishing the claims.
Acknowledgment
The author thanks Frederic Noo, with whom the author had many discussions on related topics.
Appendix A. Calculation of the bias in (8)
For convenience, we copy the following definitions and notations from the main text.
| (A.1a) |
| (A.1b) |
| (A.1c) |
where is the AUC estimate, . and are the structural components (same as (6)):
| (A.2a) |
| (A.2b) |
Note that from (A.1a) and (A.2), we also have
| (A.3) |
Consider the following which differs only slightly from the summand in (A.1b) (instead of we use ):
| (A.4) |
where we use the shorthand notation . With simple algebraic manipulations, it is easy to check that
| (A.5) |
where and are defined in (5). Now rewrite to incorporate (A.4):
| (A.6) |
Taking expectations on both sides of (A.6), we obtain
| (A.7) |
which is (13a). A similar derivation can be carried out for (A.1c) to obtain (13b). The details are omitted.
Appendix B. A bivariate normal example
Let two classifiers generate correlated class-1 and class-2 ratings. We make the standard assumption that class-1 and class-2 ratings are independent; moreover, we assume
- follow a bivariate normal distribution with mean and covariance
- follow a bivariate normal distribution with mean and covariance
Denote by the cumulative distribution function (CDF) of the standard normal distribution, and BvN the CDF of a zero-mean, unit-variance, bivariate normal with the correlation coefficient :
| (B.1) |
In particular, .
For continuous random variables (r.v.s), the definition of AUC (1) simplifies.
| (B.2) |
Given our assumptions, is normally distributed with mean and variance . Then (B.2) can be evaluated using the standard normal CDF as
| (B.3) |
The continuous r.v. assumption also simplifies the kernel definition (3), which becomes if , and 0 otherwise. Then the kernel central moment (10) can be written as
| (B.4a) |
| (B.4b) |
| (B.4c) |
Similar to (B.2), all quantities in (B.4) can be expressed using BvN (B.1). These kernel moments can be plugged into (4), (9), (14), and (15) to calculate analytically the (co-)variance of the AUC(s) and the bias in the (co-)variance estimate of DeLong’s approach.
Appendix B.1. A pair of classifiers
We outline the steps using (B.4a) as an example. Define
then is a bivariate normally distributed r.v. with mean and covariance
| (B.5) |
The probability in (B.4a) can be evaluated as
| (B.6a) |
| (B.6b) |
| (B.6c) |
A similar derivation can be applied to other equations in (B.4) to obtain
| (B.7a) |
| (B.7c) |
| (B.7b) |
| (B.7d) |
In this work, we calculate BvN in (B.6),(B.7) using Owen’s T function1 [34] which is readily available in standard libraries such as Scipy.
Appendix B.2. A single classifier
Let in the previous section, the covariance between two classifiers and in e.g., (B.5), coincides with the variance. In other words, applying the substitution and in (B.6c), (B.7c), (B.7d), and omitting the classifier index, we have
Plugging them into (B.6a), (B.7a), (B.7b),
where (a) is due to a relationship between BvN and Owen’s T function [34], (b) is from the property that from (B.6b), and is the AUC (B.3).
Footnotes
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
A geometric interpretation of is that where are independent random variables following the standard normal distribution.
Data availability
Data will be made available upon request.
References
- [1].DeLong ER, DeLong DM, Clarke-Pearson DL, Comparing the areas under two or more correlated receiver operating characteristic curves: a nonparametric approach, Biometrics (1988) 837–845. [PubMed] [Google Scholar]
- [2].Metz CE, Basic principles of ROC analysis, in: Seminars in nuclear medicine, Vol. 8, Elsevier, 1978, pp. 283–298. [DOI] [PubMed] [Google Scholar]
- [3].Bradley AP, The use of the area under the ROC curve in the evaluation of machine learning algorithms, Pattern recognition 30 (7) (1997) 1145–1159. [Google Scholar]
- [4].Fawcett T, An introduction to ROC analysis, Pattern recognition letters 27 (8) (2006) 861–874. [Google Scholar]
- [5].Hajian-Tilaki K, Receiver operating characteristic (ROC) curve analysis for medical diagnostic test evaluation, Caspian journal of internal medicine 4 (2) (2013) 627. [PMC free article] [PubMed] [Google Scholar]
- [6].Tohka J, Van Gils M, Evaluation of machine learning algorithms for health and wellness applications: A tutorial, Computers in Biology and Medicine 132 (2021) 104324. [DOI] [PubMed] [Google Scholar]
- [7].Yang T, Ying Y, AUC maximization in the era of big data and AI: A survey, ACM Computing Surveys 55 (8) (2022) 1–37. [Google Scholar]
- [8].Mann HB, Whitney DR, On a test of whether one of two random variables is stochastically larger than the other, The annals of mathematical statistics (1947) 50–60. [Google Scholar]
- [9].Simonoff JS, The relative importance of bias and variability in the estimation of the variance of a statistic, Journal of the Royal Statistical Society Series D: The Statistician 42 (1) (1993) 3–7. [Google Scholar]
- [10].Hurvich CM, Simonoff1 JS, Zeger SL, Variance estimation for sample autocovariances: direct and resampling approaches, Australian Journal of Statistics 33 (1) (1991) 23–42. [Google Scholar]
- [11].Hajian-Tilaki KO, Hanley JA, Comparison of three methods for estimating the standard error of the area under the curve in ROC analysis of quantitative data, Academic Radiology 9 (11) (2002) 1278–1285. [DOI] [PubMed] [Google Scholar]
- [12].Bamber D, The area above the ordinal dominance graph and the area below the receiver operating characteristic graph, Journal of mathematical psychology 12 (4) (1975) 387–415. [Google Scholar]
- [13].Hanley JA, McNeil BJ, The meaning and use of the area under a receiver operating characteristic ROC curve, Radiology 143 (1) (1982) 29–36. [DOI] [PubMed] [Google Scholar]
- [14].Noether GE, Elements of nonparametric statistics (The SIAM series in applied mathematics), Wiley, 1967. [Google Scholar]
- [15].Hettmansperger TP, Statistical Inference Based on Ranks, 1st Edition, Wiley, New York, 1984. [Google Scholar]
- [16].Sen PK, On some convergence properties of U-statistics, Calcutta Statistical Association Bulletin 10 (1–2) (1960) 1–18. [Google Scholar]
- [17].Wu JC, Wilson CL, Nonparametric analysis of fingerprint data on large data sets, Pattern Recognition 40 (9) (2007) 2574–2584. [Google Scholar]
- [18].Dadsetan S, Arefan D, Berg WA, Zuley ML, Sumkin JH, Wu S, Deep learning of longitudinal mammogram examinations for breast cancer risk prediction, Pattern Recognition 132 (2022) 108919. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [19].Hoeffding W, The strong law of large numbers for u-statistics, Tech. rep., North Carolina State University. Dept. of Statistics; (1961). [Google Scholar]
- [20].Rubin H, Vitale R, Asymptotic distribution of symmetric statistics, The Annals of Statistics (1980) 165–170. [Google Scholar]
- [21].Efron B, Stein C, The jackknife estimate of variance, The Annals of Statistics (1981) 586–596. [Google Scholar]
- [22].Lee AJ, U-statistics: Theory and Practice, Routledge, 2019. [Google Scholar]
- [23].Wade BS, Joshi SH, Gutman BA, Thompson PM, Machine learning on high dimensional shape data from subcortical brain surfaces: A comparison of feature selection and classification methods, Pattern Recognition 63 (2017) 731–739. [Google Scholar]
- [24].Scalzo F, Liebeskind D, Hu X, Reducing false intracranial pressure alarms using morphological waveform features, IEEE Transactions on biomedical engineering 60 (1) (2012) 235–239. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [25].He Y, Escobar M, Nonparametric statistical inference method for partial areas under receiver operating characteristic curves, with application to genomic studies, Statistics in medicine 27 (25) (2008) 5291–5308. [DOI] [PubMed] [Google Scholar]
- [26].Obuchowski NA, Nonparametric analysis of clustered ROC curve data, Biometrics (1997) 567–578. [PubMed] [Google Scholar]
- [27].Hand DJ, Till RJ, A simple generalisation of the area under the ROC curve for multiple class classification problems, Machine learning 45 (2) (2001) 171–186. [Google Scholar]
- [28].Arvesen JN, Jackknifing U-statistics, The Annals of Mathematical Statistics 40 (6) (1969) 2076–2100. [Google Scholar]
- [29].Mossman D, Resampling techniques in the analysis of non-binormal ROC data, Medical decision making 15 (4) (1995) 358–366. [DOI] [PubMed] [Google Scholar]
- [30].Bandos AI, Rockette HE, Gur D, Exact bootstrap variances of the area under ROC curve, Communications in Statistics – Theory and Methods 36 (13) (2007) 2443–2461. [Google Scholar]
- [31].Gallas BD, One-shot estimate of MRMC variance: AUC, Academic radiology 13 (3) (2006) 353–362. [DOI] [PubMed] [Google Scholar]
- [32].Tcheuko L, Gallas B, Samuelson F, Using ANOVA/randomeffects variance estimates to compute a two-sample U-statistic of order (1, 1) estimate of variance, Journal of Statistical Theory and Practice 10 (2016) 87–99. [Google Scholar]
- [33].Lee A, On estimating the variance of a U-statistic, Communications in Statistics-Theory and Methods 14 (2) (1985) 289–301. [Google Scholar]
- [34].Owen DB, Tables for computing bivariate normal probabilities, The Annals of Mathematical Statistics 27 (4) (1956) 1075–1090. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
Data will be made available upon request.
