SStatistics, Built

Stage V · PhD Research

Part 65 of 65

The Dissertation

PhDstarts at this level54 min of film12 chaptersprerequisites: Part 57, Part 60, Part 64

How is new statistical knowledge made, and what has the whole degree shown?

The degree began in 1662 with John Graunt reading the Bills of Mortality, and it ends by carrying out one small piece of research on screen. The question is cut from Stage V's open problems: weighted conformal prediction keeps its coverage under covariate shift when the likelihood ratio is known, so what does estimating it cost? After reading the literature, the part states a conjecture precisely enough to be wrong and proves it: coverage is at least nominal minus the total variation distance between the reweighted source and the target. A simulation study of 45 cells with 1,000 replicates each tests the bound and five predictions, one of which fails, and the NHANES extract gives 73.4% coverage without weights and 90.5% with estimated ones. The original protocol is kept beside a post hoc amendment, and the rerun is reported as that. Then the full Coverage Board, every promise of the degree with its verdict, the completed transcript, and a reading list.

What you need. The whole series, and in particular weighted conformal prediction (Part 57), density-ratio weights under shift (Part 60) and simulation studies (Part 7).

Hook
back to Graunt
Mathematics
how statistical research is done, a mini-dissertation carried out on screen, the full Coverage Board, the reading list onward
Built
the thesis

What you will be able to do

Bachelor's

  • Read the Coverage Board: say what a row promises, what kept, conservative and broken mean, and what the Board cannot show.
  • Name the four habits the degree ends on, and give one part where each was learned.

Master's

  • Compute the total variation between two unit-variance normal laws, and the reweighted law that an exponential tilt of a standard normal produces.
  • Run weighted split conformal with the test point's atom at infinity, and report finite widths and infinite intervals separately.

PhD

  • Prove the coverage bound for weights fixed independently of calibration and test data, and say where the proof uses the common conditional law of the outcome.
  • State what the bound does not give: equality, conditional coverage, or a result for weights fitted on the calibration data.

Practice

  • Write a simulation protocol with predictions before running it, and report the failed predictions and any post hoc amendment as such.
  • Diagnose weighted conformal intervals in an application: effective sample size, largest weight share, and coverage by subgroup.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Bachelor's 18 min · Master's 32 min · PhD 54 min · Practice 32 min.

  1. 0Back to GrauntBachelor's3 min
  2. 1Choosing a questionPhD4 min
  3. 2Reading the literaturePractice5 min
  4. 3A conjecturePhD4 min
  5. 4A theoremPhD7 min
  6. 5The simulation studyPhD7 min
  7. 6Real dataPractice5 min
  8. 7Writing and reviewPractice4 min
  9. 8The full Coverage BoardBachelor's6 min
  10. 9The transcript completeBachelor's3 min
  11. 10Where to go nextBachelor's3 min
  12. The thesis, and farewellAll tracks3 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

Back to GrauntBachelor's3 min

The degree began in 1662, with a London haberdasher. John Graunt read decades of the weekly Bills of Mortality, the lists of London's dead, and found patterns that no single list showed: more boys born than girls, year after year, and the toll of the plague. A ledger became knowledge. Sixty-four parts later we have the tools to say how much any ledger can know, and how sure to be. One question is left, and it is the one a doctorate answers: how is new statistical knowledge made?

Graunt worked alone, from data no one had collected for his purpose. The statisticians of this series each added a piece: Gauss and Laplace the normal law, Fisher the likelihood and the experiment, Neyman the interval, Wald the decision, Efron the bootstrap, and the frontier's many names. Each piece began as an open question, a conjecture, a proof for a special case, evidence that it worked, and a paper that others could check. This part carries out that process once, on screen, on one of the open problems from the last ten parts, and reports the result honestly, whatever it turns out to be.

A doctorate is a supervised research qualification assessed by a university, rather than a checklist of topics. This series' exams and transcript are teaching metaphors; watching the course does not award a degree or establish mastery of everything in statistics. A dissertation typically contributes defensible knowledge: formulate a question, establish what follows under assumptions, test computational claims and state limitations. We illustrate that workflow on one small conformal-prediction problem. The result is a teaching derivation and reproducible study, with no claim that its theorem is novel or that a committee has examined this lesson.

The dissertation in one sentence. Weighted conformal prediction keeps its coverage under covariate shift when the shift is known; in practice it is estimated, and the question is how much coverage the estimation costs. The answer here: a theorem that bounds the loss by a total variation distance, a protocol-guided simulation study that tests the bound and five predictions, and an application to the Museum's NHANES data. Some predictions will hold and some may not; the report says which.

The plan. Chapters one to four: choosing the question, reading the literature, stating a conjecture, and proving a theorem. Chapters five to seven: the protocol-guided simulation study, the real-data application, and writing it up for review. Chapters eight to ten: the full Coverage Board of the whole degree, the completed transcript, and where to go next.

The last two promises. Part fifty-seven's weighted conformal prediction assumed the shift's likelihood ratio was known; chapters three to six estimate it, and count the cost. Part seven taught simulation as a way to check methods, without saying when to decide what to simulate; chapter five distinguishes an original written protocol from the present post hoc corrected rerun.

1Choosing a questionPhD4 min

A good dissertation question has four properties. It matters: someone's decisions depend on the answer. It is open: the literature does not already settle it, which takes reading to establish. And it is small enough to answer in the time available, with a precise statement that could turn out false. Most first questions are too large; the craft is in cutting them down without cutting out what made them matter.

Where do questions come from, in practice? From the open problems at the end of good papers, and of the last ten parts, which are lists other researchers left on purpose. From applied work: an analyst who used a method, saw something odd, and asked why. Many of the Board's broken rows began that way, as a practitioner's surprise. And from talking: a supervisor, a seminar, a colleague in another field whose data break your assumptions. A question that someone outside statistics needs answered is usually a good one.

Candidates from the last ten parts' open problems. Valid inference with learned adjustment sets, from Part sixty-two: important, but large. Private inference beyond the mean, from Part sixty-three: important, and a field of its own. Conditional guarantees for generation, from Part sixty-four: impossible in general, as Part fifty-seven proved. And coverage of weighted conformal prediction when the weights are estimated, from Parts fifty-seven and sixty: important for every deployed model whose population drifts, and small enough to make progress on.

The setting, from Part fifty-seven. Calibration data come from a source distribution P, and the test point from a target Q with the same conditional law of Y given X, but different covariates: covariate shift. Ryan Tibshirani, Rina Foygel Barber, Emmanuel Candes and Aaditya Ramdas showed in 2019 that weighting each calibration score by the likelihood ratio w of x restores the guarantee: coverage at least one minus alpha under Q. But w is the density of Q over the density of P, which nobody knows. It is estimated, usually with Part sixty's classifier trick, and the oracle theorem no longer applies automatically. Existing robustness results analyze estimated weights; this lesson derives one simple bound rather than establishing a new unsolved field.

Why it matters. A model trained on one hospital's patients and deployed at another, a survey's volunteers standing in for a population, a benchmark's questions for a user's: each can involve covariate shift, but equal conditional outcome laws must be justified rather than assumed from different populations alone, and each uses estimated weights if it corrects at all. A practitioner needs to know whether the promised ninety percent is still about ninety, or sixty. The question, stated so it can be answered: by how much can coverage fall, as a function of how wrong the weights are?

