Likelihood ratios and the Fagan nomogram
A likelihood ratio turns a test result into "multiply the pre-test odds by this much", which is why it does not vary with prevalence and yet still yields this patient's post-test probability. This page covers where LR+ and LR− come from, how to read a Fagan nomogram, why multilevel LRs beat a dichotomy — and the fact that in this dataset the two lowest bands cannot be told apart, because the data are not enough to say whether their LRs differ.
What this quantity solves
The previous two pages leave a practical deadlock:
- Sensitivity and specificity are properties of the test, so they can be carried over from the literature — but they answer “what happens to people who have the disease”, which is not the question the patient asked.
- PPV and NPV answer the patient’s question, but they are welded to the prevalence of the study that produced them, so they do not survive a change of population.
The likelihood ratio (LR) is the quantity that joins the two. Two properties hold of it simultaneously, and in the diagnostic accuracy family that combination is unique:
- It is computed from sensitivity and specificity, so like them it does not vary with prevalence and can be carried over from the literature.
- It converts this particular patient’s pre-test probability into a post-test probability, so it answers the patient’s question.
The price is that you have to think on a different scale: odds, not probability.
Definition
The numerator is the probability of seeing this result in someone with the disease, the denominator the probability of seeing the same result in someone without it. So an LR reads as: given this result, which side is favoured, and by what factor.
Its use is a single multiplication — Bayes’ theorem written in odds form:
Probability and odds convert through and . The whole procedure is three steps: probability to odds, multiply by the LR, odds back to probability.
The numbers on this page
Continuing with S100β from pROC::aSAH at a cut-off of 0.20 µg/L: sensitivity 63.4%, specificity 80.6%.
| Computed as | Estimate | 95% CI | |
|---|---|---|---|
| LR+ | 63.4% / (1 − 80.6%) | 3.26 | 1.93–5.51 |
| LR− | (1 − 63.4%) / 80.6% | 0.454 | 0.299–0.690 |
The confidence intervals use Simel’s method — computed on the log scale and transformed back — because an LR is a ratio, and the sampling distribution of a ratio is skewed on its original scale. What to look for in an LR’s interval is whether it crosses 1: an interval crossing 1 means the result does not clearly favour either side. Neither interval here crosses 1.
The Fagan nomogram
The Fagan nomogram is the graphical form of those three steps: find the pre-test probability on the left-hand axis, find the LR on the middle axis, draw a straight line through both and extend it to the right-hand axis, and where it lands is the post-test probability.
This is not the same object as the nomogram in a prediction-model paper. That one rescales the linear predictor of an already-fitted regression model into points, and is read by going vertically up from each axis and adding, not by laying a ruler diagonally across three axes. The differences are set out on the nomogram page.
figures/scripts/B4-03-likelihood-ratio.RTaking this cohort’s prevalence of 36.3% as the pre-test probability:
| Pre-test probability | Positive → post-test | Negative → post-test | Absolute change from a positive |
|---|---|---|---|
| 5.0% | 14.7% | 2.3% | +9.7 percentage points |
| 10.0% | 26.6% | 4.8% | +16.6 percentage points |
| 20.0% | 44.9% | 10.2% | +24.9 percentage points |
| 36.3% | 65.0% | 20.5% | +28.7 percentage points |
| 50.0% | 76.5% | 31.2% | +26.5 percentage points |
| 70.0% | 88.4% | 51.4% | +18.4 percentage points |
There is a pattern in this table that is easy to miss: one and the same LR produces a different absolute change at different pre-test probabilities, and the change is largest in the middle. At a pre-test probability of 5% a positive raises it by 9.7 percentage points; at 36.3% it raises it by 28.7 points; by 70% it is back down to 18.4 points.
The clinical reading is direct: for a patient who is already nearly certain to have the disease, or nearly certain not to, one more test of moderate strength will not change what you do. A test earns its value in the uncertain middle — which is the problem that the whole apparatus of decision curve analysis exists to handle.
LRs do not vary with prevalence — shown with the data again
Same manoeuvre as on the 2×2 table page: duplicate the cases or the controls wholesale, change the cohort’s prevalence, and recompute.
| Cases : controls, as duplicated | Prevalence | PPV | LR+ | LR− |
|---|---|---|---|---|
| 1:4 | 12.5% | 31.7% | 3.261 | 0.454 |
| 1:1 | 36.3% | 65.0% | 3.261 | 0.454 |
| 4:1 | 69.5% | 88.1% | 3.261 | 0.454 |
PPV travels from 31.7% to 88.1%, while the two LR columns do not move by a single decimal place. That is why a meta-analysis of diagnostic accuracy pools sensitivity and specificity, or likelihood ratios, and never pools PPV.
(The qualification at the end of the previous page applies here as well: move to a population with a different case mix and the LRs will move too, because sensitivity and specificity move. “Does not vary with prevalence” is a statement about the arithmetic, not a guarantee of portability across settings.)
Multilevel LRs: do not squash a continuous value into two cells
Dichotomising a continuous test result into positive and negative throws information away: a patient sitting a hair above the cut-off and a patient ten times higher are treated as the same event.
The multilevel likelihood ratio approach cuts the range into bands and computes a separate LR for each band: the LR of a band is the share of diseased people falling in it divided by the share of non-diseased people falling in it.
| S100β (µg/L) | Poor outcome, n (share) | Good outcome, n (share) | LR | 95% CI | Post-test probability |
|---|---|---|---|---|---|
| < 0.10 | 7 (17.1%) | 28 (38.9%) | 0.439 | 0.211–0.915 | 20.0% |
| 0.10-0.19 | 8 (19.5%) | 30 (41.7%) | 0.468 | 0.237–0.924 | 21.1% |
| 0.20-0.39 | 9 (22.0%) | 6 (8.3%) | 2.634 | 1.009–6.874 | 60.0% |
| >= 0.40 | 17 (41.5%) | 8 (11.1%) | 3.732 | 1.767–7.882 | 68.0% |
Every value in the last column starts from the same pre-test probability, 36.3%. A patient landing in the highest band is moved to 68.0%, one landing in the lowest is pulled down to 20.0% — and a dichotomy would have lumped the two lowest bands together as one “negative” and the two highest together as one “positive”.
figures/scripts/B4-03-likelihood-ratio.RRun it yourself
library(pROC)
data(aSAH, package = "pROC")
pos <- aSAH$s100b >= 0.20
dis <- aSAH$outcome == "Poor"
tp <- sum(pos & dis); fp <- sum(pos & !dis)
fn <- sum(!pos & dis); tn <- sum(!pos & !dis)
sens <- tp / (tp + fn); spec <- tn / (tn + fp)
lr_pos <- sens / (1 - spec)
se <- sqrt(1/tp - 1/(tp + fn) + 1/fp - 1/(fp + tn)) # Simel
exp(log(lr_pos) + c(0, -1.96, 1.96) * se)
# Three steps: probability -> odds -> multiply by LR -> back to probability
post <- function(pre, lr) { o <- pre / (1 - pre) * lr; o / (1 + o) }
post(0.20, lr_pos)
# Multilevel LR: each band against the diseased / non-diseased distributions
band <- cut(aSAH$s100b, c(0, 0.10, 0.20, 0.40, Inf), right = FALSE)
tab <- table(band, dis)
(tab[, "TRUE"] / sum(dis)) / (tab[, "FALSE"] / sum(!dis))
# Exported for the Python block below
write.csv(aSAH, "aSAH.csv", row.names = FALSE)Verified with R 4.6.0 and pROC 1.19.0.1. The LR confidence interval uses Simel's log-scale formula, which is three lines to write yourself — no extra package needed.
import numpy as np
import pandas as pd
d = pd.read_csv("aSAH.csv") # exported by the R block above
pos = d["s100b"] >= 0.20
dis = d["outcome"] == "Poor"
tp = (pos & dis).sum(); fp = (pos & ~dis).sum()
fn = (~pos & dis).sum(); tn = (~pos & ~dis).sum()
sens, spec = tp / (tp + fn), tn / (tn + fp)
lr_pos, lr_neg = sens / (1 - spec), (1 - sens) / spec
se = np.sqrt(1/tp - 1/(tp + fn) + 1/fp - 1/(fp + tn))
print(np.exp(np.log(lr_pos) + np.array([0, -1.96, 1.96]) * se))
def post(pre, lr):
o = pre / (1 - pre) * lr
return o / (1 + o)
band = pd.cut(d["s100b"], [0, 0.10, 0.20, 0.40, np.inf], right=False)
tab = pd.crosstab(band, dis)
print((tab[True] / dis.sum()) / (tab[False] / (~dis).sum()))Python has no standard likelihood ratio function, so write it straight from the definition. The part that matters is computing the CI on the log scale and transforming back.
Common misuses
| Misuse | Why it is wrong |
|---|---|
| Reporting an LR as if it were a probability | An LR is the factor the odds get multiplied by; it is not a probability and can exceed 1 |
| Multiplying an LR onto a probability directly | Convert to odds first; multiplying probabilities together means nothing here |
| Using population prevalence as every patient’s pre-test probability | The pre-test probability belongs to this patient, and must take in symptoms, history and risk factors |
| Chaining several tests’ LRs by multiplication without thought | That requires the test results to be conditionally independent given disease status, which clinically they often are not |
| Reporting an LR with no confidence interval | An LR is a ratio, so its interval is skewed and frequently wide; an interval crossing 1 means the result does not clearly favour either side |
| Judging a test’s usefulness from the size of the LR alone | What matters is whether the post-test probability crosses the decision threshold, and the threshold is set by the consequences |
| Treating the LR grading thresholds as rules | They are rules of thumb; the same LR does very different work at different pre-test probabilities |
| Adding bands to make a table look richer | Each band then holds fewer people and its CI widens; adjacent bands whose LRs do not separate should be merged |
| Choosing band boundaries from the data without saying so | The same problem as choosing a cut-off from the data, and it produces the same optimistic bias |
| Adding a moderate test for a patient who is already nearly certain either way | The absolute change is small at extreme pre-test probabilities, and management will not change |
Reproducing every number on this page
/opt/homebrew/bin/Rscript figures/scripts/B4-03-likelihood-ratio.RRead the figure
The answer comes from the same statistical output that produced this page's figures, not from a number typed in beside them.
This test has an LR+ of 3.26. A patient with a pre-test probability of 0.20 gets a positive report. How is the post-test probability obtained?
Show the answer and why
Correct answer: Convert 0.20 to odds, multiply by LR+, convert back to a probability, and you get 0.449
An LR multiplies odds, not probabilities. A pre-test probability of 0.20 corresponds to odds of one to four; multiplying by 3.261 and converting back gives 0.449. Multiplying 0.20 by 3.261 directly gives a number above one half, and at higher pre-test probabilities it would exceed one, which is the giveaway that the scale is wrong. 0.102 is the post-test probability for the same patient after a negative report - two adjacent columns of one row, pointing in opposite directions. The procedure is always the same three steps: probability to odds, multiply by the LR, odds back to probability.
LR+ is 3.26 with a 95% confidence interval of 1.93 to 5.51. To judge whether this positive result favours either side, what should you look at in the interval?
Show the answer and why
Correct answer: Whether the lower bound of 1.93 is above 1 - it is, so this result does favour disease
An LR is a ratio, so its point of no information is 1 rather than 0: an LR of 1 means diseased and non-diseased people produce this result equally often. What matters is whether the interval crosses 1, and here the lower bound of 1.93 is already above it. 5.51 is the upper bound, and holding it against the familiar grading thresholds treats the most optimistic end as the estimate. 0.69 is the upper bound of LR−, which answers a question about negative results and has nothing to do with this one; each column has its own interval and they neither need nor happen to cross together.
The same LR+ of 3.26 is applied to three patients whose pre-test probabilities are 0.05, 0.36 and 0.70. Which of them is changed most by the positive report?
Show the answer and why
Correct answer: The patient at 0.36, an absolute change of 0.287 - the absolute effect of a given LR is largest in the middle
The multiplication happens on the odds scale, and converting back squeezes the result between zero and one, so the same LR moves little at either extreme and most in the middle. The patient at 0.36 gains 0.287 of probability, the one at 0.70 gains only 0.184 and the one at 0.05 gains 0.097. None of this depends on how large the LR is: all three used the same 3.26. The clinical reading is direct - for a patient who is already nearly certain to have or not have the disease, one more test of moderate strength changes nothing, and the value of testing is concentrated in the uncertain middle.
Cases or controls are duplicated as a block so that cohort prevalence moves from 12.5% to 69.5%, and PPV and the LRs are recomputed. Which statement is right?
Show the answer and why
Correct answer: PPV travels from roughly a third to roughly nine tenths, while LR+ is 3.261 in all three cohorts, unchanged to the decimal
LR+ is sensitivity divided by one minus specificity, and both inputs are computed inside their own disease group, so duplicating whole groups cannot touch them: LR+ stays 3.261 in all three cohorts. PPV mixes the two groups and travels from 0.317 to 0.881. That is exactly why diagnostic meta-analyses pool sensitivity, specificity or likelihood ratios and never PPV - the studies have different prevalences and their PPVs are not comparable. The phrase 'does not vary with prevalence' is about the arithmetic, though: move to a population with a different case mix and sensitivity and specificity themselves move, and the LRs move with them.
The multilevel analysis cuts the biomarker into four bands. The two lowest have LRs of 0.439 and 0.468, and their 95% confidence intervals overlap almost completely. What is the correct statement?
Show the answer and why
Correct answer: The lowest band's interval runs from 0.211 all the way to 0.915, so these data cannot tell whether the two bands differ
Failing to distinguish is not the same as being identical. Both intervals are wide - the lowest band runs from 0.211 to 0.915 - and they overlap almost completely, so the only defensible statement is that these data cannot tell whether the two differ. Treating 0.468 and 0.439 as one number turns absence of evidence into evidence of absence. The third band's 2.634 is where real separation happens: together with the top band's 3.732 it gets averaged away by dichotomising, and that is what dichotomising actually discards. The more bands you cut, the fewer people each holds and the wider each interval gets, so band boundaries should be fixed in advance on clinical grounds, and adjacent bands checked afterwards for whether they really separate.
All four bands start from the same pre-test probability of 36.3%. The top band is pushed to 0.680 and the bottom band pulled to 0.200. What does a dichotomy do to these four bands?
Show the answer and why
Correct answer: It merges the top two bands into one 'positive', so patients whose post-test probabilities were 0.680 and 0.600 end up with a single number
A dichotomy has only two outcomes, so the top two bands become 'positive' together and the bottom two become 'negative' together. Patients whose post-test probabilities were 0.680 and 0.600 are collapsed into one number, and so are those at 0.200 and 0.211. The LR+ that a dichotomy uses is computed from the two merged bands, not from the top band's 3.732, and using the latter as the overall LR+ would systematically overstate the moderately raised group. This is the information multilevel LRs are meant to recover: a patient just above the cut-off and a patient ten times above it are treated as the same event.
Chapters that use this method
Watch next
What Are Likelihood Ratios and How Are They Used
Likelihood Ratios Explained
Likelihood Ratios and The Probability of Diagnosis
Diagnosis 03: Likelihood Ratios
好想告訴你的醫學統計-敏感性、特異性、陽性預測值與陽性概似比Sources and licences
This page is original writing