learn-decision-intelligence-with-phoebe / Session 4 of 6
Learn Decision Intelligence with Phoebe · Session 4 of 6

Uncertainty you can promise

Sessions 2 and 3 trained the human: your 90 percent now means something because it was measured, and your forecasts anchor on base rates because the Brier ladder showed what that buys. Tonight the model side gets the same discipline. A churn score of "84%" deserves exactly the audit your colleague's "90% sure" got - and then something the human side cannot offer: a mathematical guarantee. Conformal prediction wraps any model in prediction sets that contain the truth at a rate you choose, with no distributional assumptions - and tonight you build one by hand, fine print included.

🟠 Hands-on Estimators with a measured calibration number 45 min
0-3 · Welcome 3-20 · From vibes to guarantees 20-40 · Build-along: build a conformal set by hand 40-45 · Q&A
Part 0

Where session 3 left you

The memo's estimates section is no longer vibes: your intervals come from a calibrated estimator (session 2's lab measured you), and your probabilities anchor on base rates before updating on evidence (session 3's game scored it: coin flips 0.250, base-rate bot 0.171, you with evidence 0.155). That is the human side of uncertainty, disciplined. Tonight disciplines the model side: intervals a system can PROMISE - not feel, not usually manage, but guarantee at a rate you pick in advance.

🎫 Clear all three quiz questions to stamp your passport Live = presented in the 45 minutes Self-study = the full depth, after class

★ What you walk out with tonight. How to read a model's calibration curve the way session 2 read yours. The split-conformal recipe - four moves that wrap ANY pre-trained model in a guaranteed prediction set. And the fine print that makes the guarantee honest: what "90% coverage" does and does not promise, and why a drifted quarter voids it.

LiveTwo kinds of 90 percent3 min▶

After tonight the memo can carry two different creatures that both say "90":

  • The human's trained 90 (session 2): "my 90 percent intervals capture the truth about 90 percent of the time - measured, on my own scored history." Certified by a hit rate.
  • The algorithm's guaranteed 90 (tonight): "this prediction set contains the true label with 90 percent probability - guaranteed by construction, under stated conditions." Certified by a theorem.

They are not interchangeable, and the memo should never let them blur: the human number covers one-off judgment calls no model scores; the guaranteed number covers repeated, model-scored predictions. The memo carries both - labeled, so the reader always knows which certificate stands behind which number.

Self-studyTonight's vocabulary3 min▶
  • Calibration curve - stated confidence on one axis, actual frequency on the other. The diagonal is honesty; session 2 drew yours, tonight draws the model's.
  • Calibration set - labeled points the model never trained on, held out to price its errors.
  • Nonconformity score - how "wrong" the model looks on one point, e.g. 1 minus the probability it gave the true label. High score = the truth surprised it.
  • Coverage - how often the prediction set actually contains the truth. The thing being guaranteed.
  • Exchangeability - the condition under which the guarantee holds: calibration data and new data behave like draws from the same well-shuffled deck. Distribution shift breaks it.
Part 1 · covers calibration curves for models

Audit the model like you audited yourself

6 min live

Session 2's lab bucketed YOUR stated confidence and plotted your actual hit rate. The exact same audit works on a model's probability outputs: bucket its predictions by stated confidence, plot the actual frequency in each bucket, and compare to the diagonal. On the diagonal, the model is calibrated. Churn models routinely are not - they run over- or under-confident, and nobody notices until the curve is drawn.

The churn model's calibration curve - same audit as session 2, different estimator 0.5 0.7 0.9 1.0 0.5 0.7 0.9 stated confidence (bucketed model outputs) actual frequency perfectly calibrated the model, measured reading the 0.9 bucket: model says 90%, reality delivers 74% Sag below the diagonal = overconfidence: confidence the model claims but does not earn. Above = underconfidence.
🔍 Click to zoom - reading a model's calibration curve, bucket by bucket
LiveHow the audit works, and what it finds3 min▶

Three moves, all bookkeeping: take a batch of scored predictions with known outcomes, group them into confidence buckets (all the "about 80%" predictions together), and compute the actual positive rate inside each bucket. Plot stated against actual. A calibrated model sits on the diagonal; the sagging curve above shows the common failure - the high-confidence buckets are where overconfidence concentrates, exactly as it did in the human lab.

The connection to session 2 is the point: a model's "84% churn risk" is a confidence claim from an estimator, and it deserves the same audit a colleague's "90% sure" got. Nobody at Mango Lane had ever bucketed the churn model's outputs. The curve is an afternoon of work and it changes what the number is worth in the memo.

Real world

Mango Lane's churn model flags a segment at "84% risk". Bucketed against last quarter's outcomes, the 80-90 bucket actually churned at 71%. The score is still useful - it ranks customers well - but the memo cannot write "84% probability" with a straight face. Tonight's second tool fixes that properly: instead of hoping the probabilities are honest, wrap them in a set that carries a guarantee.

Self-studyWhy good models are often badly calibrated3 min▶

Ranking well and stating honest probabilities are different skills. A model can order customers from safest to riskiest almost perfectly while its stated probabilities run systematically hot or cold - training objectives reward separation, not honesty, and modern flexible models tend toward overconfidence at the extremes. Two practical consequences:

  • Never read a raw score as a probability until the calibration curve has been drawn on held-out data. The curve is the model's session-2 lab result.
  • Calibration drifts. A curve drawn last year certifies last year. Re-audit on a cadence, and treat a sudden sag as an early warning that the world the model learned has moved - which is exactly the condition that voids tonight's guarantee too.
Part 2 · covers conformal prediction

The guarantee: distribution-free, by construction

7 min live

Calibration curves diagnose; conformal prediction certifies. Instead of trusting the model's probabilities, it outputs a prediction SET - possibly one label, possibly several - built so that the set contains the truth at a rate you chose in advance. The remarkable part is what it does NOT need: no assumptions about the data's distribution, no assumptions about the model.

Verbatim · Angelopoulos & Bates 2021Conformal prediction sets "are valid in a distribution-free sense: they possess explicit, non-asymptotic guarantees even without distributional assumptions or model assumptions." The method works "with any pre-trained model, such as a neural network, to produce sets that are guaranteed to contain the ground truth with a user-specified probability, such as 90%."
Split conformal: four moves on top of ANY pre-trained model 1 · Hold out a calibration set n labeled points the model never trained on 2 · Score each point nonconformity, e.g. 1 - p(true label) high = truth surprised it 3 · Take the quantile ceil((n+1)(1-alpha)) / n of the sorted scores alpha = 0.1 for a 90% coverage target 4 · Build the set every label whose score falls below the threshold goes in the set The fine print: the guarantee is MARGINAL - on average over exchangeable data, not per customer. Distribution shift breaks exchangeability and voids the promise. A drifted quarter = renegotiate. A few lines of code on top of any model - including the booster from the ensemble course. The math does the rest.
🔍 Click to zoom - the split-conformal recipe, with the quantile step doing the guaranteeing
LiveThe recipe in plain words4 min▶

Split conformal is four moves, and only one involves any math (paraphrasing the Angelopoulos-Bates tutorial):

  • Hold out a calibration set - labeled points the model never saw in training. This is the model's exam, not its homework.
  • Compute a nonconformity score per calibration point - a number for how wrong the model looks there, e.g. 1 minus the probability it assigned the true label.
  • Take the ceil((n+1)(1-alpha))/n empirical quantile of those scores - for 90% coverage, alpha is 0.1. This threshold is where the guarantee is manufactured: the (n+1) is a finite-sample correction, not a typo.
  • Build the prediction set for a new customer: every candidate label whose score falls below the threshold goes in.

That is the whole method - a few lines on top of ANY model, including the gradient booster you built in the ensemble course. Uncertain customers naturally get bigger sets, confident ones get singletons; the set SIZE becomes an honest per-customer uncertainty readout even though the guarantee itself is an average.

LiveThe fine print is content, not a footnote3 min▶

Two conditions bound the promise, and the memo must carry both:

  • Marginal, not conditional. Coverage holds ON AVERAGE over exchangeable data - roughly 90% of customers get a set containing their truth. It is NOT a per-instance promise: no individual customer is personally guaranteed 90%, and coverage can run lower on some slices while the average still holds.
  • Exchangeability, not forever. The theorem assumes calibration data and new data are exchangeable - same well-shuffled deck. Distribution shift breaks that: a drifted quarter voids the promise outright.

The second condition is not a weakness to whisper - it is a reason to use session 1's machinery. The memo's flip-trigger should name it: "these sets are guaranteed under stable conditions; if the input distribution shifts materially, recalibrate before trusting them." A guarantee with stated conditions is a promise; one with hidden conditions is a liability.

Part 3 · covers what the promise buys the memo

Three grades of uncertainty, one labeled memo

4 min live

The estimates section upgrades tonight. "The model's churn set contains the truth for 90% of customers, guaranteed under stable conditions" is a sentence a CFO can audit - every word in it is checkable. Compare the three grades of uncertainty the memo could carry, and notice each has a legitimate place; the sin is leaving them unlabeled.

The uncertainty ladder: what certifies each rung Grade 1 · vibes "this segment is high risk" certified by: nothing Grade 2 · calibrated interval human 90% interval, session 2 certified by: measured hit rate Grade 3 · conformal set distribution-free coverage, tonight certified by: mathematical guarantee* *marginal, under exchangeability - the conditions ride along in the memo Each grade has a place. The memo's job is to LABEL which grade stands behind each number - never to let them blur.
🔍 Click to zoom - the three grades of uncertainty and what certifies each rung
LiveWhich grade goes where in the memo3 min▶
GradeBelongs whereMemo phrasing
VibesNowhere in the estimates section - at most, flagged as a hypothesis to be estimated"Team intuition, unquantified - listed for context only"
Calibrated human intervalOne-off judgment quantities no model scores: campaign uptake, deal size, a competitor's move"90% interval from a calibrated estimator (hit rate on record)"
Conformal setRepeated, model-scored predictions: churn, demand, ticket volume"Set contains the truth for 90% of customers, guaranteed under stable conditions"

The upgrade is auditability. A CFO cannot audit "high risk". They can audit a hit rate, and they can audit a coverage guarantee with stated conditions - which means the estimates section stops being a trust exercise and becomes a checkable document. That is what the promise buys.

Build-along

Build a conformal set by hand

★ 20 min · everyone builds

No library, no notebook - ten numbers and a pencil, because the quantile move is the entire method and doing it once by hand makes the guarantee stop being magic. Mango Lane's churn model, ten held-out customers, their nonconformity scores already computed (1 minus the model's probability on each customer's true label), already sorted: 0.02, 0.05, 0.08, 0.11, 0.15, 0.19, 0.24, 0.31, 0.42, 0.55.

Sort the calibration scores. Done for you above - ten scores, ascending. Each is one held-out customer: low score means the model gave the true label high probability (no surprise); 0.55 means the truth caught the model fairly flat-footed. The threshold you are about to pick comes from these ten exam results.

Compute the quantile for 90% coverage at n = 10. The recipe says take the ceil((n+1)(1-alpha))/n quantile: ceil(11 x 0.9)/10 = ceil(9.9)/10 = 10/10 - the 100th percentile, meaning the 10th and largest value: threshold = 0.55. Feel the finite-sample bump: with only 10 points, the guarantee demands the MAXIMUM score as the threshold. Small calibration sets buy wide promises - the honesty tax on tiny n.

Redo it at n = 19 and watch the tax shrink. ceil((19+1) x 0.9)/19 = ceil(18)/19 = 18/19 - the 18th of 19 sorted scores, comfortably below the maximum. Nine extra calibration points move the threshold off the worst case; a few hundred make it tight. Rule of thumb from the arithmetic: the calibration set is cheap coverage insurance - grow it.

Apply the threshold to a new customer. A candidate label for tonight's new customer scores 0.30. At the n = 10 threshold of 0.55: 0.30 < 0.55, so the label goes IN the prediction set. Now write the promise sentence exactly as the memo will carry it: "sets built this way contain the true label for 90% of customers, on average, under conditions exchangeable with calibration."

Upgrade the memo's estimates section. Go row by row: campaign uptake and any one-off judgment number stays a calibrated human interval (session 2's grade, hit rate cited). Every repeated model-scored prediction - the churn calls feeding the voucher case - becomes a conformal set with the stable-conditions caveat attached in the same sentence, and the flip-trigger gains a line: "material input drift voids the coverage guarantee; recalibrate before acting on the sets."

