Calibration: when 95% really means 95%
Learning objectives
- Define CALIBRATION as the property that a procedure claiming (1 − α) coverage / a forecast claiming probability p delivers that frequency in repeated experience. State that calibration is a property of the PROCEDURE under repeated sampling, not of a single realised interval or forecast
- Operationalise empirical CI calibration: simulate R datasets from a known DGP, build the CI on each, count the fraction covering true θ, compare to nominal. State that for discrete sampling distributions (Binomial, Poisson) the coverage can be computed EXACTLY by summation — no Monte-Carlo noise — and that this is what the §3.1 coverage-explorer and §3.5 coverage-calibration widgets do
- Recall the §3.1 Brown-Cai-DasGupta (2001) verdict: Wald systematically UNDER-COVERS near binomial boundaries (a structural failure, not a finite-n artefact); Wilson is close to nominal; Clopper–Pearson over-covers (a deliberate price for guaranteed coverage on a discrete sample space). State that bootstrap-percentile coverage can drift under non-smooth functionals or near boundaries
- Define probabilistic-forecast calibration for a Bernoulli outcome: P(Y = 1 | p̂ = p) = p for all p ∈ [0, 1]. Distinguish from accuracy (a forecast can be perfectly calibrated yet uninformative, e.g. always 0.5)
- Define the RELIABILITY DIAGRAM (Murphy & Winkler 1987, Monthly Weather Review): bin predictions into K bins, plot mean predicted probability (x) vs observed frequency (y). Perfect calibration is the y = x diagonal. State that bin counts matter: sparse bins have wide confidence bands, dense bins have tight bands
- State the BRIER SCORE (Brier 1950): B = (1/N) Σ (p̂_i − Y_i)². The proper-scoring decomposition (Murphy 1973): Brier = reliability − resolution + uncertainty. Reliability ≥ 0 measures calibration; resolution ≥ 0 measures how much the forecast varies across distinct outcomes; uncertainty depends on the marginal Pr(Y = 1) only. Brier is a STRICTLY PROPER scoring rule (Gneiting & Raftery 2007) — the forecaster minimises EBrier by reporting the true conditional probability
- Define the EXPECTED CALIBRATION ERROR (ECE, Naeini-Cooper-Hauskrecht 2015; Guo et al. 2017): ECE = Σ_b (n_b / N) · |mean(p̂_b) − mean(Y_b)|. Computable from a reliability diagram in one line. Lower is better; 0 means perfect calibration in the chosen binning
- Describe REGRESSION calibration: standardised residuals (Y_i − Ŷ_i)/SÊ_i should be approximately N(0, 1). Q-Q plot vs the standard Normal visualises calibration; departures show under-/over-coverage of the regression CI / PI
- Describe PLATT SCALING (Platt 1999): fit logit(p_recal) = a · logit(p̂) + b on a held-out CALIBRATION SET. Slope a < 1 cures overconfidence; slope a > 1 sharpens an underconfident forecaster; intercept b removes bias. Parametric, two degrees of freedom
- Describe ISOTONIC REGRESSION (Zadrozny & Elkan 2002): nonparametric monotone-non-decreasing fit obtained by the Pool-Adjacent-Violators (PAV) algorithm. More flexible than Platt — can fit non-sigmoid miscalibration — but uses more degrees of freedom and can overfit on small calibration sets
- State the ML CALIBRATION FINDING (Guo, Pleiss, Sun, Weinberger 2017, ICML): modern deep neural networks are systematically OVERCONFIDENT — high-capacity classifiers achieve high accuracy at the cost of poor calibration. Temperature scaling — Platt scaling with a single shared slope across logits — is the cheap, surprisingly-effective fix. Preview §9.4 (ML for researchers — calibration and probability outputs)
- Articulate the THREE HONEST CAVEATS: (i) calibration ≠ accuracy — a uninformative constant forecast can be perfectly calibrated; (ii) calibration requires enough data per bin — sparse bins are noisy; (iii) on-training-distribution calibration does NOT guarantee OOD calibration. The recalibration set must be representative of deployment
The four sections that opened Part 3 each delivered a CONFIDENCE-INTERVAL procedure that CLAIMS (1 − α) coverage. The Wald CI claims it via the CLT (§3.1); Wilson via the score-test inversion (§3.1); Clopper–Pearson via exact-binomial summation (§3.1); the bootstrap via the empirical-quantile pivot (§3.2); the LRT via the chi-square inversion (§3.3); the Normal-PI and conformal-PI via the predictive pivot (§3.4). Every one of those procedures is a CLAIM. §3.5 is the EMPIRICAL TEST.
The unifying concept is CALIBRATION: a procedure that claims a frequency should DELIVER that frequency in repeated sampling. For a CI, calibration means the long-run fraction of intervals covering matches . For a probabilistic forecast (Murphy & Winkler 1987, Monthly Weather Review), calibration means for all : on days the forecaster says "70% chance of rain", it rains on of them. For a regression, calibration means the standardised residuals behave like : the bands around predictions cover the realised outcomes at nominal frequency. The mathematical machinery differs across these contexts but the empirical-testability question is the same.
The most-cited finding in §3.5 is the Brown-Cai-DasGupta (2001) verdict from §3.1, recast as a calibration statement: the Wald CI for the binomial CLAIMS coverage but DELIVERS substantially less near the boundary (e.g. 80–85% at ). The CI is MIS-CALIBRATED. Clopper–Pearson CLAIMS and DELIVERS more (97–98% at the same setting): also mis-calibrated, but on the conservative side. Wilson hugs nominal. The §3.5 coverage-calibration widget extends this from the §3.1 single-n snapshot to a SAMPLE-SIZE SWEEP, showing how the calibration of each method evolves as grows.
The §3.5 arc has twelve stops. First, the formal definition of calibration as a procedural property. Second, the empirical-calibration recipe: simulate, count, compare. Third, the coverage-calibration widget — the empirical-coverage curve vs for four binomial CIs. Fourth, probabilistic-forecast calibration and the reliability diagram (Murphy & Winkler 1987). Fifth, the Brier score (Brier 1950) and the strictly-proper-scoring framework (Gneiting & Raftery 2007). Sixth, the expected calibration error (ECE, Guo et al. 2017). Seventh, the reliability-diagram widget. Eighth, regression calibration via standardised residuals and the Q-Q plot. Ninth, Platt scaling (Platt 1999). Tenth, isotonic regression (Zadrozny & Elkan 2002) and the Pool-Adjacent-Violators algorithm. Eleventh, the ML calibration finding (Guo et al. 2017) and a §9.4 preview. Twelfth, the three honest caveats: calibration ≠ accuracy, sparse-bin noise, and OOD failure.
Calibration: a property of the procedure, not of the realised interval
The §3.1 distinction between NOMINAL and ACTUAL coverage is the cleanest entry point. A CI procedure at nominal level satisfies, by construction or by claim, . The ACTUAL coverage is computed by integrating over the true sampling distribution:
For a discrete sampling distribution like Binomial the integral is a sum and computable EXACTLY: — what the §3.1 coverage-explorer widget computes. The procedure is CALIBRATED at when ; UNDER-CALIBRATED (under-covers) when ; OVER-CALIBRATED (over-covers) when . The CALIBRATION ERROR is the gap , integrated or maxed over the -space depending on the report you want.
Calibration is therefore a property of the PROCEDURE under the FULL sampling distribution. A single realised interval [0.42, 0.61] is not "calibrated" or "miscalibrated" — those words are reserved for the procedure that produced it. Just as §3.1 warned against reading "I am 95% confident " as a probability statement about a single realised interval, §3.5 warns against reading "this CI is calibrated" without the implicit "the procedure that produced it is calibrated, in the long run, under the assumed DGP." Calibration is a long-run frequency claim — and it is empirically testable.
The empirical-calibration recipe
For any CI procedure and any DGP , the empirical calibration is computed in five steps:
- Fix the procedure and the true parameter (or scan a grid of values).
- Simulate datasets from .
- For each, compute the CI .
- Count the fraction .
- Report with a Wilson-score Monte-Carlo band: (approximately).
For discrete sampling distributions the integration in step (2)–(4) collapses to summation and the answer is EXACT — no Monte-Carlo noise, no -dependence. For continuous distributions the limit of is the true coverage, with the Monte-Carlo band shrinking at the rate. Either way, the procedural fact — "what fraction of intervals contain when the procedure runs on data from ?" — is empirically computable. This is the conceptual axis on which calibration becomes testable.
The empirical recipe also works for procedures that have NO analytic coverage formula. Bootstrap-percentile CIs have approximate coverage asymptotically (Efron 1979; §3.2), but at finite the coverage depends on the underlying distribution. Simulation IS the calibration check. The coverage-calibration widget below uses the exact summation for Wald, Wilson, and Clopper–Pearson, and Monte-Carlo (B = 400 bootstrap resamples per ) for the bootstrap-percentile method; the noise on the bootstrap curve at small is the signature of the Monte-Carlo error.
The coverage-calibration widget: empirical coverage vs n
The first widget extends the §3.1 coverage-explorer in two ways: from a single to a SWEEP over , and from a fixed CI method to a four-method comparison. Pick a true binomial , a nominal level (90% / 95% / 99%), and which CI methods to display. The widget evaluates at via the exact-summation formula (Wald, Wilson, Clopper–Pearson) or the bootstrap (400 resamples per ), plots the resulting empirical-coverage curve on a log-x axis, and overlays the nominal-coverage horizontal line.
Things to verify in the widget:
- Default settings: , 95% nominal, all methods. The Wald (red) curve is below 90% at and drifts UP toward 95% as grows — but never quite reaches it for any finite at this near-boundary . Wilson (green) is within of 95% across the whole range. Clopper–Pearson (blue) is at 97–98% across the whole range — strictly above nominal. Bootstrap-percentile (amber) tracks Wilson at large and degrades at small to near-Wald levels.
- Slide true to 0.30 (interior). All four methods converge to within of nominal by . The Wald failure is BOUNDARY-specific, not a structural failure at every parameter value. This is the Brown-Cai-DasGupta (2001) point: Wald is fine for interior ; it is the boundary regions where Wald breaks.
- Slide down to 0.05 (very near boundary). Wald coverage drops dramatically — to at , climbing to at , and still under nominal at . This is the regime where Wald is structurally MIS-CALIBRATED; the symmetric formula cannot land on a near-boundary when has discrete support. The other three methods continue to hug nominal.
- Toggle the bootstrap method ON. Note the curve has VISIBLE noise compared to Wilson — that is the Monte-Carlo error from B = 400 bootstrap resamples per . Theoretical large-sample coverage is (Efron 1987); at the bootstrap is far from the limit and coverage drifts; at it tracks Wilson closely. The bootstrap is a general-purpose CI but it is NOT a free lunch — small- near-boundary coverage requires more sophistication (BCa, double bootstrap).
- Toggle the nominal level to 99%. Wald coverage drops further BELOW the new 99% line — the structural Wald failure scales with the gap between symmetric-Normal tails and the discrete-binomial reality. Clopper–Pearson hits 99.5%+ at small .
- Move the focus-n slider. The numeric table updates with the exact coverage at the focus , the gap (nominal − empirical), and a verdict ("under-covers" / "over-covers" / "on target"). The colour cues mirror the §3.1 table: Wald is typically red ("under-covers"); Clopper–Pearson is amber ("over-covers"); Wilson is green ("on target"); bootstrap depends on .
Probabilistic forecast calibration: from CI to weather forecasting
The CI calibration story generalises beyond intervals. Murphy and Winkler (1987, Monthly Weather Review 115(7), 1330–1338) gave the canonical framework for verifying probabilistic forecasts: a forecaster issues predicted probabilities for binary outcomes , and the forecasts are CALIBRATED if
The frequency interpretation: across all days the forecaster says "70% chance of rain", the actual rain rate is . Across all days the forecaster says "5% chance", the actual rain rate is . This is the same calibration concept as the CI one — the procedure should DELIVER the frequency it CLAIMS. The objects differ (interval vs predicted probability) but the property is identical.
The empirical test is the RELIABILITY DIAGRAM (Murphy 1973; Murphy & Winkler 1987). Bin the predictions into equal-width bins (typically ). In each bin , compute the bin's MEAN predicted probability and the bin's OBSERVED frequency . Plot for each bin on a unit square. Perfect calibration is the DIAGONAL. Above the diagonal: the forecaster is UNDER-confident (the actual rate exceeds the predicted). Below the diagonal: the forecaster is OVER-confident.
The reliability-diagram visualisation is now standard in operational weather forecasting (Brier 1950; Murphy & Winkler 1987), in machine learning (Niculescu-Mizil & Caruana 2005; Guo et al. 2017), in medical risk prediction (Steyerberg et al. 2010), and in climate / hurricane risk communication. The bin-count distribution matters: bins with few observations have noisy frequencies; bins with many observations are statistically tight. Most software draws the diagram with marker size proportional to bin count and adds Monte-Carlo confidence bands on each bin's observed frequency.
The Brier score and the expected calibration error
A reliability diagram is a picture. Two NUMBERS summarise it:
The BRIER SCORE (Brier 1950, Monthly Weather Review 78(1), 1–3):
It is the mean squared error between the predicted probability and the realised outcome (an indicator on ). LOWER is BETTER; the minimum requires perfect prediction ( for every , which is impossible for genuinely random outcomes); the maximum requires the forecaster to be exactly wrong on every observation. A constant forecast of (the marginal mean) achieves : the Bernoulli variance evaluated at the marginal.
The MURPHY (1973) decomposition of the Brier score, given a reliability-diagram binning, is
Reliability is the calibration component — zero for a perfectly calibrated forecaster. Resolution is the discrimination component — high for a forecaster that produces different probabilities on different outcomes. Uncertainty is intrinsic to the outcome and identical for every forecaster on the same data. Brier is a STRICTLY PROPER scoring rule (Gneiting & Raftery 2007, JASA): the forecaster minimises by reporting the true conditional probability, and the minimum is unique. This makes Brier suitable for COMPETITIVE FORECASTING — different forecasters can be ranked by their Brier scores and the ranking respects truthful prediction.
The EXPECTED CALIBRATION ERROR (ECE), introduced by Naeini, Cooper, and Hauskrecht (2015) and popularised in ML by Guo et al. (2017, ICML):
Weighted L1 distance between predicted bin mean and observed bin mean, weighted by bin size. LOWER is BETTER; 0 is perfect calibration in the chosen binning. Unlike Brier, ECE depends on the chosen and binning (equal-width vs equal-mass), so reporting both the value and the binning convention is critical. Sparse bins are noisy; with too few observations per bin the ECE estimate is itself noisy. Guo et al. (2017) recommend equal-width bins for ImageNet-scale problems; smaller for smaller .
The reliability-diagram widget
The second widget makes the calibration story visible for probabilistic forecasts. Pick a miscalibration profile (well-calibrated baseline, overconfident sigmoid, underconfident, biased), a sample size , a latent-q spread (the Beta prior on the true probability), a bin count , and a recalibration option (none, Platt scaling, isotonic regression). The widget draws (predicted prob, binary outcome) pairs, plots the reliability diagram with markers sized by bin count, and reports Brier and ECE both BEFORE and AFTER recalibration.
Things to verify in the widget:
- Start with "calibrated" profile, , , recal = none. The reliability points should lie on the diagonal within Monte-Carlo noise ( per bin). Brier and ECE are small. This is the reference case the §3.5 calibration story is built around.
- Switch profile to "overconfident". The reliability curve is an S-SHAPE: predictions near fire too often (points above the diagonal at low ); predictions near fail too often (points below the diagonal at high ). Brier increases. ECE increases. This is the canonical neural-network miscalibration (Guo et al. 2017): high-capacity classifiers extract sharp signal from data and the resulting probabilities are pulled toward the extremes.
- With "overconfident" still selected, apply Platt scaling. The recalibrated curve straightens toward the diagonal; Brier drops; ECE drops. The widget reports the fitted slope and intercept of . For overconfident inputs the fitted slope is : Platt scaling cures overconfidence by FLATTENING the sigmoid.
- Switch profile to "biased (+0.10)". The reliability curve is a PARALLEL OFFSET below the diagonal — every bin's observed frequency is lower than the predicted bin mean. Apply Platt scaling: the recalibrated curve sits on the diagonal; the fitted Platt intercept absorbs the shift. Biased shifts are exactly what Platt scaling is designed to remove.
- Compare Platt vs isotonic on the same biased data. Platt straightens the curve to the diagonal (parametric correction with 2 d.o.f.). Isotonic is also near-diagonal but with VISIBLE step structure — isotonic uses up to pool-adjacent-violator blocks of d.o.f. and the higher flexibility shows on a small calibration set as small overfitting wobbles.
- Reduce from 1000 to 200, keeping "overconfident" with isotonic recalibration. The recalibrated curve becomes MORE jagged — isotonic overfits on small calibration sets. Switch to Platt: the parametric correction is more stable. The bias-variance trade-off (§1.5): Platt is biased (assumes sigmoid miscalibration) but low variance; isotonic is low-biased (no monotone-sigmoid assumption) but higher variance.
Regression calibration: standardised residuals and Q-Q plots
For a fitted regression , the predicted value comes with a standard error on the predictive distribution. The STANDARDISED residual is
Under the homoscedastic-Normal assumption, the are approximately . CALIBRATION of the regression-based PI then asks: does the empirical distribution of the match the standard Normal? A Q-Q plot of the empirical quantiles against the theoretical Normal quantiles answers this. Departures from the Q-Q diagonal are interpreted as Part 4 will describe: heavy tails (S-shaped Q-Q), skew (curved Q-Q), heteroscedasticity (Q-Q OK marginally but vs plot widens).
The CI for the conditional mean and the PI for each carry a NOMINAL level. The empirical-calibration test is a held-out PI coverage check: build the PI from training data, count the fraction of test observations inside, compare to nominal. This was the §3.4 pi-calibration widget mechanic. Part 4 will revisit it with regression-specific PI machinery (predictor-dependent widths, confidence bands vs prediction bands, conformal prediction). For §3.5 the point is structural: the same calibration question — DOES THE PROCEDURE DELIVER ITS CLAIM? — applies across CIs, PIs, probabilistic forecasts, and regression.
Platt scaling: parametric recalibration of a binary classifier
When the reliability diagram shows the predicted probabilities are mis-calibrated, RECALIBRATION post-processes them to recover calibration. Platt (1999, Advances in Large Margin Classifiers) introduced the simplest parametric recalibrator. Given raw scores from a base classifier and binary outcomes on a held-out CALIBRATION set, fit a one-variable logistic regression with predictor :
Estimate by maximum likelihood — typically via iteratively-reweighted least squares (IRLS) or gradient descent (the widget uses IRLS, 20 iterations max). At inference time, apply the fitted map to every raw probability the classifier emits. Two parameters: slope controls how sharp the recalibrated probabilities are (slope flattens overconfidence; slope sharpens an underconfident forecaster), and intercept controls bias (positive shifts all probabilities upward; negative shifts down).
Platt scaling assumes the miscalibration has a SIGMOID-shaped reliability curve. When the miscalibration is genuinely sigmoid (the canonical SVM-margin case Platt originally addressed; the canonical neural-net overconfidence case Guo et al. 2017 documented), Platt is near-optimal. When the miscalibration is non-monotone or has multiple bumps, Platt is mis-specified and isotonic regression does better. Platt is parametric (2 d.o.f., low variance, requires the model assumption to hold) and isotonic is nonparametric (up to d.o.f., higher variance, no model assumption beyond monotonicity).
Platt scaling on the LOGIT (not on the raw probability) is critical. Recalibrating on the probability scale would clip the recalibrated values to and produce non-smooth corrections at the boundaries. The logit transformation moves the boundaries to , makes the recalibration smooth, and lets the IRLS optimisation converge robustly.
Isotonic regression: nonparametric monotone recalibration
Zadrozny and Elkan (2002, KDD-02) introduced ISOTONIC REGRESSION as a more flexible alternative to Platt scaling. The goal is the same — fit a monotone-non-decreasing map such that — but the form of is nonparametric. The fit is computed by the POOL-ADJACENT-VIOLATORS (PAV) algorithm:
- Sort the pairs by ascending.
- Initialise blocks: each observation is a block of size 1 with mean .
- While there exist adjacent blocks with (a monotonicity violation), MERGE them: combine the observations, recompute the pooled mean, replace the two blocks by one.
- Repeat until no violations remain. The resulting block means form a non-decreasing step function — the isotonic fit.
- At inference time, for a new , find the block containing it and return that block's mean (or interpolate linearly between adjacent block means).
The PAV algorithm runs in amortised time after the sort. It is the unique minimiser of subject to being non-decreasing in — a constrained-least-squares problem with a beautifully simple combinatorial solution (Barlow, Bartholomew, Bremner, Brunk 1972, Statistical Inference Under Order Restrictions). Niculescu-Mizil and Caruana (2005, ICML) compared Platt and isotonic on a broad ML benchmark suite: isotonic dominates Platt when in the calibration set; Platt dominates isotonic for smaller calibration sets where the nonparametric variance bites.
Both Platt and isotonic require a HELD-OUT calibration set — data NOT used to fit the base classifier. Using the same data for both fitting and calibrating produces optimistic estimates of the calibration improvement; the held-out requirement is the same train/test discipline that pervades cross-validation (§8.3). Modern ML pipelines (e.g., Hugging Face, scikit-learn) provide both calibrators with cross-validated calibration sets as the default.
Modern neural networks are systematically miscalibrated
Guo, Pleiss, Sun, and Weinberger (2017, "On calibration of modern neural networks", ICML) documented what is now a canonical observation in ML: deep neural networks trained with modern recipes (dropout, batch normalisation, large capacity, long training) are systematically OVERCONFIDENT on their training distribution. The same networks achieve dramatically higher accuracy than the small networks of the 1990s — but their predicted probabilities are concentrated at the extremes (close to and close to ) regardless of the actual conditional probability.
The visible signature is a reliability diagram with an S-SHAPED curve below the diagonal at high predicted probability and above the diagonal at low predicted probability — exactly the "overconfident" profile in the §3.5 widget. ECE on ImageNet for ResNet-50 reaches 4–8% before recalibration; after temperature scaling (a single-parameter Platt-scaling variant: divide the network's logits by a learned scalar ), ECE drops to without affecting accuracy. The fix is cheap and effective; the diagnostic is even cheaper. Guo et al. (2017) made the reliability diagram and ECE table mandatory artefacts in many ML benchmarks.
The connection to §3.5 calibration is direct: a network that achieves 95% top-1 accuracy on ImageNet does NOT thereby produce 95%-calibrated predicted probabilities. ACCURACY and CALIBRATION are separate axes of evaluation. Reporting accuracy without a reliability diagram or ECE leaves the calibration story untold — and downstream consumers of the network's probabilities (decision systems, ensembles, scientific risk assessment) need calibration, not just accuracy.
Part 9 (ML for researchers) §9.4 develops this in depth: temperature scaling, vector scaling, matrix scaling (multi-class Platt variants), label smoothing as a calibration-aware training trick, focal loss, distillation, and modern uncertainty-aware methods (deep ensembles, Bayesian neural nets, Monte-Carlo dropout). For §3.5 the message is the entry point: predicted probabilities from any classifier — neural net, random forest, logistic regression — should be calibration-checked before they are used as probabilities in any downstream pipeline.
Three honest caveats
The §3.5 framework is empirically testable AND has known limitations. The three honest caveats:
- Calibration is NOT accuracy. A forecaster that always reports (the marginal positive rate) is perfectly calibrated by construction: by the law of total probability. The forecaster is also USELESS — it produces no discrimination between different examples. Calibration is necessary but not sufficient. The Murphy (1973) decomposition makes this concrete: Brier = reliability − RESOLUTION + uncertainty. Calibration sets reliability to 0; resolution captures the discrimination side. A good forecaster needs LOW reliability AND HIGH resolution. Many ML reports focus on accuracy and ignore calibration; many calibration reports focus on Brier and ignore resolution. The full Murphy decomposition is the responsible report.
- Calibration tests need enough data per bin. The reliability-diagram diagnostic with bins requires observations per bin for a reliable visual; with overall, each bin gets observations and the per-bin observed-frequency Monte-Carlo error is at . Sparse bins are NOISY and can falsely suggest miscalibration where the data just has too few points per bin. Standard fix: equal-MASS binning (each bin has the same number of observations) instead of equal-width. Standard caveat: ECE is binning-dependent; report the binning used.
- On-distribution calibration does NOT imply OOD calibration. A classifier trained on ImageNet and calibrated on a held-out ImageNet split is calibrated FOR IMAGENET. Deploy it on COVID-radiograph images and the calibration breaks: the OOD test distribution has features the calibration set did not see. The MED-OOD literature (Hendrycks & Gimpel 2017, ICLR; Ovadia et al. 2019, NeurIPS) shows the breakdown empirically — calibration is itself a function of the deployment distribution. The §3.4 conformal-prediction machinery is one response (distribution-free coverage in finite samples); Bayesian / deep-ensemble methods are another. Neither makes OOD calibration automatic; both flag uncertainty that recalibration alone cannot create.
The §3.5 calibration story is therefore POWERFUL but PARTIAL. It gives the reader a checkable property — does my procedure deliver what it claims? — and a recalibration toolkit (Platt, isotonic, conformal). It does NOT substitute for accuracy, discrimination, or out-of-distribution robustness. The mature practitioner reports calibration alongside accuracy alongside OOD diagnostics, with each axis carrying its own diagnostic suite.
Try it
- In the coverage-calibration, set , 95% nominal, all four methods. Confirm the verdict table: Wald under-covers, Clopper–Pearson over-covers, Wilson is on target. Read off the empirical coverage at for each method (Wald , Wilson , CP ).
- Same widget. Slide to 0.30 (interior). All four methods now converge to within of nominal by . State: Wald is fine at interior ; the §3.1 Brown-Cai-DasGupta verdict is BOUNDARY-specific.
- Same widget. Slide to 0.03 (very near boundary). Wald coverage falls to 75–85% at small and reaches at . Why doesn't Wald asymptote to 95% at this ? Hint: the symmetric formula at has when and a discontinuous SE jump otherwise.
- In the reliability-diagram, set profile = overconfident, , , recal = none. Read off the raw Brier score and ECE. Note the S-curve shape: above diagonal at low , below diagonal at high . This is the canonical neural-network miscalibration (Guo et al. 2017).
- Same widget. Apply Platt scaling. Compare the Brier and ECE rows before and after. Platt typically reduces ECE by . Note the fitted slope — overconfidence is cured by flattening the sigmoid.
- Same widget. Switch profile to "biased (+0.10)". Note the parallel offset of the reliability curve below the diagonal. Apply Platt. The fitted intercept should be negative (it absorbs the +0.10 shift); the slope should be close to 1 (no shape correction needed). ECE drops to .
- Same widget. Compare Platt vs isotonic on the "overconfident" profile at . Isotonic shows visible jagged steps — overfitting on a small calibration set. Increase to 5000: isotonic now smooths out and dominates Platt. State the trade-off: Platt is biased / low-variance; isotonic is low-bias / high-variance.
- Pen-and-paper. Define the Brier score and its Murphy (1973) decomposition (reliability − resolution + uncertainty). Argue that a constant forecast has reliability = 0 (perfect calibration), resolution = 0, and Brier = uncertainty = . Conclude that calibration is necessary but not sufficient — resolution captures the useful signal.
- Pen-and-paper. Show that for a binary outcome, the EXPECTED Brier score is minimised by . This is the strictly-proper-scoring-rule property (Gneiting & Raftery 2007): the forecaster minimises expected Brier by reporting the true conditional probability.
- Pen-and-paper. Sketch a reliability diagram for: (a) a perfectly calibrated forecaster; (b) an overconfident classifier; (c) an underconfident classifier; (d) a biased forecaster (+0.10 shift). Annotate where each curve lies relative to the diagonal.
Pause and reflect: §3.5 has cast CALIBRATION as the unifying empirical-testability property linking §§3.1–3.4 to the broader inference world. A CI procedure CLAIMS coverage; a probabilistic forecast CLAIMS a frequency; a regression CI / PI CLAIMS a coverage rate; a neural-network softmax output CLAIMS a class probability. CALIBRATION asks: does the procedure DELIVER that claim under repeated sampling? The empirical recipe (simulate, count, compare) and the diagnostic toolkit (reliability diagram, Brier score, ECE, Q-Q plot of standardised residuals) make calibration EMPIRICALLY TESTABLE. The recalibration toolkit (Platt scaling, isotonic regression, conformal prediction) fixes detected miscalibration. The three honest caveats — calibration ≠ accuracy, bins need data, on-distribution ≠ OOD — keep the framework honest. §3.6 closes Part 3 with the communication side: how to REPORT the calibrated uncertainty without lying.
What you now know
You can articulate CALIBRATION as the procedural property that a CI / forecast / regression claim is DELIVERED under repeated sampling. You know calibration is a property of the PROCEDURE under the full sampling distribution, not of a single realised interval or prediction, and that empirical calibration is computable EXACTLY for discrete sampling distributions (Binomial summation) and via Monte Carlo for continuous ones.
You can describe the empirical-calibration recipe: simulate datasets from a known DGP, build the CI on each, count the fraction covering , compare to nominal, report with a Wilson-score Monte-Carlo band. You can use the coverage-calibration widget to verify the §3.1 Brown-Cai-DasGupta (2001) verdict on a sample-size sweep: Wald drifts up from below; Wilson hugs nominal; Clopper–Pearson sits above; bootstrap-percentile depends on . Calibration is BOUNDARY-specific: at interior all methods converge to nominal quickly.
You can define probabilistic-forecast calibration (Murphy & Winkler 1987): . You can construct and interpret a RELIABILITY DIAGRAM (bin predictions, plot mean predicted prob vs observed frequency, compare to diagonal). You know that bin counts matter and that sparse bins produce noisy frequencies.
You can state the BRIER SCORE (Brier 1950), the Murphy (1973) decomposition (reliability − resolution + uncertainty), and the strictly-proper-scoring property (Gneiting & Raftery 2007): the expected Brier score is minimised by truthful prediction. You can compute the EXPECTED CALIBRATION ERROR (ECE = , Naeini et al. 2015; Guo et al. 2017). You know both depend on the binning convention.
You can describe REGRESSION CALIBRATION via standardised residuals and the Q-Q plot diagnostic. You know Part 4 develops the regression-specific machinery: predictor-dependent PI widths, confidence bands vs prediction bands, conformal prediction for regression.
You can describe RECALIBRATION techniques: Platt scaling (Platt 1999) fits on a held-out calibration set — parametric, 2 d.o.f., low variance, assumes sigmoid miscalibration. Isotonic regression (Zadrozny & Elkan 2002) fits a monotone-non-decreasing map via Pool-Adjacent-Violators — nonparametric, more flexible, but higher variance and prone to overfitting on small calibration sets. The bias-variance trade-off: Platt for small ; isotonic for large .
You can describe the ML calibration finding (Guo, Pleiss, Sun, Weinberger 2017): modern deep neural networks are systematically OVERCONFIDENT — high accuracy at the cost of poor calibration. Temperature scaling (Platt with a single shared slope across logits) is the cheap, effective fix. Reliability diagram + ECE table are now standard ML reporting artefacts. Part 9.4 develops the full ML-calibration toolkit.
You can articulate the THREE HONEST CAVEATS: (i) calibration ≠ accuracy — a constant forecast at the marginal mean is perfectly calibrated and useless; (ii) calibration tests require enough data per bin — sparse bins are noisy; (iii) on-distribution calibration does NOT imply OOD calibration. Calibration is empirically testable, but the test is local to the DGP that produced the data.
Where this lands in the rest of Part 3 and the textbook. §3.6 closes Part 3 with the communication side: how to REPORT uncertainty without lying about its calibration. Part 4 (regression) uses standardised-residual diagnostics and Q-Q plots as the default calibration check for OLS, and develops PI calibration for predictions. Part 5 (GLMs) covers GLM-specific calibration (deviance residuals, Pearson residuals). Part 7 (Bayesian) introduces POSTERIOR-PREDICTIVE CHECKS — the Bayesian analogue of calibration. Part 9.4 (ML calibration) develops temperature scaling, label smoothing, focal loss, deep ensembles, conformal prediction, and the modern uncertainty-aware ML toolkit. The Brier-score / reliability-diagram / ECE machinery you just learned is the backbone of all of those.
References
- Brier, G.W. (1950). "Verification of forecasts expressed in terms of probability." Monthly Weather Review 78(1), 1–3. (Originates the Brier score as the verification statistic for probabilistic forecasts in meteorology. Foundational for modern calibration measurement.)
- Murphy, A.H. (1973). "A new vector partition of the probability score." Journal of Applied Meteorology 12(4), 595–600. (The Brier score decomposition Brier = reliability − resolution + uncertainty. Splits the calibration component out as its own term.)
- Murphy, A.H., Winkler, R.L. (1987). "A general framework for forecast verification." Monthly Weather Review 115(7), 1330–1338. (The canonical framework for verifying probabilistic forecasts. Defines reliability, resolution, and the reliability diagram as the diagnostic visualisation.)
- Gneiting, T., Raftery, A.E. (2007). "Strictly proper scoring rules, prediction, and estimation." Journal of the American Statistical Association 102(477), 359–378. (Defines strictly proper scoring rules — scores that are minimised in expectation by truthful prediction. Brier score, log score, CRPS are the canonical examples. Foundational reference for modern forecast-verification theory.)
- Platt, J.C. (1999). "Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods." Advances in Large Margin Classifiers 10(3), 61–74, MIT Press. (Introduces Platt scaling: fit a 1-D logistic regression on the logit of the raw score to recalibrate. Originally for SVMs; now the default parametric recalibrator for any binary classifier.)
- Zadrozny, B., Elkan, C. (2002). "Transforming classifier scores into accurate multiclass probability estimates." Proceedings of the 8th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 694–699. (Introduces isotonic regression via Pool-Adjacent-Violators as a nonparametric monotone alternative to Platt scaling. The other half of the standard recalibration toolkit.)
- Niculescu-Mizil, A., Caruana, R. (2005). "Predicting good probabilities with supervised learning." Proceedings of the 22nd International Conference on Machine Learning, 625–632. (Empirical comparison of Platt vs isotonic across a broad ML benchmark suite. Isotonic dominates at N ≥ 1000; Platt dominates for smaller calibration sets.)
- Guo, C., Pleiss, G., Sun, Y., Weinberger, K.Q. (2017). "On calibration of modern neural networks." Proceedings of the 34th International Conference on Machine Learning (ICML), 1321–1330. (Documents the systematic OVERCONFIDENCE of modern deep neural networks — high accuracy at the cost of poor calibration. Introduces temperature scaling as the canonical Platt-style fix for multi-class classifiers. The reliability diagram + ECE table is now standard ML reporting.)
- Naeini, M.P., Cooper, G.F., Hauskrecht, M. (2015). "Obtaining well calibrated probabilities using Bayesian binning." Proceedings of the 29th AAAI Conference on Artificial Intelligence, 2901–2907. (Introduces the Expected Calibration Error (ECE) — the weighted L1 distance between bin-mean predicted probability and bin-mean observed frequency. The numeric summary of a reliability diagram.)
- Brown, L.D., Cai, T.T., DasGupta, A. (2001). "Interval estimation for a binomial proportion." Statistical Science 16(2), 101–117. (Exact-coverage comparison framework for binomial CIs. Documents the Wald sawtooth, the Wilson near-nominal behaviour, the Clopper-Pearson over-coverage. The reference for §3.5's coverage-calibration widget.)
- Steyerberg, E.W., Vickers, A.J., Cook, N.R., et al. (2010). "Assessing the performance of prediction models: a framework for traditional and novel measures." Epidemiology 21(1), 128–138. (Medical-statistics view: discrimination, calibration, clinical utility as three orthogonal evaluation axes for clinical prediction models. The §3.5 reliability-diagram + Brier-score approach for medical risk scores.)
- Hendrycks, D., Gimpel, K. (2017). "A baseline for detecting misclassified and out-of-distribution examples in neural networks." International Conference on Learning Representations (ICLR). (Foundational OOD-detection paper. Demonstrates that on-distribution calibration does NOT carry over to OOD test examples. The empirical evidence behind the §3.5 OOD caveat.)