Sample size for a diagnostic accuracy study
Size the diseased and nondiseased groups for precision, then use prevalence to find the larger total needed in one diagnostic cohort.
Why this level?
The design family and its defining features have not been specified for this hierarchy. NHMRC 2009 sourceThis page teaches a precision calculation, not an evidence grade. Sample size alone cannot determine a diagnostic study’s placement. The reference standard, recruitment, blinding and independence must be specified for the actual study before a level can be assigned.
Fit
When to use it, and when not to
Use it when
- You recruit one cohort in which each patient gets the index test and reference standard.
- You need precise sensitivity and specificity at a prespecified test threshold.
Not when
- You recruit fixed numbers of known cases and controls. Plan their separate counts rather than prevalence-based cohort enrollment. Read: Diagnostic accuracy study
- You compare two tests in the same patients. Plan a paired comparison using expected discordance. Read: McNemar’s test
- You ask whether testing improves patient outcomes. Plan a diagnostic-impact study. Read: Diagnostic impact (test-treatment) studies
Before you start
What you need
- Expected sensitivitySupply a value strictly between zero and one: the share with the condition who test positive.
- Expected specificitySupply a value strictly between zero and one: the share without the condition who test negative.
- Disease prevalenceSupply the expected fraction with the condition in the sampled population, strictly between zero and one.
- Common interval half-widthSupply the desired half-width for both estimates, strictly between zero and 0.5.
- Confidence level through alphaAlpha defaults to 0.05, giving 95 percent confidence. Target power is not used.
- Patients form an independent cohort with a credible disease prevalence.How to check: Use the intended clinical setting. Enriching the sample changes the prevalence-based enrollment calculation.
- The reference standard determines disease status without selective verification.How to check: Plan reference assessment for everyone and a named assumption for missing results.
- A normal planning approximation suits the expected counts.How to check: Review rare disease or near-perfect accuracy with a statistician. Use suitable final intervals, such as Wilson, when reporting results.
Plain language
How it works
Buderer’s method sizes each accuracy measure as a proportion. Mallard multiplies the squared normal confidence quantile by the expected proportion times one minus that proportion. It divides by the squared target half-width, then rounds each disease-status count upward.
It divides the diseased count by prevalence and the nondiseased count by one minus prevalence. Each total is rounded upward; the larger governs because one cohort supplies both groups. Ties are labeled sensitivity. Choosing a sample-size method distinguishes precision from hypothesis-test power. The engine does not add missing-data or nonresponse allowances.
Worked example
A worked example
- Setting
- A clinic plans one diagnostic cohort, with both the index test and reference standard for each patient.
- Question
- How large should the cohort be to estimate sensitivity and specificity with a common half-width?
- Approach
- Enter sens = 0.9, spec = 0.85, prev = 0.2, width = 0.05 and alpha = 0.05.
- Result
- Mallard needs 139 diseased and 196 nondiseased patients. The sensitivity total is 695; the specificity total is 245. It returns 695 overall.
- What it means
- Prevalence is 20 in 100. Sensitivity governs this example. The common target is a five-percentage-point half-width at 95 percent confidence, not a power target.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
Buderer’s normal approximation plans interval precision, not power. The larger prevalence-adjusted total governs; it does not guarantee the required disease counts or interval coverage.
- Sizing only sensitivity.Instead: Calculate both prevalence-adjusted totals and take the larger.
- Dividing both group counts by disease prevalence.Instead: Divide the nondiseased count by one minus prevalence.
- Calling planned precision guaranteed coverage.Instead: Check attained counts and use a suitable analysis interval. The normal sizing approximation does not establish exact coverage.
Inside Mallard
How Mallard uses this
Mallard returns required diseased and nondiseased counts, both prevalence-adjusted totals, their larger total and which estimate governs. It also returns approximate half-width, not power.
design.diagnostic_accuracy_sample_size, the id a plan cue records.How to report it
Use STARD 2015 to report the planned sample size, how it was determined and all precision assumptions. State expected sensitivity, specificity, prevalence, confidence level and target half-width. STARD supports transparent reporting; it does not validate the sizing approximation. A reporting guideline is not a design manual: use it to make the study transparent, not as a substitute for careful design. Check the target journal's own requirements as well, which this page cannot know.
Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Statistical methodology: I. Incorporating the prevalence of disease into the sample size calculation for sensitivity and specificity (opens in a new tab) · Acad Emerg Med · doi 10.1111/j.1553-2712.1996.tb03538.x
- Sample size calculation should be performed for design accuracy in diagnostic test studies (opens in a new tab) · J Clin Epidemiol · doi 10.1016/j.jclinepi.2004.12.009
- STARD 2015 guidelines for reporting diagnostic accuracy studies: explanation and elaboration (opens in a new tab) · BMJ Open · doi 10.1136/bmjopen-2016-012799