What to bring to session 5. Your memo with estimates now graded and labeled. The last empty section but one is the information verdict - the team still wants that $5k segmentation study before deciding, and session 5 prices it with arithmetic instead of politics. Bring the study request; leave with a verdict.

Homework

Before session 5

30 min
  1. Draw one real calibration curve - any scored model with known outcomes at work (churn, lead scoring, forecast). Bucket by stated confidence, plot actual frequency, note where it sags. Two sentences on what the worst bucket means for decisions built on it.
  2. Run the quantile arithmetic at three sizes - n = 10, 50, 500 for 90% coverage. Which sorted position becomes the threshold in each? Notice where the finite-sample bump stops hurting.
  3. Grade your memo's numbers - mark every estimate in your own memo as grade 1, 2, or 3. Any grade-1 number still sitting in the estimates section either gets an interval or gets demoted to "hypothesis".
  4. Write the shift clause - one sentence for your memo's flip-trigger naming what "material drift" means for your data and who re-checks calibration when it fires.
  5. Optional: skim the Angelopoulos & Bates tutorial, "A Gentle Introduction to Conformal Prediction and Distribution-Free Uncertainty Quantification" (arXiv 2107.07511) - sections 1 and 2 cover everything tonight taught, with code.
Check yourself

Three questions

Clear all three and session 4 gets stamped in your passport.