Cutting the question to size. Split conformal only, not full conformal or jackknife+, because its calibration set is cleanly separate. Covariate shift only, with the conditional law of Y given X unchanged, because that is the setting where weights are the right fix. Weights estimated on data independent of the calibration set, because that is the case a clean proof can reach; same-sample estimation and cross-fitting need additional analysis outside this proof. That does not mean all such cases are globally unsolved in the literature.

What would count as an answer? Decide before starting. A bound on the coverage loss in terms of something a user can estimate, or at least reason about. Evidence of whether the bound is useful in practice, or only true. And one real dataset where the truth is known, so the method's behaviour can be seen rather than assumed. Each of the next five chapters delivers one of these.

2Reading the literaturePractice5 min

Reading the literature: what is known, and where the gap is. How to read a statistics paper. Find the main theorem and write it in your own notation; most of a paper's length is the setup for one statement. List its conditions, and ask of each: is it needed, and is it checkable in practice? Then read the simulations and the application as evidence about the conditions that the theorem could not cover, and look for the case nobody tried. That case is often the gap.

The founding paper. Tibshirani, Barber, Candes and Ramdas, 2019: if the test point's covariate comes from Q, and w is the exact ratio dQ over dP, then the weighted quantile of the calibration scores, with the test point's own weight placed at infinity, gives coverage at least one minus alpha. The proof rests on weighted exchangeability: the joint law of the calibration points and the test point is exchangeable after reweighting by w. Its condition, a known w, is rarely checkable, and their own experiments estimated it with a classifier, and found that coverage held approximately.

Reading the founding proof closely, because the new theorem will lean on it. Under covariate shift, the joint density of the n calibration pairs and the test pair is the product of n source densities and one target density. Write the target density as w times the source density, and the joint density becomes w of the test covariate times a symmetric function. So, given the set of all n plus one values, the probability that a particular one is the test point is proportional to its weight. The test score's rank among the n plus one is therefore a weighted draw, and weighted quantile at level one minus alpha yields at-least-nominal marginal coverage. Discreteness, ties and large test mass can make coverage conservative; it need not equal the nominal level.

What came after. Rina Foygel Barber, Emmanuel Candes, Aaditya Ramdas and Ryan Tibshirani's Conformal Prediction Beyond Exchangeability, in 2023, bounded the coverage gap of weighted methods under arbitrary departures by total variation distances between the data and its swapped versions. Lihua Lei and Emmanuel Candes, in 2021, used estimated propensity weights for counterfactual intervals, and showed coverage approaches one minus alpha as the weights' estimation error shrinks. So the general principle, loss controlled by a distance, is known. What a practitioner lacks is the bound in a usable form, and evidence of how tight it is.

And reading the simulations. Ask what was varied, and what was held fixed: a study that varies only the sample size says nothing about the shift's size. Ask for Monte Carlo errors: a coverage of 89.6 percent from two hundred replicates cannot be told apart from ninety. And ask which settings are missing. The founding papers' simulations estimated the weights well; this lesson deliberately includes tempered and misspecified weights to illustrate degradation. We have not established that earlier literature omitted all such stress tests, so this is an educational design choice rather than a certified novel literature gap.

One habit for reading, and later for writing, proofs. Check every claimed formula numerically on a special case before believing it. This dissertation's Gaussian total variation, two Phi of half the distance minus one, was checked against a numerical integral on a fine grid, and the two agree to within a hundred-millionth. A proof can have an error that a careful reader misses; agreement of independent calculations is useful evidence, but both can share an error; a numerical check is not a proof. The test suite keeps those checks, so they are run again every time the code changes.

The lesson's role is deliberately modest: a worked research exercise, rather than an established new literature contribution. Derive a clean robustness bound using one population distance, analytically computable in the specified simulation laws. It is not automatically observable or estimable in an arbitrary application. Give a short proof with its conditioning and independence assumptions, then compare calculations against independent references. Preserve the original protocol, identify the present correction as post hoc, and report how coverage, widths, infinite intervals and slack behave. The goal is a checkable account of an existing idea, without an unsupported priority claim.

3A conjecturePhD4 min

A conjecture, stated precisely enough to be wrong. Change the target rather than the algorithm. A fixed positive weight function with finite nonzero source expectation defines a reweighted probability law. An arbitrary nonintegrable weight does not. The weighted conformal construction gives at least nominal marginal coverage for that reweighted covariate law with the common conditional outcome law, provided the score or fitted prediction model is independent of calibration and test data. It need not give exactly nominal coverage. Compare this artificial target with the actual target using total variation, which bounds differences in event probabilities. The distance is analytically computable in our Gaussian examples, while practical estimation of it can be hard.

The conjecture. Let the weights w hat be fixed, estimated on data independent of both calibration and the evaluated test point, and let the conditional law of Y given X be the same in source and target. Then the weighted split-conformal interval covers a test point from Q with probability at least one minus alpha minus the total variation distance between P sub w hat and Q's covariate law. When w hat is the true ratio, the distance is zero and Part fifty-seven's guarantee returns. A good conjecture contains the known case.

A special case where everything is explicit. Source N of zero and one, target N of mu and one: the true ratio is e to the mu x minus mu squared over two. An over-regularized classifier shrinks the log ratio by a factor lambda between zero and one: tempered weights, w to the lambda. Reweighting N of zero and one by them gives N of lambda mu and one. The total variation between two unit-variance normals is two Phi of half the distance between their means, minus one. So the bound is one minus alpha minus two Phi of one minus lambda times mu over two, plus one.

The conjectured bound against the temper lambda, for three shifts. Larger shifts, from green to red, make every error in the weights more costly. With a shift of one standard deviation, using no weights at all, lambda of zero, guarantees only percent; half-strength weights guarantee . At lambda of one the bound is the full ninety percent, and weights that overshoot are penalized as well. It gives a checkable lower bound, not a claim of sharpness. Simulated averages fluctuate; a discrepancy needs Monte Carlo uncertainty and implementation checks before challenging a proof.

A conjecture should come with its doubts. The bound uses only the covariates. If the conditional score distribution given x is constant, ordinary conformal already gives at least nominal coverage under any covariate shift, and the bound is wildly pessimistic. Strong score dependence may reduce the slack in this design, but does not by itself imply that the TV bound is sharp. That is a second, sharper prediction, and the simulation study is designed to test it, by varying how strongly the noise depends on x.

4A theoremPhD7 min

The conjecture becomes a theorem, and here is its proof. Theorem. Suppose the calibration pairs are independent draws from P, the test pair is drawn from Q, independent of them, and both share the conditional law of Y given X. Let w hat be a fixed positive weight function, independent of calibration and test data, with finite nonzero source mean. Condition also on any independently trained score model. For random independently learned weights the bound is conditional on their training; averaging introduces the expected TV penalty. Then the weighted split-conformal set built with w hat satisfies: coverage under Q is at least one minus alpha minus the total variation distance between P sub w hat and the covariate law of Q.

Step one: the method gives at least nominal marginal coverage for the reweighted source. Define P sub w hat by its density, w hat of x over the mean of w hat, relative to P. Then w hat is, up to a constant that the weighted quantile ignores, exactly the likelihood ratio of P sub w hat to P. So by Tibshirani and colleagues' theorem, applied with P sub w hat as the target, a test pair whose covariate is drawn from P sub w hat, with the common conditional law of Y, is covered with probability at least one minus alpha.

