Inferensys

Glossary

DeLong Test

A non-parametric statistical test used to compare the areas under two or more correlated Receiver Operating Characteristic curves derived from the same set of cases.
Strategy consultant facilitating AI use case discovery workshop, sticky notes on glass wall, casual corporate meeting.
STATISTICAL METHODOLOGY

What is DeLong Test?

A non-parametric approach for comparing the diagnostic accuracy of correlated classification systems.

The DeLong test is a non-parametric statistical method for comparing the areas under two or more correlated Receiver Operating Characteristic (ROC) curves derived from the same set of cases. It provides a direct statistical comparison of the overall diagnostic accuracy of different tests or models without assuming a specific data distribution.

Unlike simple comparisons of point estimates, the DeLong test accounts for the correlation between AUCs that arises when multiple diagnostic systems are evaluated on identical subjects. It computes a covariance matrix of the AUC estimators, enabling a chi-squared test to determine if observed performance differences are statistically significant rather than random variation.

DeLong Test

Key Statistical Properties

Essential statistical concepts for comparing the discriminative performance of correlated diagnostic models using the DeLong test.

01

Correlated ROC Curves

The DeLong test is specifically designed to compare Receiver Operating Characteristic (ROC) curves that are correlated—meaning they are derived from the same set of cases. This is the standard scenario when comparing two diagnostic models or two imaging modalities on a single patient cohort. Standard tests for independent samples would produce inflated Type I error rates in this context. The test accounts for the covariance structure between the Area Under the Curve (AUC) estimates.

02

Non-Parametric Foundation

Unlike parametric methods that assume a specific distribution (e.g., binormal), the DeLong test is non-parametric. It uses the structural components of the Mann-Whitney U-statistic to estimate the variance-covariance matrix of the AUCs. This makes it robust to violations of normality and particularly suitable for the often non-Gaussian distributions of prediction scores in machine learning models. The method relies on asymptotic theory, making it valid for sufficiently large sample sizes.

03

Variance-Covariance Estimation

The core mathematical innovation of the DeLong test is its method for estimating the variance-covariance matrix of multiple AUC estimators. It computes a covariance for every pair of models being compared by evaluating the variability contributed by each individual case. This matrix is then used to construct a chi-squared test statistic to evaluate the null hypothesis that all AUCs are equal. The test statistic is calculated as:

  • χ² = (Lθ)' [LSL']⁻¹ (Lθ) where θ is the vector of AUCs and S is the covariance matrix.
04

Pairwise vs. Omnibus Comparison

The DeLong test can be applied in two modes:

  • Omnibus Test: Evaluates the global null hypothesis that all k models have identical AUCs. A significant result indicates at least one model differs.
  • Pairwise Post-hoc: If the omnibus test is significant, or if only two models are compared, the test provides a direct contrast between two specific AUCs. This yields a z-statistic and a p-value for the difference between two models, allowing for direct head-to-head comparisons of diagnostic performance.
05

Assumptions and Limitations

The DeLong test relies on several key assumptions:

  • Asymptotic Normality: The test is valid for large samples; performance may be unreliable with very small case numbers.
  • Identical Cases: All models must be evaluated on the exact same set of subjects. Missing data for one model violates the correlation structure.
  • Binary Outcome: The standard formulation requires a binary ground truth (diseased vs. non-diseased). Extensions exist for ordinal outcomes.
  • Independent Observations: The test assumes cases are independent; it does not natively handle clustered data (e.g., multiple lesions per patient) without modification.
06

Implementation in Software

The DeLong test is widely available in statistical and machine learning libraries:

  • R: The pROC package provides the roc.test() function with method="delong".
  • Python: The compare_auc_delong_xu function in the mlxtend library implements the test. The scikit-learn ecosystem does not have a native implementation, but custom code using the U-statistic formulation is straightforward.
  • MedCalc: A dedicated medical statistics software that offers a graphical interface for DeLong comparisons.
  • STATA: The roccomp command performs the test.
STATISTICAL METHODOLOGY COMPARISON

DeLong Test vs. Other AUC Comparison Methods

A comparison of the DeLong test against alternative statistical approaches for comparing the areas under correlated Receiver Operating Characteristic curves derived from the same set of cases.

FeatureDeLong TestHanley-McNeilBootstrap TestVenkatraman's Permutation

Statistical Framework

Non-parametric

Parametric (binormal)

Non-parametric

Non-parametric

Handles Correlated Data

Distribution Assumptions

None

Binormal ROC curves

None

None

Variance Estimation

Analytic (U-statistics)

Analytic (delta method)

Empirical resampling

Permutation-based

Computational Complexity

Low

Low

High

Medium

Small Sample Robustness

Moderate

Low

High

High

Software Availability

Widespread (pROC, SAS)

Limited

Widespread

Limited

Standard Error of AUC Difference

Directly computed

Approximated

Empirically derived

Empirically derived

STATISTICAL COMPARISON OF DIAGNOSTIC MODELS

Frequently Asked Questions

The DeLong test is a cornerstone of clinical validation for diagnostic AI. These answers address the most common statistical and practical questions engineers and clinical researchers encounter when comparing the performance of two correlated ROC curves.

The DeLong test is a non-parametric statistical method for comparing the areas under two or more correlated Receiver Operating Characteristic (ROC) curves derived from the same set of cases. It works by computing the AUC for each diagnostic model and then estimating the variance-covariance matrix of these AUCs using the theory of U-statistics. Specifically, the test calculates a chi-square statistic based on the difference in AUCs, accounting for the correlation induced by evaluating both models on identical patient data. This correlation structure is critical; ignoring it by using a standard t-test for independent samples would inflate the Type I error rate. The test's null hypothesis is that the true AUCs are equal, and a significant p-value indicates that one model possesses superior discriminative ability.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.