1 · The memo says the churn sets are "guaranteed to contain the truth 90% of the time, distribution-free". What is that guarantee actually promising?

Distribution-free means no assumptions on the data's distribution or the model - not "no conditions at all". The guarantee is MARGINAL coverage under exchangeability: right on average, silent per instance, and void under shift - which is why the memo's flip-trigger names drift explicitly.

2 · Ten sorted calibration scores, target coverage 90%. Which value becomes the threshold?

The (n+1) finite-sample correction is the whole trick: ceil(11 x 0.9) = ceil(9.9) = 10, so at n = 10 the guarantee demands the max. That is not a flaw - it is the price of an honest promise from ten data points. At n = 19 the threshold relaxes to the 18th of 19; more calibration data buys tighter sets.

3 · The memo has three numbers: campaign uptake (a one-off judgment call), churn per customer (model-scored, repeated), and "the segment feels risky". Which uncertainty grade belongs to each?

Conformal needs a model and repeated scored predictions - it cannot wrap a one-off judgment call, which is what the calibrated human stays for. The three grades coexist in one memo; the discipline is labeling which certificate stands behind which number, so a reader never mistakes a vibe for a guarantee.

Sources covered

What this session teaches, and where it came from

✓Angelopoulos & Bates, A Gentle Introduction to Conformal Prediction (arXiv 2107.07511)The distribution-free guarantee quoted verbatim; split-conformal recipe paraphrased from the tutorial - taught WITH its fine print: marginal coverage under exchangeability, not per-instance, voided by distribution shift
◐Session 2's calibration lineage (Lichtenstein-Fischhoff-Phillips; Hubbard)Recalled tonight to frame the model-side audit - full citations and caveats live in session 2
◐Model calibration curvesStandard reliability-diagram practice, presented as method rather than attributed finding; the worked churn buckets are Mango Lane course fiction

Every fact on this page, and its verification tier, is recorded in the course's source map.

Session 4 cheat sheet · pin this

Two kinds of 90The human's trained 90 (hit rate) and the algorithm's guaranteed 90 (theorem). The memo carries both - labeled.
The model auditBucket predictions by stated confidence, plot actual frequency. Sag below the diagonal = overconfidence, same as the human lab.
The guaranteeDistribution-free, non-asymptotic, any pre-trained model: sets contain the truth at your chosen rate - under exchangeability.
The recipeHold out calibration data · score nonconformity · take the ceil((n+1)(1-alpha))/n quantile · set = every label under it.
The small-n bumpn = 10 at 90% forces the MAX as threshold (10/10); n = 19 relaxes to 18/19. Grow the calibration set - it is cheap insurance.
The fine printMarginal, not per-instance; shift voids it. Name the conditions in the memo's flip-trigger - a promise with hidden conditions is a liability.