Inference After Selection
How do you give honest uncertainty about a question chosen by looking at the data?
Ioannidis's 2008 paper on inflated associations opens the part, with the World's gene study: the twenty genes with the largest statistics out of 5,000 have estimated effects of 1.84 standard deviations against true effects of 1.23, and a replication lands at 1.22. The part states the problem (the winner's curse by the number of questions, conditional against simultaneous coverage, the false coverage rate) and then builds four families of answer, each with its price. PoSI covers every submodel at once with a constant between root 2 log p and root p. Conditional selective inference proves the polyhedral lemma, turns the lasso's selection event into a truncated normal in the selection window, and gives selective intervals on Stamey's prostate data, where they restore 95% coverage at about twice the length. Randomization, carving, data fission and thinning buy shorter intervals with added noise or split information. Knockoffs and conformal selection control an error rate over the selected set and give no intervals. The part ends with inference on winners for the prostate microarray's top gene, the test of clusters found in Old Faithful and Newcomb's data, and the open problems.
What you need. Stages I to IV of the series: the multivariate normal and its conditionals, the lasso and its KKT conditions (Parts 32, 52), FDR control (Part 33), martingales and optional stopping (Part 44), and testing theory (Part 46).
- Hook
- the winner's curse
- Mathematics
- PoSI, conditional selective inference, randomization and carving, data fission and thinning, knockoff theory, conformal selection, inference on winners
- Built
- statkit.selective
What you will be able to do
Bachelor's
- Explain the winner's curse on the gene study: why the top twenty estimates shrink on replication although every one of the effects is real.
- Compute the coverage of the usual 95% interval for the largest of K null estimates, 0.975^K - 0.025^K, and say what it is at K = 10 and K = 100.
Master's
- Compute a truncated-normal pivot and invert it into a selective interval for an estimate reported because it crossed a threshold.
- Split a normal observation by data fission, show the two pieces are independent, and choose tau for a given budget of selection noise.
PhD
- Prove the polyhedral lemma and derive the lasso's selection polyhedron from its KKT conditions at a fixed lambda.
- Prove FDR control for knockoff+ by the supermartingale argument, stating the sign-flip property it needs.
- State what conditional, simultaneous and false-coverage-rate guarantees each promise, and why conditional and simultaneous coverage do not imply one another.
Practice
- Diagnose selection in an analysis (stepwise P-values, OLS after the lasso, tests of clusters found in the same data) and choose a correction: splitting, fission, a selective interval or a simultaneous one.
- Report a selected finding with the selection rule, an interval valid after it, and no interval where the method (knockoffs, conformal selection) controls only an error rate.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Bachelor's 13 min · Master's 22 min · PhD 55 min · Practice 22 min.
- 0Inflated discoveriesBachelor's4 min
- 1The selective-inference problemBachelor's6 min
- 2PoSIPhD4 min
- 3Conditional selective inferencePhD7 min
- 4Randomization and carvingPhD4 min
- 5Data fission and thinningPractice5 min
- 6Knockoff theoryPhD6 min
- 7Conformal selectionPhD4 min
- 8Inference on winnersPhD5 min
- 9Selection in unsupervised problemsPractice4 min
- 10Open problemsPhD2 min
- Recap, problems, and the road aheadAll 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.
Inflated discoveriesBachelor's4 min
This is the first part of the research stage. Each part from here centres on a few recent papers, proves their main results, reproduces their central experiment, and ends with open problems. In 2008 John Ioannidis published a paper with a blunt title: why most discovered true associations are inflated. A field tests many associations, and reports the ones whose estimates cross a threshold. But crossing the threshold selects the lucky draws, the ones whose noise happened to push them up. So when the findings are replicated, the effects come in smaller. Auction theorists call it the winner's curse: the winning bid is the one that overestimated the most.
The World can show it, because in the World we know the truth. Its gene study measures five thousand genes on twenty-five patients and twenty-five controls. Take the twenty genes with the largest test statistics. Their estimated effects, in red, average standard deviations. Their true effects, in white, average . And a replication study, a fresh twenty-five and twenty-five, finds , close to the known truth in this draw. A fresh replication still has sampling error. The discoveries were inflated by about percent, even though every one of these twenty genes is genuinely involved. Selection amplified the sampling noise, even though these associations are real.
This part's question: how do you give honest uncertainty about a question that was chosen by looking at the data? There are four families of answer, each with its own price. You can cover every question you might have asked, which is the idea of post-selection inference, PoSI. You can condition on having asked this particular question, which is selective inference. You can pay a little noise, or a little data, for the freedom to select as you like: randomization, splitting and fission. Or you can control an error rate over the whole selected set, as knockoffs and conformal selection do.
A short history. In 1975 David Cox analysed sample splitting: select on one half of the data and test on the other. In 2006 Hannes Leeb and Benedikt Pötscher proved a sobering impossibility: the distribution of an estimator after model selection depends on unknown parameters in a way that cannot be estimated uniformly, under the paper's model-selection conditions. This rules out a uniform distribution-estimation fix there, not every form of valid post-selection inference. The response came in two forms. Berk and colleagues in 2013 covered every model at once. Lee, Sun, Sun and Taylor in 2016 conditioned on the selection, exactly and computably, and the field of selective inference grew from there.
This part's instrument is the selection window. In grey, the law of a statistic, normal with mean mu. The gold band is where it must fall to be reported: above one point nine six, significant. In blue, the same law given that it was reported: cut at the threshold and rescaled to have total mass one. That is the law a reader of the published finding should use. The observed value here is two point three. Under the selected law with mu zero, the chance of a value at least this large is not one percent but : a finding that looked significant is not, once you account for how it was found.
Two promises come due. Part thirty-three controlled the false discovery rate over thousands of questions, and quietly let us read the discoveries' estimates at face value. This part distinguishes interval guarantees from the false discovery rate guarantees of knockoffs and conformal selection. And Part fifty-two's lasso selected variables, while its intervals assumed the question had been fixed in advance. Chapter three gives inference on the lasso's own model.
Numbers: top 20 of 5,000 genes: estimated 1.84 SD, true 1.23, replication 1.22; selected-window pivot 0.42 at μ = 0 for y = 2.3
1The selective-inference problemBachelor's6 min
The selective-inference problem: why an interval built for a fixed question fails a chosen one.
The setting. Data Y, and many questions one might ask of it: K effects, coefficients or differences. A selection rule, S of Y, looks at the data and chooses which question to report: the largest effect, the variables a lasso keeps, the clusters an algorithm finds. For any fixed question, the usual interval covers with probability one minus alpha. For the chosen question it need not, because the interval was built for a question that nobody chose in advance. The selection is part of the experiment, and inference must account for it.
The simplest case. K independent standard normals, every true mean zero, and we report the largest. The reported value's average is its bias: with ten candidates and with a thousand, growing like the root of two log K, the Gaussian maxima of Part fifty-one. In red, how often the usual interval, the maximum plus or minus one point nine six, covers the true value of zero. percent with ten candidates, with a hundred, and no hits in these four thousand draws with a thousand candidates; the exact probability is tiny and positive. Nothing is wrong with the interval; it is being asked a question it was not built for.
A Bayesian aside. Philip Dawid pointed out that a posterior for a selected mean is the same whether or not it was selected: selection does not change the likelihood of the data you condition on. But this is reassuring only if the prior is right; the selection effect is moved into the prior, not removed. Empirical Bayes makes it concrete. Tweedie's formula from Part twenty-five shrinks each estimate toward the bulk using the estimated density of all of them. The identity uses the true Gaussian marginal density; estimating its derivative introduces error and gives no individual confidence guarantee. Shrinkage need not always be largest at the winner. Bradley Efron proposed it in 2011 as a frequentist correction for the winner's curse, learned from all K estimates at once.
What should a valid interval promise? Three answers. Simultaneous coverage: the intervals for all questions cover together, so whatever is selected is covered. Conditional coverage: given that question j was selected, its interval covers with probability one minus alpha, for every j. Conditional and simultaneous coverage are different guarantees: neither implies the other in general. Fithian, Sun and Taylor argue that conditioning matches what a reader of a selected finding wants. Coverage on average over the selected set: the false coverage rate of Yoav Benjamini and Daniel Yekutieli, from Part thirty-three. Or sidestep the problem, using independent pieces of data for selecting and for inferring.
The choice between conditional and unconditional guarantees is a real debate. A conditional guarantee is valid for the question actually asked, whatever else might have been selected. An unconditional one is valid on average over all the selections that might have happened. The case for conditioning is the reader's view: someone reading a paper sees one selected finding, and wants an interval that is honest for that finding. The case against is cost: conditioning on a narrow selection can make intervals very long, and for many decisions an average guarantee is enough. Both answers appear in this part.
Selection is everywhere in practice, and usually invisible in the paper. Stepwise regression, followed by the final model's P-values. The variables a lasso keeps, refitted by least squares and reported with ordinary intervals. Clusters found in the data and then tested for differing means, which is guaranteed to look significant. And the best of several subgroups, outcomes or model specifications: the garden of forking paths of Part thirty-three. Each needs a different correction, and this part builds them.
The simplest correction, from Benjamini and Yekutieli in 2005, has this simple form for independent coordinate estimates and a simple selection rule. Simple means that varying one selected coordinate while keeping it selected leaves the number selected unchanged. Suppose R of the K questions are selected. Use a nested family of valid marginal intervals. Report each selected question's interval, but at level one minus alpha R over K instead of one minus alpha. For independent estimates, the expected fraction of the selected intervals that miss is then at most alpha: the false coverage rate. For arbitrary selection, replace R for each coordinate by the smallest possible selected size while that coordinate remains selected, as specified in their theorem. The cost is width: when few are selected out of many, each interval is as wide as a Bonferroni interval at alpha R over K.
Numbers: K nulls, report the max: bias 1.55 (K = 10), 3.25 (1,000); naive coverage 77% (10), 8% (100), 0% (1,000)
2PoSIPhD4 min
Post-selection inference, PoSI: cover every model you might have chosen. Richard Berk, Lawrence Brown, Andreas Buja, Kai Zhang and Linda Zhao, at Wharton, began with the target. For any submodel M, a set of columns, define beta M as the projection of the mean of Y onto those columns. Its j-th entry is the coefficient of x j adjusted for the other variables in M; it means something different in every submodel. It is not the coefficient of some true model; no model need be true. When the submodel is chosen from the data, the target itself is random, and that is the source of the trouble.
Assume a fixed full-rank design, jointly Gaussian observations, and known noise variance. For each submodel and each coefficient in it, the standardized estimate is a normal contrast of Y, with the contrast vector l j dot M. The PoSI constant K is the one minus alpha quantile of the largest of these t-statistics, over every submodel and every coefficient in it. Then intervals of half-width K standard errors cover every coefficient of the selected model, simultaneously, because the selected model is one of the models in the maximum. And that holds for any selection rule at all: the lasso, stepwise regression, or a human looking at plots and trying things until something works.
The PoSI constant by simulation, against the number of variables. Without correction, one point nine six. For an orthogonal design, the constant grows slowly, to with ten variables. For correlated variables it grows faster, to , because coefficients mean very different things in different submodels. A Bonferroni correction over all coefficients would need , and Scheffé's method, which covers every linear contrast, . PoSI sits between the naive and the universal. The correlated constants use four thousand calibration draws, with pointwise order-statistic uncertainty stored and another four thousand draws for independent coverage validation. They are Monte Carlo estimates, not certified exact critical values.
How large can K get? Never larger than Scheffé's constant, the root of a chi-squared quantile, of order root p. For an orthogonal design every submodel's coefficients are the same, so K is the maximum of p normals, of order root two log p. And there are designs, constructed by Berk and colleagues, where K really is of order root p. So the price of covering every model you might have chosen can be as large as root p: affordable for a handful of variables, ruinous for thousands.
In practice the constant is computed by simulation: draw standard normal vectors and take the largest absolute contrast over all p times two to the p minus one coefficients, as we did for the chart. If only submodels up to some size m will ever be considered, the maximum runs over fewer contrasts and the constant shrinks. With sigma unknown, estimate it using an independent, correctly scaled variance estimate with known degrees of freedom, and use the corresponding t maximum. Full-model residual variance needs a correctly specified mean model for that exact argument. And report what the target means: the effect of x j adjusted for the other selected variables, which can differ in size and even sign from its effect in another model.
PoSI's strengths. It is valid for any selection, including the informal snooping that a paper never reports. And it needs no model of how the selection was made. Its weaknesses. For any one selection rule it is conservative, and computing the constant exactly requires every one of the two to the p submodels. The next chapter takes the opposite approach: condition on the rule that was actually used, and pay only for that.
Numbers: p = 10, n = 60: K = 2.800 (analytic orthogonal), 3.461 (Monte Carlo correlated, ρ = 0.5), Bonferroni 4.42 over 5,120 contrasts, Scheffé 4.28
3Conditional selective inferencePhD7 min
The key result is due to Jason Lee, Dennis Sun, Yuekai Sun and Jonathan Taylor. Let Y be Gaussian, let the selection event be a polyhedron, A Y at most b, and let the target be a linear function, eta transpose mu, fixed within this selection event. The covariance is known. Split Y into its component along eta, and a remainder Z that is uncorrelated with it, hence independent. The lemma says the polyhedron, seen along that line, is an interval: it equals that interval together with feasibility of every zero-slope constraint on Z. So, given selection and Z, the statistic is a normal truncated to that interval: a one-dimensional law, known exactly.
The proof is four lines. Write Y as c times eta transpose Y, plus Z. Substitute into the constraints: each row k says that A c, its k-th entry, times the statistic is at most b k minus the k-th entry of A Z. Where that coefficient is positive, the row is an upper bound on the statistic; where it is negative, dividing flips the inequality, and it is a lower bound. The tightest upper bound is V plus, the tightest lower bound V minus, and both depend on Z alone. Rows where the coefficient is zero require A Z at most b; retain that feasibility event explicitly before conditioning on a feasible Z.
Then the truncated normal's distribution function, evaluated at the statistic, is uniform given selection: the probability integral transform. That gives an exact test of any value of the target, and inverting the test, which is monotone in theta, gives an interval, with exact conditional coverage: given that this question was selected, the interval covers its answer with probability one minus alpha.
The simplest example is marginal screening: report coordinate j if its absolute value exceeds a threshold t. That event is a union of two polyhedra, one for each sign. Given selection, Y j is a normal truncated to the two outer pieces of the line. The lemma extends to unions by summing the truncated masses over the pieces, and that is exactly how one conditions on less: on the selected set without its signs.
The selection window shows the inversion. The statistic was observed at two point six, and the selection event confines it to between one and three. With theta zero, the truncated law piles up at the left end, and the chance of exceeding two point six is only . At theta one it is ; at two point two, ; at three and a half, . The interval collects every theta whose pivot lies between two and a half and ninety-seven and a half percent.
The lemma's first application was the lasso. At a fixed lambda, the lasso picks an active set E with signs s. Its optimality conditions say that on E the correlations with the residual equal lambda times the signs, and off E their absolute values are at most lambda. We assume a unique solution, full-rank selected columns and fixed lambda; cross-validation would add selection. Lee and colleagues wrote the event that the lasso picks exactly E with signs s as the intersection of two sets of linear inequalities in y: a polyhedron. Take eta to be the row of the pseudo-inverse of X E that gives coefficient j, so the target is PoSI's submodel coefficient, and the lemma gives an exact individual selective interval for each retained variable, with known Gaussian noise. These are not automatically simultaneous intervals.
Stamey's prostate cancer data, ninety-seven men and eight standardized predictors of the log PSA, with sigma estimated from the full least-squares fit. Substituting that estimate into a known-sigma pivot makes this historical display a working approximation, not an exact coverage result. The lasso at lambda twenty keeps three: the log cancer volume, the log prostate weight, and seminal vesicle invasion. For the log cancer volume, the statistic sits far inside its truncation window, and the selective interval agrees with the naive one. For the log weight, the estimate is close to its window's lower edge, : it was selected partly because it was large, and the selective interval stretches down to , against the naive . The same happens for seminal vesicle invasion.
Two costs. When the statistic is near an edge of its window, the selective interval can be very long; Danijel Kivaranovic and Hannes Leeb proved its expected length is infinite. Conditioning on less helps: conditioning only on the active set, not the signs, means a union of polyhedra and can improve power; it does not promise every realized interval is shorter. Fithian, Sun and Taylor showed the optimal recipe: condition on the selection event and the sufficient statistics for the nuisance parameters, and nothing else, as in Part forty-six's Neyman structure. The deeper cost is that conditioning throws away the information that was used to select. The next chapter keeps some of it.
What if the errors are not Gaussian? The exact lemma uses joint Gaussianity of the data vector, which gives independence of the contrast and its nuisance remainder. Normality of the contrast alone is not enough. Ryan Tibshirani, Alessandro Rinaldo, Robert Tibshirani and Larry Wasserman showed that selective intervals remain asymptotically valid, uniformly over a class of error distributions, under conditions on the selection. The weak point is the edge: when the statistic sits near a truncation point, the truncated law is determined by the far tail of the error distribution, where the normal approximation is worst. So randomize, as in the next chapter, or at least report how close each statistic is to the edge of its window.
Numbers: Stamey, λ = 20: lcavol 0.617 (0.45, 0.79), lweight 0.282 (0.08, 0.43) vs naive (0.14, 0.43), svi 0.274 (0.05, 0.44) vs (0.11, 0.44); simulation: naive 86.3%, selective 95.5%, median length 2.1×
4Randomization and carvingPhD4 min
Randomization and carving: trading a little noise for a lot of power. Why are conditional intervals so long near the edge? With hard selection, report Y only if it exceeds c, the law given selection is cut off sharply at c. If Y lands just above c, almost any mean below it could have produced it, and its finite lower endpoint tends to minus infinity as the observation approaches the threshold. An interior observation does not itself have an infinite endpoint. Xiaoying Tian and Jonathan Taylor's remedy is to select on a noisy copy instead: report Y if Y plus an independent normal W exceeds c. Now the cut is soft. A value near c is only somewhat less likely to have been selected, so some of the information that hard selection destroys survives.
The selected density is the normal density times the probability of selection given y, divided by the marginal probability of selection. That denominator depends on mu and must stay in the likelihood. As the randomization vanishes it becomes the hard truncation of chapter three. As it grows, the selection no longer depends on y at all, so there is no selection effect, but the selection itself becomes a coin toss. In between, invert the pivot of this selective likelihood; in one dimension by quadrature, in many by Monte Carlo.
The lower end of the interval, as a function of the observed value. With hard selection, a value just above the threshold gives a lower limit far below zero; the curve leaves the displayed range below minus eight, without a false horizontal plateau. With randomization of standard deviation one, the same observation gives . The naive limit, y minus one point nine six, ignores selection altogether. Far from the threshold all three agree, because there selection carries little information.
By simulation, with a true mean of one and the threshold at two. Every row covers about ninety-five percent: the method is exact whatever the randomization. But the median length falls from with hard selection to with randomization of standard deviation one. The price is that selection itself becomes noisier, which in a real problem means occasionally selecting the wrong variable.
In many dimensions the same idea applies to the lasso itself: perturb its objective by a random linear term omega transpose beta, with a positive ridge term to ensure a finite optimizer even when p exceeds n. The selective law of y is its density times the probability, over omega, of selecting the same active set and signs. A change of variables, from omega to the lasso's solution and subgradient, makes that probability tractable, and Snigdha Panigrahi and Taylor sample from it by Markov chain Monte Carlo or approximate it. The result is valid selective intervals which can recover much of the lost power. Exact likelihood calculations and computational approximations have different validity requirements; near-naive length is not a uniform theorem.
A close relative is data carving, from Fithian, Sun and Taylor. Select on a fraction of the data, as in sample splitting, but then infer with all of it, conditioning on the selection. Their optimal carving tests can weakly improve on splitting within the specified testing class because they also use information left in the selection sample. This does not order every pair of interval procedures. Splitting is itself a kind of randomization, with the random split as the noise, which leads to the next chapter.
Numbers: μ = 1, c = 2: median length 10.8 (hard), 8.68 (γ = 0.25), 6.4 (0.5), 5.0 (1), 4.2 (2), all ≈ 95%
5Data fission and thinningPractice5 min
The oldest fix is sample splitting, studied by David Cox in 1975: select on one half of the data and infer on the other. It is valid for any selection rule, because the second half is independent of what was selected. But it halves the data for each job, and it is impossible when there is only one observation per unit: one count per region, one measurement per gene. James Leiner, Boyan Duan, Larry Wasserman and Aaditya Ramdas asked whether a single observation could itself be split into two independent pieces.
For a normal observation, the answer is a short calculation. With known variance and positive tau, draw independent noise Z with the same variance; let f be X plus tau Z and g be X minus Z over tau. Their covariance is sigma squared minus tau times one over tau times sigma squared: zero. They are jointly Gaussian, so they are independent. Both carry the same mean, with variances inflated by one plus tau squared and one plus one over tau squared. So select with f, and infer with g: the inference is valid for each chosen fixed target with a correctly calibrated procedure on g. Multiple reported intervals need a separate simultaneous or false coverage correction. Plug-in variances do not preserve the exact independence argument.
For counts, the analogue is thinning. Given a Poisson count, keep each event independently with probability epsilon. The kept and discarded counts are independent Poisson variables, a classical fact about thinning a Poisson process. Anna Neufeld, Ameer Dharamshi, Lucy Gao and Daniela Witten extended the idea to convolution-closed families with a valid parameter partition and a sampleable conditional splitting law. Needed nuisance parameters must be known for exact independence. A check: with epsilon a half and a mean of eight, the two pieces have means and , and a correlation of .
Fission works for whole regressions. With a fixed design and Gaussian noise, fission the response vector into f and g, and choose a model with f by any means: the lasso, stepwise, or looking at plots. Then fit the chosen model to g by least squares; its ordinary intervals are valid for the projection of the mean onto the chosen columns, PoSI's target, using the known inflated noise variance. These are individual intervals; simultaneous coverage still needs multiplicity control. Leiner and colleagues extend this to generalized linear models, to trend filtering, and to interactive procedures where an analyst selects in several rounds.
Fission has a dial, tau. Select the largest of twenty means, with true values two, one, a half and zeros. In gold, how often the selection made with f picks the truly largest: with tau a quarter, falling to with tau four, because f then carries more noise. In blue, the length of the interval made with g: long for small tau, , and close to the ordinary for large tau. Tau trades the quality of the selection against the precision of the inference, the same trade as choosing how to split a sample.
The three approaches side by side. Reusing all the data picks the truly largest mean most often, percent of the time, but its intervals cover only percent. Splitting the sample covers percent, and fission , both with intervals longer by a factor of root two. In this Gaussian problem splitting and fission with tau one are equivalent; fission's value is that it still works when there is nothing to split.
The most popular application is in single-cell genomics. Counts of each gene in each cell are clustered into cell types, and then the same counts are tested to find the genes that mark each type. Count splitting, by Neufeld and colleagues, thins every count into two: cluster on one, test on the other. For Poisson counts the pieces are exactly independent; ordinary binomial thinning of a negative binomial count leaves dependent pieces. With known shape, the appropriate conditional split is beta-binomial and partitions that shape. Estimating dispersion gives a working approximation, not exact independence. It avoids by construction the double dipping that chapter nine attacks by conditioning.
Numbers: 20 means: naive coverage 73.2% (picks the best 49%), splitting 94.6% (32%), fission 95.0% (33%); τ = ¼ … 4: picks 48% … 11%, length 16.2 … 4.0
6Knockoff theoryPhD6 min
Knockoff theory: fake variables that keep the selection honest. Part thirty-three met knockoffs as a method; here is why they work. Rina Foygel Barber and Emmanuel Candès wanted variable selection with false discovery rate control in finite samples. Their idea: build a fake copy of every variable, a knockoff, whose correlations with everything mimic the original's, but which has no effect on the outcome. Fit one lasso on originals and knockoffs together, and score each variable by how much larger its coefficient is than its knockoff's. Select the variables whose score exceeds a threshold T, chosen among positive observed absolute scores, or infinity if none qualifies, as the smallest t at which the estimated false discovery proportion, one plus the number of scores below minus t, over the number above t, is at most q.
Candès, Yingying Fan, Lucas Janson and Jinchi Lv's model-X knockoffs turn the requirement into a distributional one: swapping any set of variables with their knockoffs leaves the joint law of the pair unchanged, and the knockoffs are generated without looking at Y. That needs the law of the covariates to be known, but nothing at all about how Y depends on them. For centered Gaussian covariates with known positive definite covariance, draw knockoffs independently of the outcome conditional on X. The displayed conditional covariance must be positive semidefinite, with feasible diagonal D. The null is conditional independence of Y and a coordinate given all other coordinates. Any sample size, more variables than observations, and any model for the outcome are allowed.
The key property. Swapping a null variable with its knockoff simply flips the sign of its score and leaves every other score alone. Since the swap leaves the joint law unchanged, the signs of the nonzero null scores are independent fair coins, given all magnitudes and the nonnull scores. Zero scores are excluded from this argument. So the number of null scores above t is matched, on average, by the number below minus t, and that is at most the number of all scores below minus t. The numerator of the threshold's ratio is therefore a conservative estimate of the number of false discoveries.
The two frameworks trade assumptions. Fixed-X knockoffs need no model for the covariates, but a Gaussian linear model for the response and at least twice as many observations as variables. Model-X knockoffs need the covariates' law, but nothing about the response, and any sample size. Model-X permits learners whose paired statistics obey the simultaneous swap flip property. Fixed-X additionally requires sufficiency: dependence on the augmented design and response through their Gram matrix and cross-products. Antisymmetry alone does not justify an arbitrary forest or neural network for fixed-X. Power depends on how different the knockoffs are from the originals, set by the constant s, chosen to be as large as the covariance allows.
The proof that the false discovery rate is at most q is a martingale argument. Let M of t be the number of null scores above t, divided by one plus the number below minus t. Begin with all magnitudes, the nonnull statistics, and the counts of the remaining positive and negative null signs. As t increases, reveal signs of removed scores. Their conditional distribution is hypergeometric, and that calculation makes M a supermartingale in this filtration. The threshold T is a stopping time for this process, so by optional stopping, the expected value of M at T is at most the expectation of its starting value, which is at most one. The realized starting ratio can exceed one. There are finitely many score thresholds, so the stopping argument is bounded. And by the definition of T, the false discovery proportion at T is at most q times M of T. Taking expectations, the rate is at most q.
A check: three hundred observations of a hundred correlated Gaussian covariates, fifteen with real effects. The histogram shows the false discovery proportion of each of forty runs of model-X knockoff plus at q equal to a tenth: many runs have none, a few have more than a tenth. Their average, the false discovery rate, is . And percent of the real variables are found. The supermartingale at the stopping time averaged . This is a Monte Carlo average; the theorem bounds its population expectation, not every finite-run average.
The catch in model-X is that the law of the covariates is rarely known exactly. Barber, Candès and Richard Samworth showed the guarantee degrades gracefully: the rate is at most q times e to the epsilon, plus the chance that the knockoff construction's realized empirical log density ratio exceeds epsilon for a null variable. This exchangeability error is not the ordinary population Kullback–Leibler divergence; taking a maximum over all variables is conservative. In practice the covariate law is estimated from many unlabelled observations, such as a genotype reference panel. And because a single knockoff draw is random, Zhimei Ren and Barber derandomized the procedure by aggregating many draws through e-values, the subject of Part fifty-eight.
Numbers: n = 300, p = 100, 15 real, q = 0.1: FDR 0.065, power 81%, E M(T) = 1.00
7Conformal selectionPhD4 min
Conformal selection: choosing units, not variables, with false discovery rate control. A different kind of selection. Ying Jin and Emmanuel Candès considered test units whose features are seen but whose outcomes are not yet known. The goal is to select the units whose outcome exceeds a threshold c, while controlling the false discovery rate: the expected fraction of selected units that do not. The tools are any prediction model and a labelled calibration set, with independent, identically distributed calibration and test pairs, and a predictor trained separately. More general conditional exchangeability conditions are possible, but bare exchangeability is not our theorem here. Which candidates to interview, which compounds to send to the laboratory, which tumours to biopsy.
Score each unit with the predictor: a larger score means more promising. For each test unit, the conformal p-value is one plus the number of calibration units that are below the threshold yet scored at least as high, over n plus one. The guarantee is joint: the probability that the p-value is at most t and the test outcome is below the threshold is at most t. It is not a guarantee conditional on the outcome being below the threshold. Then run Benjamini–Hochberg on the test p-values.
The catch is that all the p-values are computed against the same calibration set, so they are dependent. Jin and Candès introduce oracle rank p-values, uniform under the independent sampling assumptions. On a null outcome, the reported p-value is at least its oracle value. A modified vector has the positive dependence property needed for a leave-one-out argument. Their leave-one-out proof handles the random null set and the shared calibration sample. Marginal joint validity alone would not justify ordinary Benjamini–Hochberg. Under these sampling and monotone-score conditions, their theorem gives finite-sample false discovery rate control, with any separately trained predictor.
On real data: the Wisconsin breast cancer biopsies, percent of them malignant. Over fifty random splits, two hundred and fifty biopsies train a ridge-penalized logistic score, a hundred and fifty calibrate it, and the rest are the test units. Conformal selection at q equal to a tenth calls on average of the test tumours malignant. The average false discovery proportion over these splits is percent. These are repeated random splits of one fixed dataset, not independent replications of a population experiment. And percent of the malignant tumours are selected.
How does this differ from Part thirty-four's conformal prediction? Prediction gives an interval for one new outcome, with marginal coverage. Selection makes many decisions at once and controls an error rate over the selected set. When the test units differ from the calibration units in their features, a covariate shift, weighted conformal selection uses the feature density ratio together with a selection and pruning procedure. Ordinary weighted p-values followed by Benjamini–Hochberg can fail even with known weights. The weighted selection theorem needs its specified procedure and assumptions; estimating the weights requires additional error control.
What it shows. Selection with a guarantee needs no model of the outcome given the features, but it does need the independent sampling assumptions used here, or the paper's stronger conditional exchangeability conditions. The predictor's quality decides the power, while validity also requires those sampling conditions and separate training. And the pattern is the same as for knockoffs: a reference set that behaves like the nulls, against which the candidates are ranked. Next, the oldest selection of all: picking the winner.
Numbers: breast cancer, 50 splits: 70 of 169 test tumours selected, FDR 9.3%, power 97.4%
8Inference on winnersPhD5 min
Isaiah Andrews, Toru Kitagawa and Adam McCloskey studied the case that opened this part: K independent Gaussian estimates with a common known variance, one per option, and we pick the largest. This is our simple specialization of their more general result. The event that option j wins is the event that its estimate beats every other; given the losers, that is a half-line. So the winner's estimate, given that it won, is a normal truncated below at the runner-up: the polyhedral lemma once more. Inverting it gives conditional intervals, and the value of mu at which the pivot is one half is a median-unbiased estimate, which corrects the winner's curse.
One draw: ten options, the first with a true mean of one and the rest zero. The winner is option , at , , and the runner-up is at . The naive interval is the winner plus or minus one point nine six. The conditional law is cut at the runner-up, and the conditional interval runs from to , with a median-unbiased estimate of : the narrow win makes it long. The hybrid interval, coming next, is to .
Two alternatives frame the solution. The projection interval uses a simultaneous constant over all K options: never very long, but always wide. The conditional interval is short when the win is clear and very long when it is narrow. Andrews, Kitagawa and McCloskey's hybrid conditions also on the winner lying within the simultaneous band, using miscoverage alpha minus beta over one minus beta. Here beta is point zero zero five. Conditional coverage on the band and the winning event is one minus alpha over one minus beta; allocating the band-failure budget gives unconditional coverage at least one minus alpha. It keeps coverage on average over the possible winners, and it is never longer than the projection interval.
The four intervals as the best option's lead grows. The naive interval has fixed length, and covers only percent when nothing stands out, rising to when the best leads by four. The conditional interval covers ninety-five percent, but its median length is when there is no clear winner. The projection interval is always long and almost always covers. The hybrid covers ninety-five percent with a median length of without a clear winner and with one. In these simulated settings it often improves the trade-off; only the bound by projection length is uniform.
On real data: Singh's prostate cancer microarray, Efron's example, with six thousand and thirty-three genes. The top gene's z-value is , and the runner-up's . The naive interval for the top gene's mean runs from to . Conditional on its winning so narrowly, the interval runs from to , and the median-unbiased estimate is . The hybrid interval, to , excludes zero. That exclusion is a working-model calculation, not evidence with a certified ninety-five percent guarantee that the selected gene has a nonzero effect. These transformed gene test statistics are correlated and only approximately Gaussian. Known Gaussian covariance can already be handled by the polyhedral lemma; learning covariance and calibrating this high dimensional approximation are the challenges.
In practice the estimates are correlated, and then the event that j wins is a polyhedron in K dimensions; along the direction of the winner's estimate it is still an interval, so chapter three's lemma applies. The same ideas give inference on the top k options, or on every option above a threshold. Andrews, Kitagawa and McCloskey applied them to choosing job-training programmes by their estimated earnings effects, and to choosing neighbourhoods by estimated economic opportunity. Their recommendation is a reporting standard: whenever you report the best of several options, report a median-unbiased estimate and a hybrid interval too.
Numbers: K = 10 by the lead: conditional median length 10.6 → 4.1, hybrid 5.2 → 4.2, projection 6.96; prostate top gene z = 5.25 (runner-up 4.80): naive (3.29, 7.21), conditional (−3.13, 7.02), hybrid (0.36, 7.07)
9Selection in unsupervised problemsPractice4 min
In unsupervised learning the selection is the whole analysis. An algorithm splits the data into clusters. The obvious next step is to test whether the clusters' means differ. But the algorithm chose the split precisely to make the means differ, so the test rejects even when there is only one group: double dipping. In single-cell genomics this is the everyday question: are these two clusters different cell types, or one type cut in two?
Lucy Gao, Jacob Bien and Daniela Witten condition on the clustering. Let nu be the contrast that gives the difference of the two clusters' means. Perturb the data along that contrast only, replacing the observed difference by phi and keeping everything else fixed. The set S collects the values of phi for which the algorithm, rerun on the perturbed data, finds the same clusters. Under the null the difference is sigma times the norm of nu times a chi variable, and the selective p-value is its chance of exceeding the observed difference, conditional on lying in S. For our global one dimensional two-means algorithm, alternative sorted split costs are quadratic in phi. Solving their inequalities gives the selection region analytically, without a grid. The cited papers develop related calculations for hierarchical and k-means algorithms.
Two real data sets in one dimension, each split by two-means. Old Faithful's eruptions split at minutes into short and long ones. The naive test's P-value is astronomically small, and so is this working-model selective value, consistent with the visible separation. These historical data are not verified Gaussian observations with known variance. Newcomb's passage times, without the two outliers, are one population of repeated measurements, but two-means still splits them, at . The naive test calls the split hugely significant. The selective test gives a P-value of : the algorithm alone can create a striking naive comparison. In both historical examples sigma is the overall sample standard deviation, which is not a certified upper bound. These are approximate illustrations; removing Newcomb outliers also changes the analysis.
The check. samples of forty from a single normal, so there are no clusters at all. With independent Gaussian data and known sigma one, these exact pivots should be uniform. A conservative valid p-value need only be superuniform. Here percent fall below five percent. The naive P-values fall below five percent percent of the time. Conditioning on the clustering restores the null.
Why is it exact? The test conditions on the clustering and on every feature of the data that is orthogonal to the contrast nu. What remains random is only the size of the difference between the two clusters. Under the null, for Gaussian data with known sigma, that size is sigma times the norm of nu times a chi variable, truncated to the set S where the clustering would not change. So the P-value is exact, and the argument is chapter three's: condition on everything except one direction, and work out the law along it.
Some practicalities. A fixed known upper bound on sigma is conservative in this truncated chi model. The sample standard deviation is not such a bound. An estimated upper bound needs its own error budget or a justified conditional argument. With many clusters, every pair can be tested, and the multiplicity of Part thirty-three returns. The same perturbation idea gives selective tests after detecting changepoints, after principal components, and after fitting trees. And for count data such as gene expression, chapter five's thinning gives a simpler route: cluster on one thinned copy, test on the other.
Numbers: Old Faithful: split at 3.19 min, selective p ≈ 6 × 10⁻¹⁰; Newcomb: split at 28.5, naive p ≈ 5 × 10⁻¹⁰, selective 0.8224 (working Gaussian model); null: 5.5% below 0.05 (naive 100%)
10Open problemsPhD2 min
Open problems: where the frontier of selective inference is. The part in one table: what each approach needs, and what it costs. PoSI needs nothing about the selection rule and costs up to root p in width. Conditional inference needs the exact rule and Gaussian noise, and its intervals grow long near the edge of the selection region. Randomization needs you to randomize, and costs noisier selection. Splitting, fission and thinning need a divisible family, and cost information. Knockoffs and conformal selection need the law of the covariates or the stated independent or conditional exchangeability assumptions, and give an error rate instead of intervals. And the hybrid needs a simultaneous band, and costs a small slice of the level.
The part also gives a referee's checklist. Was the question fixed before the data were seen? If not, what selected it, and was the selection reported, including the analyses that were tried and dropped? Which guarantee does the paper claim, conditional or on average, and does the method it used actually deliver that guarantee? And is there a replication, a held-out set, or a pre-registration? Those remain the cheapest and most convincing fixes of all.
Six open problems. First, exact conditional inference beyond the Gaussian linear model, including non-Gaussian dependent estimates and unknown high dimensional covariance. Gaussian dependence with known covariance is already covered by the lemma. Second, complex, iterative selection: what exactly was conditioned on when an analyst tried twenty models and looked at a plot? Third, optimal trade-offs: how much randomization or fission maximizes power for a given task? Fourth, honest inference on what a forest or a neural network selects. Fifth, combining selected findings across studies without the winner's curse. And sixth, selective inference for causal effects chosen after looking: the subgroup, the outcome, the specification.
Recap, problems, and the road aheadAll tracks3 min
Part fifty-six in eleven lines. Selection inflates what it selects. PoSI covers every model you might have chosen, at a price of up to root p. The polyhedral lemma turns selection into a truncated normal, and gives the lasso's selective intervals. Randomization and carving soften the truncation. Splitting, fission and thinning separate selection from inference. Knockoffs control the false discovery rate through a supermartingale. Conformal selection does it for units. The hybrid interval makes inference on winners both valid and short. Conditioning on the clusters makes post-clustering tests honest. And six problems remain open.
A promise for the next part. Most of this part's exact results needed a model: Gaussian noise for the polyhedral lemma, a known covariate law for knockoffs. Only conformal selection asked for the stated independent or conditional exchangeability assumptions and separate predictor training. Part fifty-seven asks what can be guaranteed without a parametric model, and proves what cannot.
Where it comes back. Part fifty-seven takes conformal inference to its limits. Part fifty-eight builds e-values, which derandomize knockoffs. Part fifty-nine studies the lasso when p and n grow together. Part sixty-two returns to subgroups selected in causal analyses. And the dissertation, in Part sixty-five, writes its analysis plan with this part's lessons in mind.
Six problems, with full solutions in the README. The independence in the polyhedral lemma; the selection event of marginal screening; the monotonicity of the truncated pivot; the winner's curse rate; fission's independence and its best tau; and the validity of conformal p-values. Pause here if you want to try them.
The papers behind this part: Berk and colleagues on PoSI; Fithian, Sun and Taylor, and Lee, Sun, Sun and Taylor, on conditional inference; Tian and Taylor on randomization; Barber and Candès, and Candès, Fan, Janson and Lv, on knockoffs; Andrews, Kitagawa and McCloskey on winners; Gao, Bien and Witten on clustering; Leiner and colleagues, and Neufeld and colleagues, on fission and thinning; and Jin and Candès on conformal selection.
Fifty-six parts of sixty-five. The first research part is done. In 1956 Raghu Raj Bahadur and Leonard Savage proved that no informative finite-width uniformly honest confidence interval for a mean exists over the unrestricted class of finite-mean distributions. The whole real line is a valid but uninformative interval. Next, Part fifty-seven: distribution-free inference, what can be guaranteed under distribution-free sampling assumptions, and what cannot.
Where it goes next. Conformal methods are taken to their limits in Part 57; e-values, which derandomize knockoffs, come in Part 58; the lasso when p and n grow together in Part 59; subgroups selected in causal analyses in Part 62; the dissertation's analysis plan in Part 65.
Key results
The part's results in one place, for revision.
Try it
Lab 56 · The winner's curse and the interval that conditions on winning
Draw ten independent estimates whose true effects are all zero, report the largest, and measure how often the usual 95% interval, the conditional (truncated-normal) interval and the hybrid interval cover the winner's true effect, against the exact values.
python -m videos.stats.labs 56
needs numpy, scipy, matplotlib · download lab56.py ·
source on GitHubmean of the winner's estimate (truth 0) 1.538 exact 1.539 bound sqrt(2 log K) = 2.146
Wald 95% interval covers 77.4% exact 0.975^K - 0.025^K = 77.6%
conditional interval covers 96.3% theory 95.0%
hybrid interval covers 96.5% theory at least 95.0%
median length Wald 3.92 conditional 10.77
conditional median length by the lead closest quarter 44.3 clearest quarter 5.8
Selecting the largest of ten estimates biases it upward by a standard deviation and a half and breaks the Wald interval; conditioning on the win restores 95%, at a price in length that is highest when the win is narrow.
The code (72 lines; it asserts its own result)
"""Lab 56: report the largest of ten estimates, and compare the Wald, conditional and hybrid intervals for it."""
import numpy as np
from scipy import integrate, stats
from videos.coursekit import labs
from explainer.stats.kit import selective
TITLE = "The winner's curse and the interval that conditions on winning"
GOAL = ("Draw ten independent estimates whose true effects are all zero, report the largest, and measure how often "
"the usual 95% interval, the conditional (truncated-normal) interval and the hybrid interval cover the "
"winner's true effect, against the exact values.")
TASKS = [
"Set K = 100 and then K = 1000. Check the Wald coverage against 0.975^K and the winner's bias against sqrt(2 log K).",
"Give one effect the true value 4 (mu[0] = 4). How do the conditional interval's length and the Wald coverage change when the win is clear?",
"Replace the winner by the estimates above a threshold of 2 and build each one's interval with selective.threshold_selective. Is coverage still 95% for each selected effect?",
]
def run(seed=0):
rng = np.random.default_rng(seed)
K, reps, z = 10, 1000, stats.norm.ppf(0.975)
mu = np.zeros(K)
win, lead, length = np.empty(reps), np.empty(reps), np.empty(reps)
cover = {"Wald": 0, "conditional": 0, "hybrid": 0}
for r in range(reps):
y = mu + rng.standard_normal(K)
w = selective.winner_conditional(y)
h = selective.winner_hybrid(y)
truth = mu[w["j"]]
win[r], lead[r], length[r] = w["y"], w["y"] - w["second"], w["hi"] - w["lo"]
cover["Wald"] += abs(w["y"] - truth) <= z
cover["conditional"] += w["lo"] <= truth <= w["hi"]
cover["hybrid"] += h["lo"] <= truth <= h["hi"]
cover = {k: v / reps for k, v in cover.items()}
# theory for K nulls: the law of the maximum is Phi^K
bias = integrate.quad(lambda t: t * K * stats.norm.pdf(t) * stats.norm.cdf(t) ** (K - 1), -8, 10)[0]
wald = stats.norm.cdf(z) ** K - stats.norm.cdf(-z) ** K
lab = labs.Lab()
lab.row("mean of the winner's estimate (truth 0)", f"{win.mean():.3f} exact {bias:.3f} bound sqrt(2 log K) = {np.sqrt(2 * np.log(K)):.3f}")
lab.row("Wald 95% interval covers", f"{cover['Wald']:.1%} exact 0.975^K - 0.025^K = {wald:.1%}")
lab.row("conditional interval covers", f"{cover['conditional']:.1%} theory 95.0%")
lab.row("hybrid interval covers", f"{cover['hybrid']:.1%} theory at least 95.0%")
lab.row("median length", f"Wald {2 * z:.2f} conditional {np.median(length):.2f}")
close, clear = length[lead < np.quantile(lead, 0.25)], length[lead > np.quantile(lead, 0.75)]
lab.row("conditional median length by the lead", f"closest quarter {np.median(close):.1f} clearest quarter {np.median(clear):.1f}")
lab.note = ("Selecting the largest of ten estimates biases it upward by a standard deviation and a half and breaks "
"the Wald interval; conditioning on the win restores 95%, at a price in length that is highest when "
"the win is narrow.")
assert abs(win.mean() - bias) < 0.08 and bias < np.sqrt(2 * np.log(K)), "the winner's curse matches the law of the maximum"
assert abs(cover["Wald"] - wald) < 0.045 and cover["Wald"] < 0.85, "the Wald interval undercovers as 0.975^K predicts"
assert abs(cover["conditional"] - 0.95) < 0.03, "the truncated-normal interval covers given the win"
assert cover["hybrid"] > 0.92, "the hybrid interval covers"
assert np.median(close) > 1.5 * np.median(clear), "a narrow win costs length"
fig, ax = labs.figure(2, size=(11, 4.2))
grid = np.linspace(-3.5, 4.5, 300)
ax[0].hist(win, bins=40, density=True, color=labs.BLUE, alpha=0.6, label=f"the winner's estimate, {reps:,} draws")
ax[0].plot(grid, K * stats.norm.pdf(grid) * stats.norm.cdf(grid) ** (K - 1), color=labs.GOLD, label="law of the maximum of 10")
ax[0].plot(grid, stats.norm.pdf(grid), color=labs.MUTED, ls="--", label="law of one fixed estimate")
ax[0].axvline(0, color=labs.RED, lw=1.2)
ax[0].text(0.05, 0.47, "truth", color=labs.RED, fontsize=9)
ax[0].set(title="Every true effect is 0; the reported one is not", xlabel="estimate", ylabel="density", ylim=(0, 0.95))
ax[0].legend(loc="upper left")
ax[1].scatter(lead, np.clip(length, None, 400), s=7, color=labs.BLUE, alpha=0.5, label="conditional interval")
ax[1].axhline(2 * z, color=labs.RED, label=f"Wald interval: {2 * z:.2f}, covers {cover['Wald']:.0%}")
ax[1].set(title="Length of the 95% interval against the winner's lead", xlabel="winner minus runner-up",
ylabel="interval length (log scale)", yscale="log")
ax[1].legend(loc="upper right")
lab.fig = fig
return lab
Now change it
- Set K = 100 and then K = 1000. Check the Wald coverage against 0.975^K and the winner's bias against sqrt(2 log K).
- Give one effect the true value 4 (mu[0] = 4). How do the conditional interval's length and the Wald coverage change when the win is clear?
- Replace the winner by the estimates above a threshold of 2 and build each one's interval with selective.threshold_selective. Is coverage still 95% for each selected effect?
Problems, with solutions
Try each problem before opening its solution.
-
The decomposition's independence. Show that \(Z = Y - c\,\eta'Y\) with \(c = \Sigma\eta/(\eta'\Sigma\eta)\) is independent of \(\eta'Y\) when \(Y \sim N(\mu, \Sigma)\).
Solution
(η′Y, Z) is jointly Gaussian, and Cov(Z, η′Y) = Ση − c η′Ση = Ση − Ση = 0, so Z and η′Y are independent.
-
Marginal screening. For marginal screening \(\{|Y_j| > t\}\), write the selection event as a union of polyhedra, and find \([\mathcal V^-, \mathcal V^+]\).
Solution
{|Y_j| > t} = {Y_j > t} ∪ {−Y_j > t}, each a single linear inequality. Conditioning also on the other coordinates (which are independent of Y_j under Σ = I), Y_j given selection is N(μ_j, 1) truncated to (−∞, −t) ∪ (t, ∞); with the sign also conditioned on, one of the two pieces.
-
Monotonicity. Show that the truncated-normal survival function \(P_\mu(Y > y \mid Y \in [a, b])\) is increasing in \(\mu\).
Solution
The truncated family {N(μ, 1) restricted to [a, b]} is an exponential family in y with natural parameter μ, so it has a monotone likelihood ratio, and P_μ(Y > y | Y ∈ [a, b]) is increasing in μ.
-
The winner's curse rate. For \(K\) i.i.d. \(N(0, 1)\), show \(E\max_k Y_k \le \sqrt{2\log K}\), an upper growth bound for the winner's curse.
Solution
By Jensen, e^{λE max} ≤ E e^{λ max} ≤ K e^{λ²/2}, so E max ≤ log K/λ + λ/2; with λ = √(2 log K), E max ≤ √(2 log K).
-
Fission. Prove that fission's \(f = X + \tau Z\) and \(g = X - Z/\tau\) are independent, and find the \(\tau\) minimizing \(\mathrm{Var}\,g\) given \(\mathrm{Var}\,f \le v\).
Solution
Cov(f, g) = σ² − τ(1/τ)σ² = 0 and joint Gaussianity give independence. Var f = (1 + τ²)σ² ≤ v forces τ² ≤ v/σ² − 1, and Var g = (1 + 1/τ²)σ² is decreasing in τ, so take τ² = v/σ² − 1.
-
Conformal p-values. For IID calibration and test pairs, prove \(P(p_j\le t, Y_j\le c)\le t\); explain why this is not conditional null validity.
Solution
Assume IID calibration/test pairs and a score trained separately. Define V=−score(X) for Y≤c and V=+∞ for Y>c, and use the conservative lower rank p*=(1+#{calibration V_i≤V_j})/(n+1). On a null outcome, that conservative oracle rank is exactly the reported (1+#{calibration nulls: score_i≥score_j})/(n+1). IID pairs make the conservative lower rank superuniform (randomized ties make it uniform). Consequently P(p_j≤t, Y_j≤c)≤P(p*≤t)≤t. This is a joint bound, not conditional null validity. For n=9, all feature scores tied, and IID null probability 0.1, P(p≤0.1 | null)=0.9^9≈0.387, whereas the joint probability is ≈0.0387. BH FDR control additionally requires Jin–Candès's oracle/modified-vector dependence argument.
Notes and sources
Where it comes back
- Part 57: distribution-free inference, conformal methods to their limits.
- Part 58: e-values, which derandomize knockoffs.
- Part 59: the lasso when p and n grow together.
- Part 62: subgroups selected in causal analyses.
- Part 65: the dissertation's analysis plan.
Glossary
- The problem. Selection rule; selected target; winner's curse; marginal, conditional and simultaneous coverage; false coverage rate; data snooping; garden of forking paths.
- Simultaneous. Submodel target β_{j·M}; PoSI constant; Scheffé; Bonferroni; projection interval.
- Conditional. Selection event; polyhedron; polyhedral lemma; truncated normal; pivot; selective interval; median-unbiased; conditioning on less; KKT conditions.
- Randomized and split. Randomized response; selective likelihood; carving; sample splitting; data fission; data thinning; count splitting.
- Error rates over sets. Knockoff (fixed-X, model-X); sign-flip; knockoff+; supermartingale; conformal p-value; PRDS; conformal selection.
- Winners and clusters. Hybrid interval; double dipping; post-clustering test.
Sources
- The problem. J. Ioannidis, Epidemiology 19 (2008); D. Cox, Biometrika 62 (1975); H. Leeb & B. Pötscher, Ann. Stat. 34 (2006); Y. Benjamini & D. Yekutieli, JASA 100 (2005); A. P. Dawid, in Multivariate Analysis and its Applications (1994); B. Efron, JASA 106 (2011).
- PoSI. R. Berk, L. Brown, A. Buja, K. Zhang & L. Zhao, Ann. Stat. 41 (2013).
- Conditional inference. J. Lee, D. Sun, Y. Sun & J. Taylor, Ann. Stat. 44 (2016); W. Fithian, D. Sun & J. Taylor, arXiv:1410.2597 (2014); D. Kivaranovic & H. Leeb, JASA 116 (2021); R. Tibshirani, A. Rinaldo, R. Tibshirani & L. Wasserman, Ann. Stat. 46 (2018).
- Randomization. X. Tian & J. Taylor, Ann. Stat. 46 (2018); S. Panigrahi & J. Taylor, JASA 118 (2023).
- Fission and thinning. J. Leiner, B. Duan, L. Wasserman & A. Ramdas, JASA 120 (2025); A. Neufeld, A. Dharamshi, L. Gao & D. Witten, JMLR 25 (2024); A. Neufeld, L. Gao, J. Popp, A. Battle & D. Witten, Biostatistics (2022).
- Knockoffs. R. Foygel Barber & E. Candès, Ann. Stat. 43 (2015); E. Candès, Y. Fan, L. Janson & J. Lv, JRSS B 80 (2018); R. Foygel Barber, E. Candès & R. Samworth, Ann. Stat. 48 (2020); Z. Ren & R. Foygel Barber, JRSS B 86 (2024).
- Conformal selection. Y. Jin & E. Candès, JMLR 24 (2023); S. Bates, E. Candès, L. Lei, Y. Romano & M. Sesia, Ann. Stat. 51 (2023); Y. Benjamini & D. Yekutieli, Ann. Stat. 29 (2001).
- Winners. I. Andrews, T. Kitagawa & A. McCloskey, QJE 139 (2024).
- Clustering. L. Gao, J. Bien & D. Witten, JASA 119 (2024); Y. Chen & D. Witten, JMLR 24 (2023); S. Jewell, P. Fearnhead & D. Witten, JRSS B 84 (2022).
- Data. T. Stamey et al., J. Urology 141 (1989); D. Singh et al., Cancer Cell 1 (2002); B. Efron, Large-Scale Inference (2010); W. Wolberg, W. Street & O. Mangasarian (1995); S. Newcomb (1891).
About this partfrom its README
Part 56 of a sixty-five-part course in statistics, from a first course to a PhD (see the series plan and the syllabus), and the first part of Stage V, the research frontier.
It opens with Ioannidis (2008), Why most discovered true associations are inflated, and the World's gene study: the twenty genes with the largest test statistics have estimated effects 49% larger than their true effects, and a replication lands close to the known truth in this draw, with its own sampling error, although all twenty are real. The part asks how to give honest uncertainty about a question chosen by looking at the data, and compares four families of answers and their costs:
- the problem: the winner's curse by K, conditional against unconditional guarantees, the false coverage rate, the Bayesian view and Tweedie's correction;
- PoSI (Berk, Brown, Buja, Zhang & Zhao 2013): the submodel target, the simultaneous constant by simulation against Bonferroni and Scheffé, its √(2 log p) to √p range;
- conditional selective inference: the polyhedral lemma (Lee, Sun, Sun & Taylor 2016), proved; the truncated-normal pivot and its inversion, shown in the selection window; marginal screening; the lasso's selection event; selective intervals on Stamey's prostate data; the costs (Kivaranovic & Leeb 2021; Fithian, Sun & Taylor 2014) and asymptotic validity (Tibshirani, Rinaldo, Tibshirani & Wasserman 2018);
- randomization and carving (Tian & Taylor 2018): the selective likelihood, interval lengths by the amount of noise, the randomized lasso;
- data fission (Leiner, Duan, Wasserman & Ramdas 2025) and thinning (Neufeld, Dharamshi, Gao & Witten 2024): the independence, the τ trade-off, fission for regression, count splitting;
- knockoff theory: fixed-X (Barber & Candès 2015) and model-X (Candès, Fan, Janson & Lv 2018), the sign-flip property, the supermartingale proof of FDR control, robustness (Barber, Candès & Samworth 2020), derandomization;
- conformal selection (Jin & Candès 2023) on the Wisconsin breast cancer biopsies;
- inference on winners (Andrews, Kitagawa & McCloskey 2024): conditional, median-unbiased and hybrid, on the prostate microarray's top gene;
- post-clustering inference (Gao, Bien & Witten 2024) on Old Faithful and Newcomb's passage times;
- open problems, and a referee's checklist.
It keeps two promises:
- Part 33 controlled the FDR over thousands of questions and read the discoveries' estimates at face value. This part distinguishes interval coverage from error-rate guarantees over the selected set; knockoffs and conformal selection do not themselves give confidence intervals.
- Part 52's lasso selected variables while its intervals assumed a fixed question. Chapter 3 gives inference on the lasso's own model.
Built in this part:
statkit.selectiveplus the audited local overrides inchecked.py(explainer/stats/kit/selective.py), tested intests/test_stats_kit_selective.py:- truncated-normal pivots (stable in the tails) and their inversion, with an expanding search that must bracket a finite root or report numerical failure;
- the polyhedral lemma's truncation limits; the lasso at a fixed λ, its selection polyhedron and selective intervals;
- inference on winners: conditional intervals, the median-unbiased estimate, the hybrid and projection intervals;
- the PoSI constant by simulation over all submodels, with Bonferroni and Scheffé;
- selective intervals after a randomized threshold rule;
- data fission for normals and Poisson thinning;
- conformal selection with BH;
- exact two-means clustering in one dimension and the selective test of its clusters' means.
- The selection window (
SelectionWindowinexplainer/stats/viz.py), the part's instrument: a statistic's law, its selection region, the law truncated to that region and rescaled, the observed value, and the shaded tail whose area is the selective pivot;at(mu)redraws it for any mean, so the pivot's inversion can be watched.
Data.
- From the Museum: Stamey's prostate data, Singh's prostate microarray, the Wisconsin breast cancer data, Old Faithful, and Newcomb's passage times.
- From the World: the gene-expression study, with a fresh replication.
- The rest is exact arithmetic or seeded simulation.
The Coverage Board gains six rows:
| Method | Setting | Nominal | Achieved | Verdict |
|---|---|---|---|---|
| Wald interval for the winner | the largest of 10 means | 95% | 78.9% | broken |
| conditional interval (truncated normal) | the largest of 10 means | 95% | 94.8% | kept |
| hybrid interval (Andrews et al.) | the largest of 10 means | 95% | 95.3% | kept |
| OLS intervals after the lasso | Stamey's design, fixed λ | 95% | 86.3% | broken |
| selective intervals (polyhedral lemma) | Stamey's design, fixed λ | 95% | 95.5% | kept |
| data fission, τ = 1 | the largest of 20 means | 95% | 95.0% | kept |
Chapter notes
| # | Chapter | Numbers |
|---|---|---|
| 0 | Inflated discoveries | top 20 of 5,000 genes: estimated 1.84 SD, true 1.23, replication 1.22; selected-window pivot 0.42 at μ = 0 for y = 2.3 |
| 1 | The problem | K nulls, report the max: bias 1.55 (K = 10), 3.25 (1,000); naive coverage 77% (10), 8% (100), 0% (1,000) |
| 2 | PoSI | p = 10, n = 60: K = 2.800 (analytic orthogonal), 3.461 (Monte Carlo correlated, ρ = 0.5), Bonferroni 4.42 over 5,120 contrasts, Scheffé 4.28 |
| 3 | Conditional inference | Stamey, λ = 20: lcavol 0.617 (0.45, 0.79), lweight 0.282 (0.08, 0.43) vs naive (0.14, 0.43), svi 0.274 (0.05, 0.44) vs (0.11, 0.44); simulation: naive 86.3%, selective 95.5%, median length 2.1× |
| 4 | Randomization | μ = 1, c = 2: median length 10.8 (hard), 8.68 (γ = 0.25), 6.4 (0.5), 5.0 (1), 4.2 (2), all ≈ 95% |
| 5 | Fission | 20 means: naive coverage 73.2% (picks the best 49%), splitting 94.6% (32%), fission 95.0% (33%); τ = ¼ … 4: picks 48% … 11%, length 16.2 … 4.0 |
| 6 | Knockoffs | n = 300, p = 100, 15 real, q = 0.1: FDR 0.065, power 81%, E M(T) = 1.00 |
| 7 | Conformal selection | breast cancer, 50 splits: 70 of 169 test tumours selected, FDR 9.3%, power 97.4% |
| 8 | Winners | K = 10 by the lead: conditional median length 10.6 → 4.1, hybrid 5.2 → 4.2, projection 6.96; prostate top gene z = 5.25 (runner-up 4.80): naive (3.29, 7.21), conditional (−3.13, 7.02), hybrid (0.36, 7.07) |
| 9 | Clustering | Old Faithful: split at 3.19 min, selective p ≈ 6 × 10⁻¹⁰; Newcomb: split at 28.5, naive p ≈ 5 × 10⁻¹⁰, selective 0.8224 (working Gaussian model); null: 5.5% below 0.05 (naive 100%) |
| 10 | Open problems | — |
| 11 | Outro | — |
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: inflated discoveries. Upgrade card from Part 33.
- The selective-inference problem. Selection events; why marginal intervals fail (Board).
- PoSI (Berk et al. 2013). Simultaneous over all submodels; the √p cost.
- Conditional selective inference (Fithian, Sun & Taylor 2014). The polyhedral lemma and truncated Gaussians (Lee et al. 2016), proved.
- Randomization and carving (Tian & Taylor 2018). Trading a little data for a lot of power.
- Data fission and thinning (Leiner et al.; Neufeld et al.). Splitting a single observation.
- Knockoff theory. Fixed-X and model-X; the supermartingale proof; robustness to estimated distributions.
- Conformal selection (Jin & Candès 2023).
- Inference on winners (Andrews, Kitagawa & McCloskey 2024).
- Selection in unsupervised problems. Post-clustering inference (Gao, Bien & Witten 2022).
- Open problems.
Built: statkit.selective.
Build the film
python -m videos.stats.stats56.compute # the part's numbers, into .cache/stats56
python tools/build.py stats56 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py stats56 Hook # one chapter, silent, with a contact sheet
Scenes: videos/stats/stats56. 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.stats56.compute # once (about ten minutes)
python tools/build.py stats56 -q l # fast 480p preview
python tools/build.py stats56 # 1080p30 -> renders/stats56.mp4
python tools/qa_scene.py stats56 Winners
python tools/lecture_length.py stats56 --floor 50