Step two: condition on the calibration data. Given the n calibration pairs, the conformal set is a fixed function of x, so the event that the test pair is covered is a fixed set A of pairs x, y. Its probability under Q and under Q tilde differ by at most the total variation between the two joint laws. And because both share the conditional law of Y given X, that joint distance equals the distance between their covariate laws: the conditional part cancels inside the integral.

Step three: average. For every calibration sample, coverage under Q is at least coverage under Q tilde minus the distance. Take expectations over the calibration sample; the distance does not depend on it, because w hat was fixed in advance. Step one bounds the expected coverage under Q tilde below by one minus alpha. So coverage under Q is at least one minus alpha minus the distance. That completes the proof.

Two corollaries, both used in the study. Tempered Gaussian-tilt weights: the bound of chapter three, exactly. A logistic classifier on x, under a Gaussian mean shift, estimates the log ratio as a line with slope b hat; reweighting N of zero and one by it gives N of b hat and one, so the bound is one minus alpha minus two Phi of the absolute difference of b hat and mu over two, plus one. Consistency follows: if b hat tends to mu, the lower bound tends to one minus alpha. Under a regular correctly specified fixed-dimensional logistic classifier, with source and target auxiliary sizes growing proportionally, its penalty is root auxiliary-sample-size in probability. This does not assert that absolute coverage error is root-n or remove finite-calibration conservatism.

A worked number, to make the theorem concrete. A shift of one standard deviation, and weights at half strength. The reweighted source is N of a half and one, the target N of one and one. Their total variation is two Phi of a quarter, minus one: about . So the guarantee is ninety percent minus that, percent. The study, with noise strongly dependent on x, found percent. True, and pessimistic by points.

A lower bound alone is half a story. The same argument, run the other way, bounds coverage above: at most the reweighted source's coverage plus the distance. But the reweighted source's coverage can itself be far above one minus alpha, when a test point's weight is large enough to make the interval infinite, as chapter five will show. So the two-sided statement needs a bound on the largest normalized weight, the same overlap condition that Part thirty-six's propensity weights need. That refinement is left for the discussion.

A practical variant. Both total variation and KL can be difficult to estimate reliably. In specified parametric models, KL sometimes has a convenient closed form; no automatic data-based certificate follows. Pinsker's inequality, from Part fifty, bounds total variation by the square root of half the KL divergence. So coverage is at least one minus alpha minus the square root of KL over two. For the tempered Gaussian weights, the KL divergence between N of lambda mu and N of mu is the square of one minus lambda, times mu squared over two, so the loss is at most the absolute value of one minus lambda times mu, over two: a line, a little looser than the exact curve, and easy to remember.

What the theorem does not say. It needs the weights fixed in advance. Estimating them on the calibration data itself, or cross-fitting, couples the weights to the scores; that case is not covered here. It is a lower bound only, and the doubts of chapter three suggest it may be far from tight. And it is close to known results: Barber and colleagues' 2023 bounds for weighted methods, under any departure from exchangeability, are of the same kind. The value here is a teaching reformulation and a measured illustration of slack. We have not established a novel theorem or exhaustive priority claim. Saying so is part of the work.

5The simulation studyPhD7 min

The simulation study, with its original protocol and explicit post hoc QA correction. Simulation designs can be selected after seeing flattering results. A written protocol helps expose that selection. Preserve original aims, methods, predictions and their timing evidence; record amendments separately rather than rewriting a prediction after it fails. This repository contains an original protocol stating that it preceded the historical run. Its initial commit also includes results and source, so that commit alone does not independently establish the earlier execution timing. The current QA correction was designed after seeing those published results. A separate QA amendment was committed before this corrected rerun. This is a transparent post hoc revision, not a new preregistered confirmation; the original protocol remains unchanged.

The protocol follows Tim Morris, Ian White and Michael Crowther's ADEMP, from 2019. Aims: measure the coverage lost with estimated or wrong weights, and check the bound. Data: source N of zero and one, target N of mu and one, mu of a half, one, or one and a half; the outcome sine x plus x over two plus noise whose scale is e to the gamma x, with gamma zero, a half or one. Estimand: coverage of the target at ninety percent. Methods: no weights, true weights, logistic estimated weights, tempered weights, and weights from a classifier that sees only the size of x. Performance: mean coverage with its Monte Carlo error over a thousand replicates per cell, widths, infinite intervals, and the bound.

How many replicates? Part seven's rule: decide the Monte Carlo error you can tolerate, then the number of runs. The pilot's error, with fifty replicates, was about half a point. A thousand replicates bring it to about a tenth of a point; the largest in the study was points. Forty-five cells, forty-five thousand replicates, each with five hundred calibration points and two hundred test points. Every seed is fixed.

The results, for the strongest dependence of the noise on x, gamma of one. Without weights, coverage falls as the shift grows, to percent at mu of one and a half. With true or estimated weights, coverage is at or above ninety percent everywhere. Tempered and misspecified weights lose part of the coverage. And the dashed lines are each method's bound from the theorem, computed from closed-form Gaussian or piecewise truncated-normal distances. The observed curves are compatible with the lower bounds after accounting for Monte Carlo error, and well above it.

How loose is the bound? The slack, coverage minus bound, at a shift of one, against gamma. For no weights, the slack falls from when the noise ignores x to when it depends strongly on x. The tempered and misspecified weights show the same pattern. So the bound is tightest exactly where chapter three predicted, and never tight: even at gamma of one it leaves more than ten points of slack. It is a safe guarantee, and a pessimistic estimate.

The price of coverage, using the median across replicates of each replicate's median finite interval width, with infinite fractions reported separately. Without weights the interval stays about units wide whatever the shift: it is calibrated to the source, where the noise is small. With correct weights it widens to about at the largest shift, because the target lives where exp of x makes the noise large. Correct intervals are wide when the truth is uncertain. Wrong weights land in between, in coverage and in width. No method beats the trade: these particular residual intervals pay substantial width under heteroscedastic shift. This is not an optimal-width theorem; a better score or conditional scale model can change that trade-off.

The cells with gamma of zero deserve their own look. There the noise does not depend on x, so the scores are exchangeable between source and target whatever the shift. Unweighted conformal covers , and percent at the three shifts, compatible with Part fifty-seven's at-least-nominal guarantee within simulation uncertainty. But the theorem's bound for it falls to percent at the largest shift. It is a bound that cannot see the scores. A sharper theorem would measure the distance between the score distributions, not the covariates.

The predictions, scored. One: no weights under-cover, more as the shift and gamma grow, and cover ninety percent when gamma is zero. Held. Two: true weights within three Monte Carlo errors of ninety percent, or above. Held. Three: estimated weights within one point of ninety percent in every cell. Failed: at mu of one and a half they cover up to percent. Four: tempered and misspecified weights under-cover but stay above the bound. Held. Five: the bound is loosest at gamma zero and tightest at gamma one. Held.

