Ask Mallard
Study design

Sample size for a diagnostic accuracy study

4 min read

Size the diseased and nondiseased groups for precision, then use prevalence to find the larger total needed in one diagnostic cohort.

NHMRC EVIDENCE LEVEL · 2009Not yet classified · Diagnostic accuracyProvisional design classification. Study quality and certainty of findings require separate appraisal.
Why this level?The design family and its defining features have not been specified for this hierarchy. NHMRC 2009 source

This 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

Before you start

What you need

Decide these first
  1. Expected sensitivitySupply a value strictly between zero and one: the share with the condition who test positive.
  2. Expected specificitySupply a value strictly between zero and one: the share without the condition who test negative.
  3. Disease prevalenceSupply the expected fraction with the condition in the sampled population, strictly between zero and one.
  4. Common interval half-widthSupply the desired half-width for both estimates, strictly between zero and 0.5.
  5. Confidence level through alphaAlpha defaults to 0.05, giving 95 percent confidence. Target power is not used.
It rests on these
  1. 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.
  2. The reference standard determines disease status without selective verification.How to check: Plan reference assessment for everyone and a named assumption for missing results.
  3. 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.

From assumptions to a total
Expected sensitivity, specificity and half-width. Then Separate diseased and nondiseased counts. Then Larger prevalence-adjusted enrollment total.Sample size for a diagnostic accuracy studyExpected sensitivity,specificity and half-widthSeparate diseased andnondiseased countsLarger prevalence-adjustedenrollment totalDivide by prevalence for sensitivity and by one minus prevalence for specificity.
Conceptual diagram. It shows the structure of the idea, not data from any study.
What the target means

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

Invented for illustration
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

Searching PubMed…

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.

No Mallard code example points to this page.
Atlas node 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.

Code for this method
Loading…

Related Learn pages

Related designs and methods

Evidence

Sources & further reading

  1. 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
  2. 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
  3. STARD 2015 guidelines for reporting diagnostic accuracy studies: explanation and elaboration (opens in a new tab) · BMJ Open · doi 10.1136/bmjopen-2016-012799
Prepared with AI assistance. PubMed records were matched by title, authors, year and DOI on 2026-11-06: record verified, confirm it supports this use. Buderer is the implemented normal-approximation method. Flahault and colleagues discuss diagnostic design precision using a different binomial method; Mallard does not implement that method here. STARD supports reporting, not this sizing formula; its PubMed record was also matched by title, authors, year and DOI. Rounding was checked against Mallard’s engine. No independent professional approval is claimed.
Last source review: 2026-11-06
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.