How would you assess the stationarity of a time series in the context of A/B testing for sales forecasting?

Instruction: Discuss the methods you would use to test for stationarity and how non-stationarity could impact your A/B test.

Context: Candidates are evaluated on their understanding of time series analysis, specifically the importance of stationarity in A/B testing for forecasting applications.

Updated

Official answer

Distinguish forecasting-model assumptions from experimental identification. A concurrent randomized A/B test does not generally require each group’s sales series to be stationary. Common seasonal trends can affect both arms while randomization still supports a treatment contrast; dependence and timing must be handled in the analysis.

For time-series modeling, inspect trend, seasonality, changing variance and structural breaks. Weak stationarity concerns constant mean and lag-based covariance with finite variance. The ADF test has a unit-root null under its specified trend and lag choices; KPSS instead uses a level- or trend-stationarity null. Neither test certifies every form of stationarity or resolves all breaks.

Use differencing or detrending when justified by the forecasting model. Do not automatically difference an experimental outcome: that can change the estimand. Time-based assignment or switchback designs also need attention to carryover, autocorrelation and time confounding.

Validate forecasts with chronological splits and use experiment inference appropriate to assignment. Rejecting a unit-root null alone does not make a before/after comparison causal.

Related Questions