Why prediction three failed. At the largest shift, some test points lie where the source has almost no data, and their weight is huge. Then the normalized test weight exceeds alpha, so the finite calibration mass falls short of one minus alpha, and the interval is infinite: percent of intervals, against none without weights. Infinite intervals always cover. Finite intervals also have their own coverage; the saved decomposition reports both contributions. Infinite intervals are a contributor to conservatism, rather than a complete causal attribution for all excess coverage. The failure is in the safe direction, but it is a real cost: an interval of infinite width tells a user nothing. That is worth reporting, and it was not predicted.

What the study did not vary, stated as limitations. One covariate. In many dimensions, density-ratio estimation is far harder, and the classifier's errors far larger: Part fifty-two's curse. One calibration size, five hundred. Smaller sets make the weighted quantile noisier and infinite intervals more common. And the true mean function as the model, which isolates the conformal step but hides how a fitted model's errors interact with the shift. Each is a natural next study, and the protocol's code makes each a small change.

6Real dataPractice5 min

Real data: blood pressure for a population a study under-sampled. Use the 5,176-adult NHANES complete-case extract as a fixed empirical distribution, without survey weights. This is not a claim about national population coverage. Assign each stored row a source probability proportional to the logistic age-selection function, and target probability proportional to its complement. Age is top-coded at eighty and pressure averages available measurements. Draw training and calibration observations independently with replacement from the source, and independent test observations from the target. Repeated rows are allowed under this empirical resampling model. The source underrepresents older adults and the designed ratio is known. The target represents the complement-weighted empirical law, not a literal held-out list of unique people or a new national survey.

Fit the blood-pressure regression on an independent source training sample and compute absolute residual scores on a separate source calibration sample. Fit a density-ratio classifier on another thousand auxiliary source and thousand auxiliary target covariate draws, independent of training, calibration and test draws. The predictor is fixed when calibration begins. Equal auxiliary sample sizes make target odds proportional to the required ratio; its constant does not affect the weighted quantile. We no longer fit weights using calibration covariates. Compare no weights, oracle ratio and fitted ratio over two hundred repetitions, each evaluated on three thousand fresh target draws. The result is repeated empirical-distribution resampling evidence with saved Monte Carlo errors, not validation on independently collected new patients.

The results, for adults under sixty-five and for those sixty-five and over. Without weights, the interval promises ninety percent and covers percent overall, and only percent of the old, whose blood pressure is more variable and whom the study barely saw. With the true weights, coverage is percent. With the estimated weights, percent: in this finite resampling experiment. The classifier family can represent the true ratio, but finite-sample errors remain; similar coverages do not prove equality of methods. The honest interval is wider, about millimetres of mercury against : the price of covering the people the study missed.

Before trusting weighted intervals, check the weights. The estimated log weights correlate with the true ones: high correlation indicates similar ranking of weights, but is invariant to scale and does not establish an accurate density ratio. The revised experiment also saves the normalized empirical target-law TV error. But the weights are very unequal. Kish's effective sample size, Part eighteen's, is the square of their sum over the sum of their squares: about , out of about calibration points. The intervals rest mostly on the few older adults the study did include, and the single largest weight carries percent of the total. Report the effective sample size beside every weighted interval.

In practice no one knows the truth, so here is the workflow the application suggests. Fit the classifier for the weights on data separate from the calibration set, and check it, by its calibration and its area under the curve, as in Part thirty-four. Compute the effective sample size of the weighted calibration set, and the share of the largest weight; large maximum shares or low Kish effective size flag concentration and potential instability, not a formal impossibility of target inference. AUC measures discrimination and does not itself certify density-ratio accuracy or interval coverage. Then report the weighted interval beside the unweighted one. A large difference is itself the finding: weighting changes this particular calibrated residual distribution. That interval difference alone does not measure a unique amount of population shift.

How to read it. The weighted intervals still under-cover the old slightly, percent: the guarantee is marginal over the target, and the old are a subgroup of it, Part sixty-three's lesson about subgroups. The application supports the study's message in one setting where the classifier was well specified. It does not show what happens when the selection depends on something the classifier cannot see; that is a limitation to state, not to hide.

7Writing and reviewPractice4 min

Writing it up, and what referees will check. A statistics paper has a conventional shape, because readers search it in a conventional way. The introduction states the question, why it matters, and the contribution, in that order, on the first page. The method and theory sections state assumptions before results, and put long proofs in an appendix. The simulations and the application are evidence, organized by what each one tests; the discussion says what was not shown.

An abstract that matches the corrected evidence. Weighted conformal prediction gives at-least-nominal coverage under known covariate shift; we illustrate the effect of independently estimated or misspecified ratios. A short teaching proof gives a lower bound using the distance between the reweighted source and target, conditional on independent weight and model training. No new theorem priority is claimed. A post hoc corrected rerun preserves the original 45-cell design and reports original predictions, Monte Carlo errors, finite-width summaries and infinite intervals. Its estimates are compatible with the proved lower bounds. An independent-resampling NHANES example raises coverage from about seventy-three to about ninety-one percent; it concerns a fixed empirical law rather than national or newly collected patient outcomes.

The paper's figures, chosen so each makes one point. Figure one: the bound against the temper, for three shifts: what the theorem promises. Figure two: coverage by method and shift, with each method's bound dashed beneath it: the numerical estimates are compatible with the bound. Figure three: the slack against gamma: when it is tight. Figure four: NHANES coverage for the young and the old: what it means for real people. Four figures, each with its message as its caption, and every number in them traceable to a seeded line of code.

What referees check. Is the theorem new, and is it correct? A referee will notice the relation to Barber and colleagues, so say it first. Are the assumptions necessary, and are the simulations designed to break them, or only to flatter the method? The tempered and misspecified arms are there for that. Could the results be reproduced from what is published? Every number in this part is computed by a seeded script, cached, and tested.

A referee's report, as this dissertation might receive one. One: the theorem is close to Barber and colleagues' results; state the precise difference. Response: it is a special case with a single computable distance; the paper now says so in the introduction. Two: the bound is loose; is it useful? Response: the study measures exactly how loose, and when, and the discussion proposes a score-aware sharpening. Three: the application's classifier was correctly specified by construction. Response: agreed; the misspecified arm of the simulation shows the other case, and the limitation is stated.

Reproducibility needs concrete records. Version code and input hashes, record random generators, seeds, sample sizes, tolerances and environment. Fixed seeds alone do not guarantee identical final digits across every numerical library or platform. Check important formulas through independent derivations and numerical reference methods, then preserve checks as regression protection. Failures and numerical refinements belong in the evidence too. Preserve the original protocol and label our QA amendment as post hoc. We can verify the amendment's commit precedes this corrected computation; we cannot infer an independently timestamped historical preregistration merely from a protocol committed alongside results.

And the hardest part. Report the predictions that failed alongside those that held. Do not quietly change the protocol, the threshold or the comparison after seeing the data; Part fifty-six's forking paths apply to the researcher too. A dissertation whose results are all exactly as hoped deserves suspicion. One that says where its method fails is more useful, and more likely to be true.

8The full Coverage BoardBachelor's6 min

The Coverage Board collects repeated-sampling experiments across the course. A row has a specific target, nominal level, simulation design and achieved rate; some coverage rows average many correlated intervals within a replicate. Its kept, conservative and broken labels use a three-Monte-Carlo-SE screening rule. Where supplied, the SE comes from independent dataset-level averages. Legacy rows use a nominal Bernoulli reference. These labels are descriptive diagnostics rather than simultaneous hypothesis tests across the course. The rebuilt mosaic derives its row count, part count and stage totals from all current cached Board inputs. Missing inputs are rebuilt before totals are quoted, and their hashes are saved with this part.

