PracticeVideosBlogFlashcards

Diagnostic Test Accuracy, Statistical Inference, and Hypothesis Testing

Key Takeaways

  • Sensitivity and specificity describe test performance at a given threshold but can vary with case mix, disease stage and clinical setting, whereas Positive Predictive Value (PPV) plummets and Negative Predictive Value (NPV) rises as disease prevalence decreases in screening populations.

  • Likelihood Ratios (LR+=Sens/(1−Spec)LR+ = \text{Sens} / (1 - \text{Spec}), LR−=(1−Sens)/SpecLR- = (1 - \text{Sens}) / \text{Spec}) circumvent the prevalence-dependency of predictive values, enabling bedside conversion of pre-test probability to post-test probability using the Fagan nomogram and odds-based Bayesian equations.

  • Receiver Operating Characteristic (ROC) curves plot Sensitivity against 1−Specificity1 - \text{Specificity} across continuous diagnostic cut-offs; the Area Under the Curve (AUC / c-statistic) summarizes discriminatory capacity, with the Youden index (J=Sens+Spec−1J = \text{Sens} + \text{Spec} - 1) maximizing the equally weighted sum of sensitivity and specificity rather than determining every clinical threshold.

  • Variable selection dictates statistical test choices: normally distributed continuous data are characterized by mean and standard deviation and analyzed via parametric tests (Student's t-test, ANOVA), whereas skewed distributions (e.g., CRP, length of hospital stay) are often summarized by median and interquartile range (IQR) and assessed with non-parametric tests (Mann-Whitney U, Wilcoxon signed-rank, Kruskal-Wallis).

  • Statistical power (1−β1 - \beta, standard ≥80%\ge 80\%) guards against Type II false-negative errors; multivariable linear regression models continuous variables, while multivariable logistic regression computes adjusted odds ratios (aORaOR) for binary paediatric outcomes while adjusting for multiple baseline covariates.

Last updated: November 2026

Diagnostic Test Accuracy, Statistical Inference, and Hypothesis Testing

Bedside paediatric practice constantly demands the interpretation of diagnostic investigations—from rapid antigen detection tests in the emergency department to high-throughput genetic sequencing in the neonatology unit. Accurately appraising whether a diagnostic result rules in or rules out an illness requires fluency in test performance metrics and Bayesian reasoning. Concurrently, understanding clinical trials and laboratory studies requires a solid mastery of inferential biostatistics, hypothesis testing, data distributions, and regression modeling.


Diagnostic Accuracy Metrics and the Influence of Prevalence

Evaluating any diagnostic test begins by cross-tabulating its results against an established "gold standard" (definitive reference standard) in a standard 2x2 diagnostic contingency matrix:

                                  [Gold Standard (True Disease State)]
                                  Disease Present        Disease Absent
                             +----------------------+----------------------+
Index Test      Positive (+) | True Positive (TP)   | False Positive (FP)  | -> PPV = TP / (TP + FP)
Result          Negative (-) | False Negative (FN)  | True Negative (TN)   | -> NPV = TN / (FN + TN)
                             +----------------------+----------------------+
                               Total Diseased         Total Non-Diseased
                                 (TP + FN)              (FP + TN)
                                     |                      |
                                     v                      v
                            Sens = TP / (TP+FN)    Spec = TN / (FP+TN)

Intrinsic Test Parameters: Sensitivity and Specificity

  1. Sensitivity (True Positive Rate):

    • The mathematical probability that a test is positive when the patient truly has the disease. Sensitivity=TPTP+FN\text{Sensitivity} = \frac{TP}{TP + FN}
    • The SnNOut Rule: A test with very high Sensitivity, when Negative, helps rule OUT disease. Check the negative likelihood ratio and pre-test probability before excluding a clinically important diagnosis. High-sensitivity tests are mandatory for screening protocols where missing a diagnosis is catastrophic (e.g., newborn bloodspot screening for congenital hypothyroidism, phenylketonuria).
  2. Specificity (True Negative Rate):

    • The mathematical probability that a test is negative when the patient is truly free of the disease. Specificity=TNTN+FP\text{Specificity} = \frac{TN}{TN + FP}
    • The SpPIn Rule: A test with very high Specificity, when Positive, helps rule IN disease. Diagnostic certainty still depends on sensitivity, the positive likelihood ratio and pre-test probability. High-specificity tests are critical for confirmatory testing before initiating toxic, invasive, or irreversible therapies (e.g., confirmatory sweat chloride testing for cystic fibrosis, Western blot/PCR in HIV).

Extrinsic Test Parameters: Predictive Values and the Prevalence Paradox

With sensitivity and specificity held fixed for the comparison,Positive Predictive Value (PPV) and Negative Predictive Value (NPV) depend heavily on the prevalence of the disease in the tested population.

  • Positive Predictive Value (PPVPPV): PPV=TPTP+FP\text{PPV} = \frac{TP}{TP + FP}
  • Negative Predictive Value (NPVNPV): NPV=TNTN+FN\text{NPV} = \frac{TN}{TN + FN}
                          [The Prevalence Paradox Matrix]

   As Disease Prevalence DECREASES in the Tested Population:
   ---------------------------------------------------------
   - Positive Predictive Value (PPV)  --> PLUMMETS PRECIPITOUSLY
   - Negative Predictive Value (NPV)  --> RISES TOWARD 100%
   - False Positive Proportion        --> RISES TO DOMINATE POSITIVE TESTS

The Prevalence Paradox Illustrated

Consider a rapid urinary antigen test with 95%95\% sensitivity and 95%95\% specificity evaluated in two distinct clinical cohorts of 1,000 children:

  1. High-Prevalence Specialty Ward (20%20\% Prevalence, N=1,000N = 1,000):

    • Diseased children = 200; Non-diseased children = 800.
    • TP=200×0.95=190TP = 200 \times 0.95 = 190; FN=10FN = 10.
    • TN=800×0.95=760TN = 800 \times 0.95 = 760; FP=40FP = 40.
    • PPV=190190+40=190230=82.6%PPV = \frac{190}{190 + 40} = \frac{190}{230} = 82.6\%.
  2. Low-Prevalence Community Screening Clinic (1%1\% Prevalence, N=1,000N = 1,000):

    • Diseased children = 10; Non-diseased children = 990.
    • TP=10×0.95=9.5TP = 10 \times 0.95 = 9.5; FN=0.5FN = 0.5.
    • TN=990×0.95=940.5TN = 990 \times 0.95 = 940.5; FP=49.5FP = 49.5.
    • PPV=9.59.5+49.5=9.559=16.1%PPV = \frac{9.5}{9.5 + 49.5} = \frac{9.5}{59} = 16.1\%.

Key Clinical Lesson: In the low-prevalence population, despite excellent 95%95\% sensitivity and 95%95\% specificity, over 83%83\% of all positive tests are false positives. This mathematical reality explains why routine screening of asymptomatic low-risk children (e.g., screening for urinary tract infection in afebrile, asymptomatic toddlers) produces unacceptable false-positive rates and inappropriate antibiotic overuse.


Likelihood Ratios, Pre-/Post-Test Probability, and the Fagan Nomogram

To overcome the prevalence-dependence of PPV and NPV, evidence-based medicine utilizes Likelihood Ratios (LRs). Likelihood ratios express how many times more likely a particular test result is to occur in patients with the target disorder compared to individuals without the disorder.

Definitions and Formulas

  1. Positive Likelihood Ratio (LR+LR+):
    • Ratio of the probability of a positive test in diseased patients to the probability of a positive test in non-diseased individuals. LR+=Sensitivity1−Specificity=True Positive RateFalse Positive RateLR+ = \frac{\text{Sensitivity}}{1 - \text{Specificity}} = \frac{\text{True Positive Rate}}{\text{False Positive Rate}}
  2. Negative Likelihood Ratio (LR−LR-):
    • Ratio of the probability of a negative test in diseased patients to the probability of a negative test in non-diseased individuals. LR−=1−SensitivitySpecificity=False Negative RateTrue Negative RateLR- = \frac{1 - \text{Sensitivity}}{\text{Specificity}} = \frac{\text{False Negative Rate}}{\text{True Negative Rate}}

Clinical Interpretation of Likelihood Ratios

Likelihood RatioShift from Pre-Test to Post-Test ProbabilityClinical Impact in Paediatric Practice
LR+>10LR+ > 10Large increase in oddsStrong evidence; interpret with pre-test probability
LR+=5−10LR+ = 5 - 10Moderate increase in oddsSubstantially shifts clinical suspicion
LR+=2−5LR+ = 2 - 5Small increase in oddsWeakly helpful; requires further testing
LR=1.0LR = 1.0No change in probability (0%0\% shift)Completely uninformative test
LR−=0.2−0.5LR- = 0.2 - 0.5Small decrease in oddsWeakly helpful; does not reliably rule out
LR−=0.1−0.2LR- = 0.1 - 0.2Moderate decrease in oddsMeaningfully lowers suspicion
LR−<0.1LR- < 0.1Large decrease in oddsStrong evidence; exclusion depends on starting risk

Bedside Bayesian Workflow and the Fagan Nomogram

Likelihood ratios integrate seamlessly with Bayes' Theorem to convert clinical suspicion (pre-test probability) into an updated diagnostic probability (post-test probability):

Pre-test Odds=Pre-test Probability1−Pre-test Probability\text{Pre-test Odds} = \frac{\text{Pre-test Probability}}{1 - \text{Pre-test Probability}} Post-test Odds=Pre-test Odds×Likelihood Ratio\text{Post-test Odds} = \text{Pre-test Odds} \times \text{Likelihood Ratio} Post-test Probability=Post-test Odds1+Post-test Odds\text{Post-test Probability} = \frac{\text{Post-test Odds}}{1 + \text{Post-test Odds}}

                    [Bayesian Workflow Underlying the Fagan Nomogram]

Pre-test probability     Convert to odds       Multiply by LR       Convert to probability
        10%           ->   0.10 / 0.90     ->   0.111 x20 =2.222  ->   2.222 /3.222 =69%

On a correctly scaled Fagan nomogram, join the pre-test probability and LR
with a straight line and read the post-test probability on the third scale.

Illustrative Bedside Application: Assume an infant with fever without source has a pre-test probability of acute pyelonephritis of 10%10\%. For this calculation, suppose a validated urine-test result has an LR+LR+ of 2020. Drawing a straight line on the Fagan nomogram through 10%10\% on the left axis and 2020 in the center axis intersects the right axis at a post-test probability of approximately 70%70\%, warranting immediate empirical antibiotic coverage while awaiting culture results.


ROC Curves and Area Under the Curve (AUC)

Many paediatric laboratory tests provide continuous numerical measurements (e.g., serum C-reactive protein, procalcitonin, sweat chloride, serum ferritin). For continuous markers, every individual cut-off point yields a different combination of sensitivity and specificity.

                     [ROC Curves: Illustrative Coordinates]
Horizontal axis: False Positive Rate (1 -Specificity)
Vertical axis: Sensitivity

Chance diagonal: (0,0) ->(0.25,0.25) ->(0.5,0.5) ->(1,1)
Good curve:      (0,0) ->(0.10,0.65) ->(0.30,0.85) ->(1,1)
Perfect curve:   (0,0) ->(0,1) -------------------->(1,1)

The good curve lies above the chance diagonal; the perfect curve
follows the left and top borders and has AUC=1.

Anatomy of the ROC Curve

  • Vertical Axis (Y-axis): Sensitivity (True Positive Rate), ranging from 0.00.0 to 1.01.0.
  • Horizontal Axis (X-axis): 1−Specificity1 - \text{Specificity} (False Positive Rate), ranging from 0.00.0 to 1.01.0.
  • The Chance Line: The 45-degree diagonal line connecting (0,0)(0,0) to (1,1)(1,1) represents a test with zero diagnostic value, equivalent to tossing a coin (AUC=0.50AUC = 0.50).

Area Under the Curve (AUC / c-statistic)

The Area Under the ROC Curve (AUC) summarizes the overall discriminatory ability of a test across all possible thresholds:

  • AUC=0.50AUC = 0.50: No discriminatory capacity (pure chance).
  • AUC=0.70−0.79AUC = 0.70 - 0.79: Acceptable / fair discrimination.
  • AUC=0.80−0.89AUC = 0.80 - 0.89: Good to excellent discrimination.
  • AUC≥0.90AUC \ge 0.90: Outstanding / exceptional discrimination.

Threshold Optimization and the Youden Index

One mathematical criterion for selecting a diagnostic cut-off is the Youden Index (JJ): J=Sensitivity+Specificity−1J = \text{Sensitivity} + \text{Specificity} - 1 The threshold that maximizes JJ corresponds to the point on the ROC curve with the greatest vertical distance above the chance diagonal, weighting sensitivity and specificity equally. Clinical thresholds also depend on the consequences of missed disease and unnecessary treatment. Clinical Caveat: In life-threatening conditions, a high-sensitivity threshold may reduce missed cases at the expense of specificity. It cannot eliminate false negatives: normal CSF microscopy does not exclude meningitis, so treat and investigate further when clinical suspicion remains high.


Types of Variables and Data Distributions

Selecting the appropriate statistical hypothesis test requires recognizing the scale of measurement of the variables and their underlying distribution.

Classification of Variables

  1. Categorical (Qualitative) Variables:
    • Nominal: Discrete, unordered categories (e.g., blood types A/B/AB/O, biological sex, pathogenic bacterial species).
    • Ordinal: Categories with a natural rank order, but where intervals between ranks are non-uniform and cannot be measured mathematically (e.g., APGAR scores at 1 and 5 minutes, Glasgow Coma Scale, Tanner pubertal staging, GINA asthma severity steps).
  2. Numerical (Quantitative) Variables:
    • Discrete: Integer counts representing distinct events (e.g., number of seizures per month, number of prior hospitalisations).
    • Continuous Interval: Numeric scale where intervals between units are equal, but there is no absolute true zero (e.g., temperature in degrees Celsius).
    • Continuous Ratio: Numeric scale with equal intervals and a true meaningful absolute zero point representing the total absence of the quantity (e.g., body weight in kilograms, serum total bilirubin in μmol/L\mu\text{mol/L}, head circumference in centimetres).

Normal (Gaussian) versus Skewed Distributions

   Normal (Gaussian)            Right-Skewed (Positive)          Left-Skewed (Negative)
     Symmetric Bell                  Long Right Tail                 Long Left Tail

           |                               |                               |
         /   \                           /   \                           /   \
       /   |   \                       /       \                       /       \
     /     |     \                   /     |     \                   /     |     \
 ---+------+------+---           ---+------+------+--------     ----+------+------+---
       Mean = Med                        Mode < Med < Mean              Mean < Med < Mode
  1. Normal (Gaussian) Distribution:

    • Symmetrical, bell-shaped distribution where the mean, median, and mode coincide at the exact center.
    • The 68-95-99.7 Empirical Rule:
      • 68.27%68.27\% of observations lie within ±1 SD\pm 1\text{ SD} of the mean.
      • 95.45%95.45\% of observations lie within ±2 SD\pm 2\text{ SD} (and exactly 95.0%95.0\% within ±1.96 SD\pm 1.96\text{ SD}).
      • 99.73%99.73\% of observations lie within ±3 SD\pm 3\text{ SD}.
    • Appropriate Summary Metrics: Mean (measure of central tendency) and Standard Deviation (measure of dispersion).
  2. Skewed (Non-Gaussian) Distribution:

    • Right-Skewed (Positive Skew): The tail stretches toward higher positive values. The arithmetic mean is pulled upward by extreme high outliers: Mean>Median>Mode\text{Mean} > \text{Median} > \text{Mode}. Classic paediatric examples include serum C-reactive protein, serum ferritin, PICU length of stay, and duration of mechanical ventilation.
    • Left-Skewed (Negative Skew): The tail stretches toward lower values: Mean<Median<Mode\text{Mean} < \text{Median} < \text{Mode}. A classic example is gestational age at delivery in general maternity populations.
    • Appropriate Summary Metrics: Median (unaffected by extreme outliers) and Interquartile Range (IQR, 25th to 75th percentiles). Means and standard deviations can still be useful when the mean is the quantity of interest, but alone may poorly describe a markedly skewed distribution.

Statistical Hypothesis Testing: Parametric vs Non-Parametric Selection

Choose tests by the research question, pairing, distribution and sample size. Normality assumptions concern the relevant errors or paired differences; t-tests can be robust in adequate samples. Rank tests do not require normality but have their own assumptions and generally compare distributions rather than means.

Clinical Research QuestionNumber of Groups / RelationshipParametric Test (Normal Continuous Data)Non-Parametric Equivalent (Skewed or Ordinal Data)
Compare two independent groups2 Independent groupsIndependent Two-Sample Student's t-test (e.g., birthweight in treated vs control)Mann-Whitney U test (Wilcoxon rank-sum test) (e.g., hospital length of stay)
Compare two paired/matched observations2 Paired groups (pre/post intervention in same child)Paired Student's t-test (e.g., FEV1 before and after bronchodilator)Wilcoxon signed-rank test (e.g., pain scores before and after analgesia)
Compare three or more independent groups≥3\ge 3 Independent groupsOne-Way Analysis of Variance (ANOVA) (e.g., blood pressure across 3 drug doses)Kruskal-Wallis test (e.g., duration of fever across 4 viral pathogens)
Compare three or more matched/repeated measures≥3\ge 3 Paired repeated measuresRepeated Measures ANOVAFriedman test
Assess association between two categorical variables2 Categorical variablesChi-Square (χ2\chi^2) Test of Independence (all expected cell frequencies ≥5\ge 5)Fisher's Exact Test (preferred when any expected cell count <5< 5)

Hypothesis Testing Errors, Statistical Power, and Regression Analysis

In hypothesis testing, the Null Hypothesis (H0H_0) posits that there is no true difference between study arms or no true association between variables. The Alternative Hypothesis (H1H_1) posits that a true difference or effect exists.

                                  [True Population Reality]
                                    $H_0$ is Actually True        $H_0$ is Actually False
                             +-----------------------------+-----------------------------+
Investigator  Rejects $H_0$  | Type I Error (alpha)        | Correct Decision            |
Decision      (Finds Signif) | "False Positive"            | Power = 1 - beta            |
                             +-----------------------------+-----------------------------+
              Fails to       | Correct Decision            | Type II Error (beta)        |
              Reject $H_0$   | True Negative (1 - alpha)   | "False Negative"            |
                             +-----------------------------+-----------------------------+

Type I and Type II Errors

  1. Type I Error (α\alpha, False Positive):
    • Occurs when the investigator rejects a true null hypothesis, concluding that a treatment effect exists when it does not.
    • The threshold for α\alpha is conventionally set a priori at 0.050.05 (5%5\%). A result with p<0.05p < 0.05 indicates that the probability of observing an effect this extreme purely by chance under the null hypothesis is less than 5%5\%.
  2. Type II Error (β\beta, False Negative):
    • Occurs when the investigator fails to reject a false null hypothesis, missing a true, real treatment effect.
    • The acceptable rate of β\beta is conventionally set at 0.100.10 to 0.200.20 (10%10\% to 20%20\%).
  3. Statistical Power (1−β1 - \beta):
    • The mathematical probability of correctly detecting a true treatment effect of a specified magnitude if it truly exists. Standard clinical trials demand a statistical power of at least 80%80\% (and ideally 90%90\%).
    • Determinants of Power: Statistical power increases with: (1) larger sample size (NN), (2) larger true effect size (magnitude of difference), (3) lower data variance (standard deviation), and (4) higher significance threshold (e.g., α=0.05\alpha = 0.05 vs 0.010.01).

p-values versus 95%95\% Confidence Intervals

  • p-value: Reflects whether the observed data are statistically compatible with the null hypothesis. However, a p-value provides zero information regarding the magnitude of the clinical effect, nor does it distinguish between high precision and large sample size.
  • 95%95\% Confidence Interval (95% CI95\%\text{ CI}): Gives an interval of values compatible with the data and model. In repeated sampling under the assumptions, 95%95\% of intervals made by this method would contain the true parameter; this is not 95%95\% probability assigned to the realised interval. Report it with the point estimate to show magnitude and precision:
    • For difference metrics (mean difference, ARR): If the 95% CI95\%\text{ CI} includes 0.00.0, the finding is not statistically significant at the α=0.05\alpha = 0.05 level.
    • For ratio metrics (Risk Ratio, Odds Ratio, Hazard Ratio): If the 95% CI95\%\text{ CI} includes 1.01.0, the finding is not statistically significant at the α=0.05\alpha = 0.05 level.

Regression Modeling in Paediatric Research

  1. Linear Regression:

    • Models the relationship between a continuous numerical dependent variable (YY) and one or more independent predictor variables (X1,X2,…X_1, X_2, \dots): Y=β0+β1X1+β2X2+ϵY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \epsilon
    • Paediatric Example: Modeling infant birth weight (in grams) as a linear function of gestational age (weeks), maternal weight gain (kg), and maternal hemoglobin level.
  2. Multivariable Logistic Regression:

    • Models the probability of a binary categorical dependent variable (Y=1Y = 1 vs Y=0Y = 0, such as survival vs death, or ICU admission vs discharge) using the logit (log-odds) link function: ln⁡(p1−p)=β0+β1X1+β2X2+…\ln\left(\frac{p}{1 - p}\right) = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \dots
    • The regression coefficients β\beta are exponentiated (eβe^{\beta}) to yield Adjusted Odds Ratios (aORaOR) for each predictor, representing the independent effect of each variable on the odds of the outcome while statistically controlling for all other variables in the model simultaneously.
Test Your Knowledge

A hypothetical validation study evaluates a new point-of-care assay against an independent accepted reference standard for its target infection. The reference standard identifies 200 paediatric patients with the infection and 800 without it. The point-of-care test is positive in 180 of the infected children and in 40 of those without the target infection. What are the sensitivity, specificity, positive likelihood ratio (LR+), and negative likelihood ratio (LR-) of this diagnostic assay?

A

Sensitivity 95%, Specificity 90%, LR+ 9.5, LR- 0.06

B

Sensitivity 80%, Specificity 98%, LR+ 40.0, LR- 0.20

C

Sensitivity 85%, Specificity 92%, LR+ 10.6, LR- 0.16

D

Sensitivity 90%, Specificity 95%, LR+ 18.0, LR- 0.105

Test Your Knowledge

A paediatric clinical pharmacology investigator evaluates whether a newly formulated oral anti-emetic reduces the total duration of vomiting (measured continuously in total hours) in children presenting with acute gastroenteritis. A total of 150 children are randomised into two independent groups of 75 each (active anti-emetic vs standard oral rehydration). The duration of vomiting in both study groups exhibits heavy positive skewness (right-skewed), with several patients having prolonged illness durations of up to 144 hours. Which summary statistics and hypothesis test are most statistically appropriate to compare the two groups?

A

Mean and standard deviation; independent two-sample Student's t-test

B

Median and interquartile range; Mann-Whitney U test (Wilcoxon rank-sum test)

C

Mean and 95% confidence interval; paired Student's t-test

D

Mode and total range; Chi-square test of independence

Test Your Knowledge

A multicentre randomised trial compares an investigational inhaled bronchodilator with standard nebulised salbutamol in children aged 2 to 6 years presenting to the emergency department with acute moderate wheezing. The study protocol specifies a statistical power of 80% (beta = 0.20) at a two-tailed alpha of 0.05 to detect a 15% absolute difference in discharge rates at 4 hours. At study completion, the observed difference in discharge rates between the two groups is 7% favoring the investigational drug, with a p-value of 0.16. The trial investigators conclude in their manuscript that the two bronchodilators have equivalent clinical efficacy. What statistical vulnerability is most prominent in this conclusion?

A

Type I error; the investigators falsely rejected a true null hypothesis due to an inflated alpha threshold

B

Confounding by indication; children with more severe bronchospasm were selectively assigned to standard salbutamol

C

Possible Type II error; power to detect a true 7% difference is lower than the planned power for 15%, so nonsignificance does not establish equivalence

D

Berkson's selection bias; hospitalised children have fundamentally different bronchodilator receptor densities

Sections you finish are checked off in the contents.