The interview problem

Practice prompt

Combine a noisy prediction and measurement with explicit uncertainty.

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 a scalar linear Gaussian model with independent prediction error variance P and measurement noise R. Gain K=P/(P+R); updated mean m+K(z−m), variance (1−K)P. Prediction between measurements adds process uncertainty separately.

2. Trace the design or derivation

Prior mean and variance
  → innovation
  → gain
  → posterior
  → next prediction

If a random-walk transition adds process variance 2, the next predicted variance is 3+2=5 before another measurement. Reusing posterior variance 3 would ignore uncertainty accumulated while the system evolves. Validate innovation statistics to detect a mismatched noise model.

3. Calculate the example

For m=10, P=4, z=14 and R=12, K=0.25, updated mean 11 and variance 3. The noisier measurement receives less weight.

4. Failure cases and trade-offs

Correlated errors or incorrect noise estimates make uncertainty overconfident. An outlier can violate Gaussian assumptions; a small reported variance is not proof of accuracy.

5. Validation, follow-ups and self-review

Check R approaching zero and infinity. Follow-up: where does process noise enter? Self-review: separate prediction and measurement updates.

Sources and related practice

Technical reference: arxiv.org — Linear Kalman filtering; scalar numerical example independently checked.

Source publication/update: 2017-10-09; revised 2019-06-27. 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 with a Gaussian process and explain its uncertainty; Serve forecast intervals with coverage monitoring.

Continue your preparation

Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.