Here it is, every row as a tile, stacked above its part, from the first course on the left to the research frontier on the right. promises kept. conservative under this simulation criterion, potentially paying in width or power. And broken. The exact fraction is determined by the current computations. These are deliberately selected demonstrations, not an estimate of how often statistical methods fail in practice. Most broken rows were put on the Board on purpose, as the naive method beside its repair: the iid error bar beside the clustered one, the in-sample value beside the split one, the unweighted interval beside the weighted one.

What breaks a promise, in the Board's own words. Ignored dependence: clustered pupils analysed as independent in Part thirty-five, two random walks regressed on each other in Part thirty-eight, benchmark questions in Part sixty-four. Selection and adaptivity: peeking at five looks in Part thirty-five, the winner's Wald interval in Part fifty-six, intervals after Thompson sampling in Part fifty-eight. A sample that is not the population: the opt-in poll of Part forty-one, the shifted sample of Part sixty, this part's unweighted intervals. And noise left out of the model: measurement error in Part forty-one, privacy noise in Part sixty-three, a judge's errors in Part sixty-four.

What keeps one. Randomization, which makes a design's own probabilities the basis of inference: Fisher's tests, Neyman's intervals, PPI's random human labels. Exchangeability, used carefully: permutation tests, conformal prediction, and weights when it fails. Robust variances that do not trust the model: the sandwich, cluster-robust errors, the bootstrap of clusters. And honest bookkeeping of what was chosen from the data: sample splitting, selective inference, anytime-valid tests.

The Board by stage. The foundations tested a handful of promises, mostly the first intervals and their small-sample failures. The methods stage tested the everyday tools, and found the classic traps: unadjusted multiple comparisons, overdispersion, the wrong variance. The master's stage holds the most rows, because it holds the most methods. The theory stage tested what theorems promise in finite samples, and found many conservative rows, the price of worst-case guarantees. And the frontier tested the newest methods against the naive ones they replace.

Five results worth remembering, with figures read from the current computations. The opt-in poll of Part forty-one, whose ninety percent interval covered the truth percent of the time in its simulation. The Cox model that counted immortal time in Part forty covered percent. Peeking at a z test five times in Part thirty-five turned a five percent test into a percent test. Its pupil-level interval for a school-randomized trial covered percent. And, from off the Board, Part sixty-four's reused holdout reported percent accuracy for a coin flip. These are selected examples from particular simulation designs, not universal numerical failure rates for those methods.

What the Board cannot show. Coverage is one property. A kept interval can be uselessly wide, and a test of the right size can have no power: the Board's rows recorded widths and power where they mattered, but the verdict ignores them. Coverage is marginal, over repeated samples from one simulated world; Part fifty-seven showed that conditional coverage is a different, harder promise. And every row is about the World or the Museum as simulated. A kept row means compatibility with its nominal rate in this experiment, and does not establish the assumptions on new data. A non-rejection of miscalibration is not proof of correct coverage. The Board is evidence, not proof.

The degree's lesson, in one line of the Board. A procedure's promise is a statement about repeated use, and it can be checked: by proof where possible, by simulation in the modeled settings. Passing finitely many simulations cannot establish a theorem for every distribution. The methods that keep their promises are the ones whose assumptions are made true by design, or made weak enough to be believable. And a broken row is not an embarrassment. It is the most useful thing a statistician can show a colleague: here is the method you were about to use, and here is what it actually does.

9The transcript completeBachelor's3 min

The transcript has tracked the degree since Part one: a cell for each part. Sixty-four filled. The last one fills now. Four milestones along the way: the bachelor's analysis at Part twenty, the comprehensive exam at Part forty-two, the qualifying exam at Part fifty-five, and this dissertation.

The timeline, every entry lit, from 1662 to now. Graunt's lists of the dead. The twentieth century's foundations: Pearson's chi-squared, Fisher's likelihood and experiments, Neyman's intervals and tests. The computer's century: the bootstrap, Markov chain Monte Carlo, the lasso, causal graphs. And the frontier the last ten parts reached: conformal prediction, anytime-valid inference, privacy, and statistics for a world of machine predictions.

The instruments built along the way, a few of the many. The World, a simulated population that every part could sample from, and the Museum, the real datasets from Graunt's Bills to ProPublica's COMPAS data. The Coverage Board, and the exact probability engine of Part two. Machines for single ideas: the Galton board, the tank factory, the interval rain, the permutation machine, the likelihood landscape, the trade-off plot, the leaderboard. And statkit, a statistics library of more than fifty modules, from random number generators to conformal prediction and privacy accounting, with numerical tests and audits of the examples used in this series. Tests can be incomplete and do not prove every function correct.

The five stages, by what they taught. Stage one, the foundations: probability, sampling, estimation and the first intervals. Stage two, the methods: regression, experiments, counts, Bayes, the bootstrap, time series, surveys, learning, and the bachelor's analysis. Stage three, the master's: likelihood and models in depth, borrowing strength, computation, smoothing, robustness, many variables and many questions, causes, space and time. Stage four, the theory a doctorate rests on; and stage five, the research frontier and this dissertation.

The series by its numbers. Sixty-five parts, each about an hour of narration: well over sixty hours, a substantial teaching sequence rather than an accredited degree or a substitute for supervised research. promises tested on the Coverage Board, across parts. Dozens of instruments, more than fifty statkit modules with their tests, and the Museum's real datasets, every one of them a reason to believe a number rather than to take it on trust.

10Where to go nextBachelor's3 min

A reading list beyond the series, one book for each direction. For theory: Aad van der Vaart's Asymptotic Statistics, and Martin Wainwright's High-Dimensional Statistics. For modelling: Andrew Gelman and colleagues' Bayesian Data Analysis, and Trevor Hastie, Robert Tibshirani and Jerome Friedman's Elements of Statistical Learning. For causes: Miguel Hernan and James Robins's Causal Inference: What If, and Guido Imbens and Donald Rubin's book. And for the frontier: Anastasios Angelopoulos, Rina Foygel Barber and Stephen Bates's book on conformal prediction, and the arXiv's statistics listings, every morning.

The open problems the last ten parts left, as directions within active literatures, not claims that every subproblem lacks existing results. Inference after selection with learned models, and conditional guarantees beyond the marginal. Anytime-valid inference for complex models, and adaptive experiments with honest intervals. Robustness to shift and contamination at once, and transport with estimated maps. Causal inference with learned adjustment sets, interference at scale, privacy beyond the mean, and statistics with models in every loop. And this dissertation's own: extensions beyond this proof for dependent weight fitting, and sharper score-aware analyses. Existing cross-fitting and robustness results should be checked before claiming novelty.

Where the field talks. The Annals of Statistics, the Journal of the Royal Statistical Society, Biometrika and the Journal of the American Statistical Association, for methods and theory. Applied journals in every science, where the methods meet their data and often fail in instructive ways. And the machine-learning conferences, where much of the frontier of Parts fifty-six to sixty-four now appears first.

