Put Confidence Intervals on an Offline Accuracy Gain With the Bootstrap
Last updated: November 29, 2026
Quick Overview
Your new product question-answering model beats the baseline by 1.5 accuracy points on a 2,000-example test set. Explain how to tell whether that gain is real, and implement a bootstrap confidence interval for an evaluation metric.
Amazon
November 29, 20260
0
0 solved
Your new product question-answering model beats the baseline by 1.5 accuracy points on a 2,000-example test set. Explain how to tell whether that gain is real, and implement a bootstrap confidence interval for an evaluation metric.
Amazon teams ship many incremental model updates, and reviewers in a model launch review expect error bars on offline numbers. The interviewer checks that you know why a point estimate is not enough and that you can implement a resampling interval correctly.
What the Interviewer Expects
- Explains sampling variability in a finite test set
- Implements a percentile bootstrap that resamples examples with replacement
- Bootstraps the difference between models on the same resample (paired)
- Knows when bootstrap intervals are unreliable (tiny or clustered samples)
- Connects the interval to the launch decision
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- Why should you resample the paired difference rather than each model separately?
- How would you bootstrap when examples are grouped by customer or product?
- How many bootstrap replicates are enough?
- When would you prefer an analytic interval over the bootstrap?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Ask how the test set was sampled, whether several examples come from the same product page (they will be correlated), and what gain is meaningful for the business....
Approach
A test set is one sample of the traffic the model will see. The bootstrap estimates the sampling distribution of a metric by resampling the test set with replacement many times and recomputing the met...