Separating model evaluation from deployment distribution shift

← Back to Blog & Articles

A team reports that model B reaches 84.2 percent accuracy on a benchmark and model A reaches 83.5 percent.

The leaderboard puts B first. Three questions hide in that sentence. Is a gap of 0.7 points larger than the noise from a finite test set? Was B chosen from a field of fifty candidates, so that its score is the largest of fifty noisy numbers? And does the benchmark resemble the data the model will see in production, or was it, in part, seen during training?

Each question has a statistical answer, and each is easy to get wrong. Sections 5.2 to 5.5 derive intervals and tests for one model and for two models on the same data. Sections 5.6 and 5.7 treat many models and quantify the optimism of the best one. Sections 5.8 to 5.10 treat distribution shift: how to detect it and how to correct for it in the two cases where correction is possible. the companion book example treats contamination, where the test set is not independent of the training set. Every simulation is in ch05_listings.py, uses fixed seeds, and prints every number quoted in the text.

Continue with the book

Explore the full treatment, worked examples, and exercises in Applied AI Under Uncertainty.


Companion article for Applied AI Under Uncertainty, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.

Scroll to Top