The best way to keep learning, after a course like this one. Pick a paper you admire, and replicate its main table: its simulations, then its data analysis. You will find the choices the paper did not report, the tuning it needed, and, now and then, a result that does not reproduce. Each is a lesson no textbook gives. Then change one assumption and run it again. That is how most of this series' Board rows were made, and how most dissertations begin.

And four habits, the degree's in summary. Ask what the data could have been, not only what they are: the sampling distribution is the subject. Say what is assumed, and test what can be tested by simulation before trusting it. Prefer designs that make assumptions true over models that hope they are. And report what you find, including the broken rows.

The thesis, and farewellAll tracks3 min

The dissertation in five lines. A question that matters to every deployed model whose population drifts. A teaching theorem, conditional on independently trained weights and score model: coverage falls by at most a total variation distance. A post hoc corrected study whose estimates were compatible with the bound in of cells. An application in which estimated weights restored coverage from seventy-three to percent. And what is still open: weights estimated on the same data, and a sharper bound that looks at the scores as well as the covariates.

A last reflection on the dissertation itself. It did not overturn anything. It took a method people already use, stated what it promises when its main assumption is only approximately true, proved it, measured how pessimistic the statement is, and showed the method on real data. One of its five predictions failed, and the failure taught something the theorem did not: infinite intervals are the hidden cost of large shifts. That is what most research is. A careful step, honestly reported, that the next person can stand on.

Six last problems, with full solutions in the README. Why the weights' scale does not matter; the total variation between two normals; the tilted normal; why unweighted conformal survives any shift when the scores ignore x; the step of the proof that drops the conditional law; and, as a research exercise, a simulation that could break the theorem if its independence assumption were dropped.

The sources behind the dissertation: Morris, White and Crowther on simulation studies; Angelopoulos, Barber and Bates on conformal prediction; the weighted conformal papers; and, once more, Graunt.

If the whole degree had to fit in three questions, they would be these. What could the data have been? That is the sampling distribution, the idea behind every interval and test since Part eight. What is assumed, and what makes it true? Randomization, exchangeability, a model checked against the data. And how sure, honestly? An interval whose promise has been tested, a Board row that says kept, or a broken one that says why not.

Sixty-five parts of sixty-five. In 1662 a haberdasher read a ledger and saw what no single page showed. Every method since has been a way of seeing more from the page, and of saying honestly how much. That is the whole of statistics, and now it is yours. Go and make some knowledge.

Where it goes next. Nothing follows in the series. The part hands on a reading list, the open problems of Parts 56 to 64, and the habit of replicating a paper's main table before changing one assumption.

Key results

The part's results in one place, for revision.

The teaching theorem\(\displaystyle Q\bigl\{Y\in\hat C_{\hat w}(X)\bigr\}\ \ge\ 1-\alpha-\operatorname{TV}(P_{\hat w},Q_X),\qquad\allowbreak P_{\hat w}(dx)=\frac{\hat w(x)\,P_X(dx)}{\operatorname{E}_P\hat w(X)}\)
Total variation between shifted normal laws\(\displaystyle \operatorname{TV}\bigl(N(a,1),N(b,1)\bigr)=2\Phi\bigl(|a-b|/2\bigr)-1\)
Tempered weights tilt the source\(\displaystyle e^{\lambda\mu x}\,N(0,1)\ \propto\ N(\lambda\mu,1),\qquad\allowbreak \operatorname{TV}=2\Phi\bigl(|1-\lambda|\,|\mu|/2\bigr)-1\)
Pinsker's inequality in the tempered case\(\displaystyle \operatorname{TV}\le\sqrt{\operatorname{KL}/2},\qquad\allowbreak \operatorname{KL}=(1-\lambda)^2\mu^2/2\)

Try it

Lab 65 · Weighted conformal under shift: coverage against the total-variation bound

Calibrate on X ~ N(0, 1), test on X ~ N(1, 1), with noise that grows with x. Run split conformal with no weights, half-strength weights, exact weights and weights estimated by a classifier, and compare each coverage with the theorem's lower bound 1 - alpha - TV.

Figure produced by Lab 65: Weighted conformal under shift: coverage against the total-variation bound
Produced by the lab below, seed 0, in 0.8 s.
python -m videos.stats.labs 65 needs numpy, scipy, matplotlib · download lab65.py · source on GitHub
TV(N(lam mu, 1), N(mu, 1)) at lam = 0, 0.5, 1    0.383, 0.197, 0.000
no weights (lam = 0)                             coverage 0.689 ± 0.004   bound 0.517   infinite intervals 0.00%
tempered weights (lam = 0.5)                     coverage 0.819 ± 0.004   bound 0.703   infinite intervals 0.00%
exact weights (lam = 1)                          coverage 0.900 ± 0.005   bound 0.900   infinite intervals 0.03%
estimated weights                                coverage 0.906 ± 0.005   bound 0.877   infinite intervals 0.07%
no weights, scores independent of x (gamma = 0)  coverage 0.898 ± 0.003   bound 0.517

Coverage stays above nominal minus the total variation between the reweighted source and the target; the bound is a floor, not a prediction, and it is loosest when the scores ignore x.
The code (78 lines; it asserts its own result)
"""Lab 65: rerun one row of the dissertation's study and test its coverage bound."""

import numpy as np
from scipy import stats

from videos.coursekit import labs
from explainer.stats.kit import thesis

TITLE = "Weighted conformal under shift: coverage against the total-variation bound"
GOAL = ("Calibrate on X ~ N(0, 1), test on X ~ N(1, 1), with noise that grows with x. Run split conformal with no "
        "weights, half-strength weights, exact weights and weights estimated by a classifier, and compare each "
        "coverage with the theorem's lower bound 1 - alpha - TV.")
TASKS = [
    "Set gamma = 0, so the scores do not depend on x. Which methods now cover 90%, and how loose is the bound?",
    "Raise the shift mu to 1.5 and record the fraction of infinite intervals for the exact weights.",
    "Use method='misspecified' (a classifier that sees only |x|). Is its coverage above its bound, and is the "
    "bound useful?",
]

ALPHA, MU, GAMMA = 0.1, 1.0, 1.0


