When would you use forward-fill, interpolation or seasonal imputation to fill gaps in a time series?

Quick Overview

Asks how to choose between forward-fill, interpolation and seasonal imputation when a time series is missing timestamps. Tests reasoning about what each method assumes about the gap, how gap length and seasonality change the choice, and how to avoid look-ahead leakage when filling.

When would you use forward-fill, interpolation or seasonal imputation to fill gaps in a time series?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

For a gapped series, when would you use forward-fill versus interpolation versus seasonal imputation to fill missing timestamps? Assume the series should arrive on a regular grid, such as hourly, but some timestamps are missing, and the gaps range from a single step to several days. ```hint What happened in the gap For each method, ask what it assumes the series did while you were not observing it, and how well that assumption holds as the gap gets longer. ``` ```hint Which values it reads Check whether each method uses only values from before the gap or also values from after it, and when that difference would matter. ``` ### What a Strong Answer Covers - The assumption each method makes about the gap, and the kind of series it fits - How the length of the gap changes the choice - Failure modes such as artificial plateaus, smoothing over a cycle, and stale seasonal profiles - Practical handling: putting the series on a regular grid, flagging imputed points, and avoiding look-ahead in forecasting pipelines ### Follow-up Questions - You are building features for a real-time forecasting model. Which of these methods can you use without leaking future information? - A series of hourly transaction counts has missing hours. How do you decide whether a missing hour means zero or an unrecorded value? - How would you fill a two-week gap in a series that has both a trend and weekly seasonality? - How would you check which imputation method works best on your data?

Overview: Asks how to choose between forward-fill, interpolation and seasonal imputation when a time series is missing timestamps. Tests reasoning about what each method assumes about the gap, how gap length and seasonality change the choice, and how to avoid look-ahead leakage when filling.

Nov 25, 2026
mediumData ScientistOtherStatistics & Math
0
0

For a gapped series, when would you use forward-fill versus interpolation versus seasonal imputation to fill missing timestamps?

Assume the series should arrive on a regular grid, such as hourly, but some timestamps are missing, and the gaps range from a single step to several days.

What a Strong Answer Covers Guidance

  • The assumption each method makes about the gap, and the kind of series it fits
  • How the length of the gap changes the choice
  • Failure modes such as artificial plateaus, smoothing over a cycle, and stale seasonal profiles
  • Practical handling: putting the series on a regular grid, flagging imputed points, and avoiding look-ahead in forecasting pipelines

Follow-up Questions Guidance

  • You are building features for a real-time forecasting model. Which of these methods can you use without leaking future information?
  • A series of hourly transaction counts has missing hours. How do you decide whether a missing hour means zero or an unrecorded value?
  • How would you fill a two-week gap in a series that has both a trend and weekly seasonality?
  • How would you check which imputation method works best on your data?