Diagnostic Accuracy and Agreement
Estimates the total sample size needed to obtain two-sided confidence intervals for both diagnostic sensitivity and specificity with a specified precision. The calculation accounts for disease prevalence, so the required numbers of disease-positive and disease-negative participants are translated into a whole-study sample size.
Sensitivity is the proportion of participants with the target condition who test positive, while specificity is the proportion of participants without the condition who test negative. For a diagnostic accuracy study, the two precision requirements depend on different subsets of the enrolled population.
This calculator uses the simple asymptotic, or Wald, approximation for a two-sided confidence interval. For an anticipated proportion p based on n participants, the approximate interval is:
The calculation first determines how many disease-positive participants are needed to estimate sensitivity and how many disease-negative participants are needed to estimate specificity. Prevalence then converts those two quantities into total study sample sizes:
This follows the relevant methodological literature's description of the one-sample sensitivity/specificity confidence-interval procedure: the sensitivity calculation first determines the required number of condition-positive individuals, while the specificity calculation determines the required number of condition-negative individuals; prevalence is then used to obtain the corresponding whole-table sample sizes, with the larger requirement determining the final sample size.
this method provides a validation example based on Hajian-Tilaki (2014): 95% confidence, anticipated sensitivity of 0.80, specificity of 0.80, disease prevalence of 0.10, and a two-sided confidence-interval width of 0.14 (equivalent to ±0.07 precision). This yields 1260 total subjects, with 126 disease-positive subjects required for sensitivity and 126 disease-negative subjects required for specificity before prevalence adjustment. After accounting for the 10% prevalence, sensitivity requires 1260 total subjects, while specificity requires 140; therefore the final sample size is 1260.
The calculator reproduces this this method validation result. The optional dropout adjustment is applied after the evaluable sample size is determined:
The anticipated sensitivity and specificity are planning assumptions. If the actual sensitivity or specificity differs from the assumed value, the achieved confidence-interval width may differ from the target. The normal approximation is most appropriate when the relevant condition-positive and condition-negative sample sizes are sufficiently large; exact or score-based intervals may be preferable for small samples or proportions near 0 or 1.
Buderer, N. M. (1996). Statistical methodology: I. Incorporating the prevalence of disease into the sample size calculation for sensitivity and specificity. Academic Emergency Medicine, 3(9), 895–900. DOI: 10.1111/j.1553-2712.1996.tb03538.x.
Hajian-Tilaki, K. (2014). Sample size estimation in diagnostic test studies of biomedical informatics. Journal of Biomedical Informatics, 48, 193–204. DOI: 10.1016/j.jbi.2014.02.013.
the software, LLC. this method Sample Size Software: Confidence Intervals for One-Sample Sensitivity and Specificity, Chapter 273.