def cell(method, reps, rng, lam=0.5, gamma=GAMMA):
    r = [thesis.one_run(500, 500, MU, gamma, ALPHA, method, rng, lam=lam) for _ in range(reps)]
    c = np.array([x["coverage"] for x in r])
    return {"cov": float(c.mean()), "se": float(c.std(ddof=1) / np.sqrt(reps)),
            "bound": float(np.mean([x["bound"] for x in r])), "inf": float(np.mean([x["inf"] for x in r]))}


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()

    # the bound's penalty in closed form, against quadrature of the reweighted density
    for lam in (0.0, 0.5, 1.0):
        closed = 2 * stats.norm.cdf(abs(1 - lam) * MU / 2) - 1
        numeric = thesis.tv_reweighted(lambda x, lam=lam: np.exp(lam * MU * np.asarray(x, float)), MU)
        assert abs(closed - numeric) < 1e-4 and abs(thesis.coverage_bound(ALPHA, MU, lam) - (1 - ALPHA - closed)) < 1e-12
    lab.row("TV(N(lam mu, 1), N(mu, 1)) at lam = 0, 0.5, 1", ", ".join(
        f"{thesis.tv_gauss_shift(lam * MU, MU):.3f}" for lam in (0.0, 0.5, 1.0)))

    reps = 80
    cells = {"no weights (lam = 0)": cell("none", reps, rng), "tempered weights (lam = 0.5)": cell("tempered", reps, rng),
             "exact weights (lam = 1)": cell("oracle", reps, rng), "estimated weights": cell("estimated", reps, rng)}
    for name, c in cells.items():
        lab.row(name, f"coverage {c['cov']:.3f} ± {c['se']:.3f}   bound {c['bound']:.3f}   infinite intervals {c['inf']:.2%}")
        assert c["cov"] >= c["bound"] - 3 * c["se"], f"{name}: coverage is not below the theorem's bound"
    flat = cell("none", reps, rng, gamma=0.0)
    lab.row("no weights, scores independent of x (gamma = 0)", f"coverage {flat['cov']:.3f} ± {flat['se']:.3f}   bound {flat['bound']:.3f}")
    lab.note = ("Coverage stays above nominal minus the total variation between the reweighted source and the "
                "target; the bound is a floor, not a prediction, and it is loosest when the scores ignore x.")
    none, half, exact, est = cells.values()
    assert none["cov"] < 0.75 < half["cov"] < exact["cov"] + 0.02, "coverage rises as the weights approach the truth"
    assert abs(exact["cov"] - 0.9) < 0.03 and abs(est["cov"] - 0.9) < 0.04, "exact and estimated weights restore about 90%"
    assert est["bound"] < 0.9 and abs(exact["bound"] - 0.9) < 1e-6, "estimated weights pay a TV penalty in the bound"
    assert abs(flat["cov"] - 0.9) < 0.02 and flat["bound"] < 0.55, "with scores independent of x no weights are needed"

    fig, ax = labs.figure(2, size=(11, 4.2))
    lam = np.linspace(0, 1.3, 131)
    ax[0].plot(lam, [thesis.coverage_bound(ALPHA, MU, v) for v in lam], color=labs.RED, label="bound: 0.9 - TV(N(lam mu, 1), N(mu, 1))")
    ax[0].errorbar([0, 0.5, 1], [none["cov"], half["cov"], exact["cov"]], yerr=[2 * none["se"], 2 * half["se"], 2 * exact["se"]],
                   fmt="o", color=labs.BLUE, capsize=3, label=f"simulated coverage ± 2 SE ({reps} replicates)")
    ax[0].errorbar([1.12], [est["cov"]], yerr=[2 * est["se"]], fmt="s", color=labs.GREEN, capsize=3, label="estimated weights (drawn beside lam = 1)")
    ax[0].axhline(0.9, color=labs.MUTED, ls="--", lw=1.2, label="nominal 90%")
    ax[0].set(title="Coverage under a shift of one sd, noise growing with x", xlabel="temper lam of the weights exp(lam mu x)",
              ylabel="coverage on the target", ylim=(0.45, 1.0))
    ax[0].legend(loc="lower right")
    x = np.linspace(-3.5, 4.5, 400)
    src, mid, tgt = stats.norm.pdf(x), stats.norm.pdf(x, 0.5 * MU), stats.norm.pdf(x, MU)
    ax[1].plot(x, src, color=labs.BLUE, label="source N(0, 1)")
    ax[1].plot(x, mid, color=labs.GOLD, label="source reweighted with lam = 0.5")
    ax[1].plot(x, tgt, color=labs.GREEN, label="target N(1, 1)")
    ax[1].fill_between(x, mid, tgt, where=tgt > mid, color=labs.RED, alpha=0.35,
                       label=f"TV = {thesis.tv_gauss_shift(0.5 * MU, MU):.3f}")
    ax[1].set(title="The penalty: what the weights fail to move", xlabel="x", ylabel="density", ylim=(0, 0.62))
    ax[1].legend(loc="upper left", ncols=2)
    lab.fig = fig
    return lab

Now change it

  1. Set gamma = 0, so the scores do not depend on x. Which methods now cover 90%, and how loose is the bound?
  2. Raise the shift mu to 1.5 and record the fraction of infinite intervals for the exact weights.
  3. Use method='misspecified' (a classifier that sees only |x|). Is its coverage above its bound, and is the bound useful?

Problems, with solutions

Try each problem before opening its solution.

  1. Scale invariance. Show that weighted conformal with weights \(c\,\hat w\) gives the same set for every constant \(c > 0\).

    Solution

    Multiplying calibration and test weights by the same positive constant leaves normalized masses, the weighted quantile and the prediction set unchanged.

  2. Normal TV. Show that \(\mathrm{TV}(N(a, 1), N(b, 1)) = 2\Phi(|a - b|/2) - 1\).

    Solution

    Densities N(a,1), N(b,1) cross at (a+b)/2. Their mass difference on either half-line is 2Φ(|a−b|/2)−1.

  3. Normal tilt. Show that reweighting \(N(0, 1)\) by \(e^{\lambda\mu x}\) gives \(N(\lambda\mu, 1)\).

    Solution

    Completing the square in exp(λμx−x²/2) gives N(λμ,1) after normalization.

  4. Scores independent of covariates. Show that if the conditional score law is constant in \(x\), with an independently trained score, unweighted split conformal covers \(Q\) at \(\ge 1 - \alpha\) under any covariate shift.

    Solution

    Conditional on independently trained score/model parameters, suppose the law of S|X=x is constant across x. A covariate shift then preserves the score law; ordinary unweighted split-conformal scores are exchangeable and coverage is at least 1−α. Merely omitting x as an explicit score argument does not ensure this condition.

  5. Common outcome kernel. Show that \(|Q(A) - \tilde Q(A)| \le \mathrm{TV}(Q_X, \tilde Q_X)\) when \(Q\) and \(\tilde Q\) share \(P_{Y \mid X}\).

    Solution

    For any event A, integrate its indicator against P(dy|x) to obtain g(x)∈[0,1]. The supremum of its integrals against Q_X−P_ŵ is TV. Taking events depending only on x proves equality for the joint laws sharing that kernel.

  6. Dependent-weight stress test. Design a simulation, with ADEMP, that could refute the theorem if its independence assumption were dropped.

    Solution

    Compare independently fitted weights with weights overfitted on the calibration observations under strong shift. Use bounded/clipped positive weights or verify integrability; arbitrary high-degree exponential-polynomial weights need not normalize. Record coverage and each replicate's bound with empirical gap MC SE; write the prediction before execution. A failure would challenge an extension to dependent fitting, not the stated independent-training theorem.

Limitations include one covariate and calibration size in the simulation, the known mean, deliberately designed empirical selection, weak overlap and loose covariate-only bounds. Cross-fitting and sharper score-aware bounds require separate arguments and checking existing literature before asserting novelty.

Notes and sources

Sources

  • Graunt, Natural and Political Observations Made upon the Bills of Mortality (1662).
  • Tibshirani, Barber, Candès & Ramdas, Conformal prediction under covariate shift, NeurIPS (2019).
  • Barber, Candès, Ramdas & Tibshirani, Conformal prediction beyond exchangeability, Annals of Statistics 51 (2023).
  • Lei & Candès, Conformal inference of counterfactuals and individual treatment effects, JRSS B 83 (2021).
  • Morris, White & Crowther, Using simulation studies to evaluate statistical methods, Statistics in Medicine 38 (2019).
  • Angelopoulos, Barber & Bates, Theoretical Foundations of Conformal Prediction (2024); Kish, Survey Sampling (1965).
  • van der Vaart, Asymptotic Statistics; Wainwright, High-Dimensional Statistics; Gelman et al., Bayesian Data Analysis; Hastie, Tibshirani & Friedman, The Elements of Statistical Learning; Hernán & Robins, Causal Inference: What If; Imbens & Rubin, Causal Inference for Statistics, Social, and Biomedical Sciences.

