Statistical Calculators › Diagnostic Accuracy and Agreement › ROC Curve: Area Under the Curve (AUC) Sample Size
← All Calculators

Diagnostic Accuracy and Agreement

ROC Curve: Area Under the Curve (AUC) Sample Size

Calculate the sample size required to estimate the area under a receiver operating characteristic (ROC) curve with a specified two-sided confidence-interval width. The calculation uses the Hanley–McNeil approximation to the variance of the AUC and supports unequal numbers of positive and negative subjects.

Study Design

Specify the anticipated AUC, confidence level, desired confidence-interval width, and positive-to-negative allocation.

Required Sample Size

The result is the smallest integer allocation whose estimated two-sided CI width is no greater than the requested width.
Enter the study assumptions and click Calculate Sample Size.

Methodology

This calculator plans the sample size for estimating a single ROC curve area under the curve (AUC). The AUC is the probability that a randomly selected subject with the condition receives a higher diagnostic score than a randomly selected subject without the condition. This interpretation and the variance approximation used here were described by Hanley and McNeil (1982).

AUC variance

For a study containing N+ positive subjects and N negative subjects, the Hanley–McNeil approximation uses:

Q1 = AUC / (2 − AUC)
Q2 = 2AUC2 / (1 + AUC)

Var(AUC) = [AUC(1 − AUC) + (N+ − 1)(Q1 − AUC2) + (N − 1)(Q2 − AUC2)] / (N+N)

The estimated standard error is the square root of this variance. A large-sample two-sided confidence interval is then formed as AUC ± z1−α/2SE. The requested total confidence-interval width is therefore approximately 2z1−α/2SE.

Sample-size search

The calculator searches over integer positive-group sample sizes. For an allocation ratio R = N/N+, the negative-group sample size is calculated as N = R N+, with the resulting allocation rounded upward to whole subjects. The first allocation whose estimated CI width is no greater than the requested width is reported.

For equal allocation, the calculation reproduces the published PASS example: with a 95% confidence level, AUC = 0.70, and a confidence-interval width of 0.05, the required sample is 830 positive and 830 negative subjects, for 1,660 total subjects.

Important interpretation

This procedure is an estimation-precision calculation: it determines sample size for a desired confidence-interval width around a single AUC. It is different from a hypothesis test comparing an observed AUC with a reference AUC such as 0.50, and different from sample-size calculations for comparing two correlated or independent ROC curves.

References

1. Hanley, J. A., & McNeil, B. J. (1982). The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology, 143(1), 29–36. PMID: 7063747.

2. NCSS. PASS Sample Size Software: Confidence Intervals for the Area Under an ROC Curve. PASS documentation. The published PASS example uses a two-sided 95% confidence level, equal positive/negative allocation, and reports 830 subjects in each group for AUC = 0.70 and CI width = 0.05.

3. Statsols. nQuery Sample Size Procedures: Confidence Interval for Area Under the Curve (AUC). nQuery includes an AUC confidence-interval sample-size procedure (AOC6).