The interview problem
Your team evaluates 20 model variants against a baseline and reports the variant with the smallest p-value. It is below 0.05. Is that convincing evidence of an improvement? Explain family-wise error, false discovery rate and how you would run a defensible model-selection process.
Original fundamentals practice, not a reported interview. Numerical examples are hypothetical. Primary software documentation retrieved September 27, 2026.
1. Count the opportunities to find a result
For a valid single test at level 0.05, the probability of rejecting a true null is at most 5%. That is not the probability that a reported positive result is false. If all 20 null hypotheses are true and the tests are independent with exactly 5% rejection probability, the chance of at least one false rejection is 1 − 0.95²⁰, approximately 64.15%.
The independence assumption matters. Model comparisons often share the same evaluation examples and baseline, making their statistics dependent. The 64.15% number is an illustrative calculation, not a universal correction for 20 correlated models. Even without independence, the expected number of false rejections is one when all 20 individual tests have exactly 5% type-I error, by linearity of expectation.
Define the family of claims before inspecting results. Variants, metrics, slices and repeatedly checked time points can all create selection opportunities. Calling only the winning model “the experiment” does not erase the other comparisons. Exploratory searches can be useful, but their findings need appropriately designed confirmation.
2. Control the probability of any false rejection
Family-wise error rate, or FWER, is the probability of at least one false rejection within the specified family. Bonferroni tests each of m hypotheses at α/m. With 20 tests and α = 0.05, the threshold is 0.0025. A smallest p-value of 0.03 does not pass that rule.
The union bound explains why Bonferroni works without independence: the probability of any false rejection is at most the sum of the true-null rejection probabilities, bounded by m × α/m. This requires valid individual p-values. Multiplying an invalid p-value from a biased or repeatedly peeked analysis does not repair its validity.
Holm's procedure is a less conservative step-down alternative. Sort p-values from smallest to largest. Compare the first with α/m, the next with α/(m−1), and continue until the first failure; do not reject that hypothesis or later ones. It controls FWER with valid p-values under arbitrary dependence.
3. Work through Holm and Benjamini–Hochberg
For a separate example, suppose the full family contains five sorted p-values: 0.004, 0.012, 0.021, 0.040 and 0.200. At α = 0.05, Bonferroni uses 0.010 for each and rejects only the first hypothesis.
Holm compares 0.004 with 0.010 and rejects; then 0.012 with 0.0125 and rejects. The third value, 0.021, exceeds 0.05/3 ≈ 0.0167, so it stops. Two hypotheses are rejected. The later 0.040 is not reconsidered against 0.05 merely because that comparison looks favorable.
False discovery rate, or FDR, is E[V / max(R, 1)], where V is the number of false rejections and R the total number of rejections. It controls an expected proportion across repeated applications, not a guarantee that every realized discovery list contains at most 5% false items.
Benjamini–Hochberg at q = 0.05 compares sorted p-value p(i) with i × q/m. Here the thresholds are 0.010, 0.020, 0.030, 0.040 and 0.050. Using the rule p(i) ≤ i × q/m, find the largest passing index, four, and reject the first four hypotheses. If no index passes, reject none. This step-up rule uses a different error objective from Holm; four rejections are not evidence that it is universally better.
The standard BH guarantee applies under independence and specified forms of positive dependence, not arbitrary correlation. When those assumptions are unsuitable, use a method with the needed guarantee, such as Benjamini–Yekutieli for arbitrary dependence, or a justified resampling design. Do not choose the procedure after seeing which one produces the desired answer.
4. Separate model search from confirmation
Use training and development data for architecture, feature and hyperparameter search. Freeze the selected candidate, primary metric, meaningful effect threshold, evaluation unit and analysis plan before final confirmation. A fresh independent test set or controlled experiment can evaluate that frozen choice. If multiple candidates or claims enter confirmation, account for that family too.
Repeatedly checking the same test set and adapting the next model creates information leakage. Merely correcting the final five displayed p-values does not account for an undocumented search through hundreds of variants. Record experiments and preserve a genuinely held-out confirmation process. For ongoing experiments, use a prespecified sequential analysis instead of assuming a fixed-horizon test tolerates arbitrary stopping.
Use paired inference when predictions are evaluated on the same examples, and respect users, conversations or other dependent units. Multiplicity is separate from the question of whether an individual test has the right sampling model. Report effect sizes, uncertainty and operational cost; a tiny but statistically detectable gain may not justify deployment.
5. Handle common interview traps
“No corrected significance” is not proof of equivalence; the study may lack power. Define an equivalence or noninferiority target and use a suitable design if that is the actual decision. A 95% interval for each of many selected effects is not automatically a set of simultaneous 95% intervals. Choosing the best observed effect tends to exaggerate its apparent magnitude through selection; it is not guaranteed to overestimate in every realized dataset.
For exploratory slice discovery, FDR may match the goal of creating a follow-up list. For a small set of consequential release claims, controlling the chance of any false claim may be preferable. The decision depends on the cost of errors and the claim family, not a blanket preference for the method that rejects more hypotheses.
Foundation: distinguish type-I error from the probability a discovery is false. Senior: compute the five-test example and explain dependence. Staff: redesign a workflow that adaptively reuses its test set.
Score 0–2 each for the claim family, error-rate definitions, worked procedures, assumptions and confirmation design. Continue with confidence intervals and A/B testing.
Sources and next steps
- statsmodels multiple-testing API — available correction procedures and dependence considerations.
The numerical examples and model-selection scenario are original. A library can compute corrections; the analyst must define a valid family, sampling model and decision rule.
Continue your preparation
Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.