The cached full Board checks its historical input set, contributors and SHA-256 values on load. After changing earlier numerical inputs, explicitly regenerate it with python -m videos.stats.stats65.compute --force fullboard; rendering rejects stale or legacy aggregates.

About this partfrom its README

The final part illustrates a research workflow: question, literature, conjecture, proof, numerical study, application, writing, and review. The course transcript is a teaching metaphor; watching it does not award a university qualification. The result is a teaching derivation of established weighted-conformal robustness ideas, without an established novelty or exhaustive literature-priority claim.

What is computed and built

Let calibration pairs be IID from P, and let an independent test pair have law Q, with a common conditional law Y|X. Use a fixed score or prediction model trained independently of calibration and test data. For a positive measurable weight ŵ, fixed independently of those observations, assume 0 < E_P ŵ(X) < ∞ and define P_ŵ(dx) = ŵ(x)P_X(dx)/E_P ŵ(X). The weighted split-conformal construction, including its test atom at infinity, satisfies

Q{Y ∈ Ĉ_ŵ(X)} ≥ 1 − α − TV(P_ŵ, Q_X).

The inequality is marginal over calibration and test draws. It is an at-least-nominal guarantee, not an assertion of equality or conditional coverage for every x. For an independently learned weight/model, condition on their training samples first; averaging over weight training gives an expected-TV penalty.

  1. For the artificial target Q̃ = P_ŵ ⊗ P_{Y|X}, ŵ is proportional to its exact covariate likelihood ratio. The weighted-exchangeability result of Tibshirani et al. (2019) gives marginal coverage at least 1 − α.
  2. Conditional on the calibration data, the coverage event is a fixed measurable set A. Its probabilities under Q and Q̃ differ by at most TV(Q, Q̃).
  3. Their common conditional outcome kernel implies TV(Q, Q̃) = TV(Q_X, P_ŵ). Average over calibration data.

This reformulates known weighted-conformal and TV-robustness arguments for the lesson. Barber et al. (2023) and Lei & Candès (2021) contain related robustness analyses; neither the theorem nor the simulation design establishes a new research contribution.

Under P_X = N(0,1), Q_X = N(μ,1), weights exp(λμx) produce N(λμ,1), so TV is 2Φ(|1−λ||μ|/2) − 1. A logistic classifier with slope b̂ similarly gives TV = 2Φ(|b̂−μ|/2) − 1. Consistency of b̂ makes the penalty vanish. A root auxiliary-sample-size penalty requires regular, correctly specified fixed-dimensional logistic estimation and proportional growth of source/target samples; it is not a root-n theorem for absolute coverage error. Pinsker gives TV ≤ √(KL/2); in the tempered-normal case KL = (1−λ)²μ²/2. Estimating TV or KL from practical data can itself be difficult.

What is computed and built

The part adds four rows: shifted unweighted conformal 68.8%, estimated-weight conformal 90.6%, unweighted NHANES 73.4%, and estimated-weight NHANES 90.5%, each against 90% nominal coverage. All four save empirical dataset-level MC SEs. The full mosaic is rebuilt only when every Board-contributing part has an input; totals, stage counts, and historical examples come from current inputs with saved hashes. Its labels use descriptive three-MC-SE screening. Legacy rows use a nominal Bernoulli reference; the mosaic is not a simultaneous test or an estimate of failure rates in statistical practice. Deliberately selected counterexamples are overrepresented. Passing a row does not validate new-data assumptions or guarantee useful width/power.

NotesNHANES empirical-distribution demonstration

The Museum extract contains 5,176 complete age/BMI records with at least one finite systolic blood-pressure reading. The outcome averages the available readings. Age is top-coded at 80. Survey weights and the survey sampling design are not used, so the experiment does not establish national population coverage.

On this fixed table, define source row mass proportional to π(age)=expit(−(age−45)/8) and target mass proportional to 1−π(age). Because selection depends only on covariates, these laws share Y|X. All five samples are independent IID draws with replacement: model training 1,093, calibration 1,094, auxiliary source 1,000, auxiliary target 1,000, target test 3,000. Repeated rows are expected under this empirical experiment. A fitted mean uses age, squared age, BMI and their interaction. A separate regularized logistic classifier estimates the target/source density ratio using age, squared age and BMI.

Across 200 independent replicates:

Weights Coverage ± MC SE Age ≥65 Age <65 Mean of replicate median finite widths, mmHg
None .73430 ± .00160 .64619 .79700 41.07
Oracle .90504 ± .00267 .87844 .92397 63.34
Estimated .90536 ± .00262 .88003 .92339 63.07

The source has 2.04% older adults versus 41.54% in the target (24.85% in the original table). Mean calibration weight ESS is 82.04 oracle / 81.68 estimated, out of 1,094; mean largest shares are 5.13% / 5.51%. These concentration diagnostics are not exact information counts or coverage certificates. Estimated/true log-weight correlation is .99862, which alone does not establish weight accuracy. The estimated-weight mean finite-table TV is .05626, giving the conservative mean lower bound .84374. The estimated infinite fraction is .00279.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: back to Graunt. A ledger became knowledge. Who makes knowledge now, and how?
  2. Choosing a question. An open problem from Parts 56–64, chosen at writing time (for example, coverage of weighted conformal intervals when the weights are estimated).
  3. Reading the literature. How to read a statistics paper: the theorem, its conditions, the simulation, the gap.
  4. A conjecture. Stated precisely.
  5. A theorem for a special case. Proved on screen.
  6. The simulation study. Original protocol plus a disclosed post hoc QA amendment (Part 7; Morris, White & Crowther 2019); a seeded Gaussian experiment with 45 cells and 1,000 replicates per cell; Monte Carlo errors; the result and failed predictions, reported whatever they are.
  7. Real data. An application from the Museum.
  8. Writing and review. Structure of a paper; what referees check; reproducibility.
  9. The full Coverage Board. More than a hundred promises tested across the degree: which were kept, which broken, and the lessons in one table.
  10. The Transcript complete. The degree in one picture; the timeline lit from 1662 to now.
  11. Where to go next. The reading list beyond the series.

Built: the thesis: code, study and a short paper in the part's README.

Build the film

python -m videos.stats.stats65.compute        # the part's numbers, into .cache/stats65
python tools/build.py stats65                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py stats65 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/stats/stats65. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
OMP_NUM_THREADS=1 python -m videos.stats.stats65.compute
python -m pytest tests/test_stats65_checked.py tests/test_stats_kit_thesis.py
python tools/build.py stats65 -q l
python tools/qa_scene.py stats65 Study
python tools/lecture_length.py stats65 --floor 50

All previous Board inputs must be generated before fullboard; missing contributors fail explicitly. English source/numerical review and sampled rendering evidence are distinct from continuous narrated playback/listening, Chinese narration/captions and final masters.