The interview problem
Design an operational forecasting service that exposes calibrated intervals rather than only point predictions.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume daily demand forecasts with delayed actuals. Produce point and quantile predictions, validate interval coverage on rolling historical windows and track width by horizon and segment. Store forecast issue time, horizon and interval method so evaluation uses only forecasts made before outcomes. Use a seasonal baseline and distinguish per-time-step coverage from simultaneous coverage over a whole horizon. Escalate persistent undercoverage after distribution shifts.
2. Trace the design or derivation
Issue versioned forecast → store interval → wait for actuals → score coverage and width → recalibrate
Quantile crossing can produce a lower endpoint above an upper endpoint; detect it before serving and use a justified monotonic repair or constrained model. Keep calibration fitting behind the forecast issue time. Late revisions to actuals should be versioned so the evaluation can distinguish model changes from corrected ground truth.
3. Calculate the example
A nominal 90% interval contains 84 of 100 observed outcomes: empirical coverage is 84%. Widening every interval indefinitely can improve coverage while destroying usefulness, so report mean width and a proper interval score alongside coverage.
4. Failure cases and trade-offs
Sparse segments have noisy coverage estimates; pooled calibration can hide local undercoverage. Temporal dependence weakens naive independent-binomial uncertainty calculations. Wider intervals reduce surprises but increase operational conservatism. Evaluate the downstream decision, not only interval aesthetics.
5. Validation, follow-ups and self-review
Backtest across holidays and level shifts without tuning on the final period. Follow-up: how would simultaneous weekly coverage differ? Self-review: specify horizon, issue time, width and the intended coverage population.
Sources and related practice
Technical reference: otexts.com — Forecast distributions and prediction intervals.
Source publication/update: Third edition; exact page update not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Predict conditional quantiles with pinball loss; Construct and evaluate conformal prediction sets.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.