Diagnostic tests
DTM&H
Jasper Tromp MD PhD DTM&H
1
Diagnostic tests learning outcomes
• Appraise diagnostic tests performance
• Discriminate factors affecting test performance
• Evaluate effects of sequencing diagnostic tests
• Evaluate test performance for an individual patient
2
Overview of Diagnostic Tests
I) Examining specimens to detect, isolate, and identify pathogens
or their products using
• Microscopy
• Culture technique
• Immunological tests
• Molecular techniques, e.g., PCR
II) Testing serum for antibodies produced in response to infection,
i.e. serological response
3
Key concepts in diagnostic tests
performance
• Sensitivity
• Specificity
• Positive predictive value (PPV)
• Negative predictive value (NPV)
• AUC/ROC curve
4
Sensitivity
• Definition: The ability of a Gold standard
test to correctly identify Disease No Total
individuals with a disease Disease
• Formula: Sensitivity = True Positive A B A +B PPV: A /
Positives / (True Positives True False- (A+B)
+ False Negatives) positive positive
Test
• Importance in diagnostic Negative C D C+D NPV:
testing: Minimizes false False- True- D/(C+D)
negatives negative negative
Total A+C B+D
• Example: Rapid diagnostic
test (RDT) for malaria has Sensitivity Specificity:
a sensitivity of 95% A/(A+C) D/(D+C)
5
Specificity
• Definition: The ability of a Gold standard
test to correctly identify Disease No Total
individuals without a Disease
disease Positive A B A +B PPV: A /
True False- (A+B)
• Formula: Specificity = True positive positive
Negatives / (True Test
Negative C D C+D NPV:
Negatives + False False- True- D/(C+D)
Positives) negative negative
• Importance in diagnostic Total A+C B+D
testing: Minimizes false Sensitivity Specificity:
positives A/(A+C) D/(D+C)
6
Example
7
Example
Sensitivity:
• 55.3% of malaria cases were found
with Microscopy
• 83% of cases with RDT
Specificity:
• 81% of people without malaria
were identified by Microscopy
• 89% by RDT
8
Positive predictive value
• Definition: The probability that Gold standard
an individual with a positive
test result truly has the Disease No Total
disease Disease
Positive A B A +B PPV: A /
• Formula: PPV = True
True False- (A+B)
Positives / (True Positives +
False Positives) positive positive
Test
Negative C D C+D NPV:
• Relationship to prevalence: False- True- D/(C+D)
PPV increases as disease negative negative
prevalence increases
Total A+C B+D
• Importance in diagnostic
testing: Helps determine the Sensitivity Specificity:
reliability of a positive result A/(A+C) D/(D+C)
9
Negative predictive value
• Definition: The probability that Gold standard
an individual with a negative Disease No Total
test result truly does not have Disease
the disease Positive A B A +B PPV: A /
• Formula: NPV = True True False- (A+B)
Negatives / (True Negatives + Test positive positive
False Negatives) Negative C D C+D NPV:
False- True- D/(C+D)
• Relationship to prevalence: negative negative
NPV decreases as disease
prevalence increases Total A+C B+D
• Importance in diagnostic Sensitivity Specificity:
testing: Helps determine the A/(A+C) D/(D+C)
reliability of a negative result
10
Worked example
A test has 90% sensitivity, 95% specificity
a) the disease prevalence is 20% b) the disease prevalence is 2%
11
Slide from Prof Bhim G Dhoubhadel
Trade-off between sensitivity and
specificity
• Importance of balance:
Ensuring accurate
diagnosis while
minimizing false results
• ROC curve and AUC:
Graphical
representation of the
trade-off between
sensitivity and
specificity
12
Factors Affecting Test Performance
• Pre-analytical factors: Patient selection,
sample collection, storage, and
transportation
• Analytical factors: Test methodology,
reagents, and equipment
• Post-analytical factors: Data interpretation,
reporting, and communication
13
Considerations in selecting a diagnostic
test
• Disease prevalence
• Higher prevalence increases the likelihood of true positive results, affecting the
positive predictive value (PPV) of a test
• Lower prevalence increases the likelihood of true negative results, affecting the
negative predictive value (NPV) of a test
• In high-prevalence settings, tests with high sensitivity are more valuable, while in
low-prevalence settings, tests with high specificity are more valuable
• Test performance characteristics (sensitivity, specificity)
• Resource availability
• Patient population
• Certain tests may perform better in specific patient populations (e.g., age, sex,
ethnicity, or presence of comorbidities)
• Goal of testing
14
Screening vs diagnosis vs confirmation
Screening Tests
• Purpose: Identify individuals with a high likelihood of having a
disease among a large, asymptomatic population
• Preferred characteristics:
• High sensitivity, acceptable specificity, cost-effective, non-
invasive, rapid results
Diagnostic Tests
• Purpose: Presence or absence of a disease in symptomatic
individuals
• Preferred characteristics:
• High sensitivity and specificity, reliable, practical
Confirmatory Tests
• Purpose: Verify diagnosis after a positive screening or
diagnostic test result
• Preferred characteristics:
• Very high specificity, high sensitivity, accurate
15
Combining diagnostic tests
1. Parallel testing
• Tests are performed simultaneously, and a positive result from either
test A OR test B is considered necessary for diagnosis.
• This approach generally improves sensitivity because it increases the
chances of detecting true positive cases.
• However, it may reduce specificity since a positive result from either
test could lead to more false positives.
2. Sequential testing
• Tests are performed in sequence, with a positive result from test A
followed by a positive result from test B necessary for diagnosis.
• This approach generally improves specificity because both tests need
to yield positive results, reducing the chances of false positives.
• However, it may reduce sensitivity because a negative result from the
first test could exclude true positive cases.
16
Example: Malaria
• Microscopy
• Considered gold standard
• Requires technician and a laboratory
• Sensitivity and specificity may vary
depending on quality of the slides, reagents
and operator skills
• Rapid diagnostic tests
• Simple to use
• Sensitivity/specificity depends on antigen,
parasite density
• PCR
• Highly sensitive and specific
• Require (expensive) equipment and trained
staff
• Not suitable for point-of-care testing
17
Example: HIV
High resource setting Low resource setting
18
19
Interpretation of a test on an individual
level
• When seeing a patient, we often
think in probabilities
• We create a differential
diagnosis, ordered from most to
least probable
• The probabilities of having a
disease increases or decreased
based on what we find during
the clinical interview and
examination
• So what happens to the
probability when a test result is
positive or negative?
20
How to interpret the effect of a positive or
negative result
• If I have a positive test result. What happens to the likelihood of
my patient having the disease?
• If I have a negative test result. What happens to the likelihood
of my patient not having the disease?
• PPV: probability of a patient with a positive test having the
disease
• NPV: probability of a patient with a negative test not having the
disease
• What are alternative parameters to assess the use of a test?
21
The likelihood ratio
• The likelihood ratio helps to assess the ability of a test to discriminate between
individuals with and without the disease.
• It combines the information from sensitivity and specificity and provides a single
value that can be used to interpret test results and update the pre-test probability
of a disease.
• Positive likelihood ratio: ratio of the probability of a positive test result in individuals
with the disease to the probability of a positive test result in individuals without
the disease.
• Negative likelihood ratio (LR-): The negative likelihood ratio is the ratio of the
probability of a negative test result in individuals with the disease to the probability
of a negative test result in individuals without the disease.
22
Example: sensitivity/specificity/PPV/NPV
• Sensitivity: True Positives / (True Positives +
False Negatives) = 180 / (180 + 20) = 180 /
200 = 0.9 or 90%
• Specificity: True Negatives / (True Negatives Disease
+ False Positives) = 760 / (760 + 40) = 760 / Present Absent Total
800 = 0.95 or 95% Positive 180 40 220
• PPV: True Positives / (True Positives + False Test
Positives) = 180 / (180 + 40) = 180 / 220 = Negative 20 760 780
0.818 or 81.8% Total 200 800 1000
• NPV: True Negatives / (True Negatives +
False Negatives) = 760 / (760 + 20) = 760 /
780 = 0.974 or 97.4%
23
Example: Positive likelihood ratio
• Ratio of the probability of a positive test
result in individuals with the disease to
the probability of a positive test result in
individuals without the disease.
• Positive test: 180/200=90%=sensitivity
• Positive test in negative individuals
=40/800=5% Disease
• Remember: specificity = probability of a Present Absent Total
negative test result in negative individuals = Positive 180 40 220
760/800=95 Test
• Therefore, the probability of a positive test in Negative 20 760 780
negative individuals = 1-specificity Total 200 800 1000
• The positive likelihood ratio = sensitivity/(1-
specificity)=0.90/(1-0.95)=0.90/0.5=18
• An LR+ of 18 indicates that a positive test
result is 18 times more likely to occur in
individuals with the disease compared to
individuals without the disease
24
Example: Negative likelihood ratio
• Ratio of the probability of a negative test
result in individuals with the disease to the
probability of a negative test result in
individuals without the disease.
• Negative test in people with the disease:
20/200=10%
• Remember: sensitivity=180/200 Disease
• So this can be rewritten as 1-sensitivity Present Absent Total
• Negative test result in individuals without the Positive 180 40 220
disease: 760/800=95%=specificity Test
• The negative likelihood ratio =(1- Negative 20 760 780
sensitivity)/specificity= (1-0.9)/0.95=0.105 Total 200 800 1000
• An LR- of approximately 0.105 indicates that
a negative test result is about 0.105 times
(or 10.5% as likely) to occur in individuals
with the disease compared to individuals
without the disease.
25
Pre-test to post-test probability
• Bayes theorem: mathematical equation to
relate the pre-test probability to post-test
probability
• It is used to update the probability of an
event (such as having a disease) based
on new evidence (such as a diagnostic
test result).
• Post-test odds given a positive result =
Pre-test odds × LR+
• Post-test odds given a negative result =
Pre-test odds × LR-
• Remember: Odds are calculated as
cases/non cases (e.g. 20/80=25) a
probability is calculated as cases/(cases+
non-cases, e.g. 20/100=20%)
26
A normogram can help to convert pre-test
probabilities to post-test probabilities
• Because calculating odds
and converting them to
probabilities is a lot of work
and annoying
• We can use normograms to
convert pre-test probabilities
to post-test probabilities
based on the likelihood ratio
• The pre-test probability
depends on the prevalence
of the differentials and the
signs/symptoms
27
Example: Malaria
• Working in a rural health clinic in a region
where malaria is endemic. Performed an
RDT
• Patient who presented with fever and other
symptoms suggestive of malaria (50% of
patients with fever have malaria)
• RDT (sensitivity 50%/specificity 80%) result
is positive.
• Positive LR: 0.5 / (1 - 0.8)=2.5
• Normogram: Post-test probability ~75%
28
Reliability of tests
• Intrasubject variation: different results in the same
person; e.g., blood pressure at home or doctor’s office
• Intra-observer variation: variation between two or more
readings of the same test results made by the same
observer; e.g., same group of x-rays read by a
radiologist at different times
• Interobserver variation: variation between two or more
observers
29
Summary
• Evaluating diagnostic tests requires understanding the sensitivity,
specificity, NPV, PPV, and LR.
• The performance of a test depends on the pre-test probability (e.g.
prevalence, signs and symptoms)
• Choosing a test depends on the setting (e.g. low vs high resource,
manpower/expertise, infrastructure) and goal (screening or diagnosis?)
• Tests with high sensitivity/low –LR are good for screening; tests with high
specificity/high +LR are good for diagnosis
• LRs can be useful combined with normograms to assess patient level
effects of test results
• Reliability of tests should be taken into consideration next to parameters
like sensitivity/specificity
30
Thank you.
31
Readings
Recommended:
1. Hullen (2013) Designing Clinical Research – comprehensive overview of sampling
techniques, questionnaire design and data management
2. Daniel (2012) Sampling essentials: practical guidelines for making sampling choices –
in-depth but easy to understand book on sampling techniques
3. White E, Armstrong K, Saracci R (2008) Principles of Exposure Measurement in
Epidemiology – In-depth reference book on questionnaire design
4. Smith, Morrow and Ross (2015) Field trials of health interventions – A Toolbox, 3rd
Edition. Oxford University Press – In-depth reference book on conducting clinical trials,
including data management and monitoring procedures. Also relevant to non-trial
studies (e.g. cohort, case-control, or cross-sectional studies)
32