▸case-01 I have daily e-commerce order revenue data in a pandas Series `sales` that includes several holiday days with $0 in revenue. I want to perform multiplicative decomposition using `statsmodels.tsa.seasonal.seasonal_decompose(sales, model='multiplicative')`. What issue will occur when running this code on series with zero values, and how should the code or preprocessing be adjusted? | pass→pass | 19,368 | 20,348 | +5% | 1 | 1 | 0% | 2,532 | 2,893 | +14% | 0 | 0 | — |
▸case-02 I am analyzing hourly API request volume data that contains occasional extreme traffic spikes from DDoS attempts. I want to decompose the series into trend, seasonal, and residual components. Should I use classical moving average decomposition (`seasonal_decompose`) or LOESS-based decomposition (`STL`), and what specific parameter setting prevents the traffic spikes from distorting the trend component? | pass→pass | 18,009 | 19,957 | +11% | 1 | 1 | 0% | 2,229 | 2,982 | +34% | 0 | 0 | — |
▸case-03 I have a pandas DataFrame `df` with a `date` column containing daily dates and a `sales` column. I converted `df['date']` to datetime, set it as the index without setting `freq`, and called `seasonal_decompose(df['sales'])`. Python raised a `ValueError: You must specify a period or have a DatetimeIndex with a freq`. For daily data exhibiting weekly seasonal patterns, how should this function call or DataFrame index be configured? | pass→pass | 14,816 | 15,119 | +2% | 1 | 1 | 0% | 1,955 | 2,379 | +22% | 0 | 0 | — |
▸case-04 I am analyzing hourly electricity demand data spanning three years. The data exhibits both a 24-hour daily cycle and a 168-hour weekly cycle. If I run standard `seasonal_decompose(series, period=24)`, how does it handle the weekly pattern, and what python function or decomposition approach should be used to capture both seasonal periods simultaneously? | pass→pass | 20,660 | 23,552 | +14% | 1 | 1 | 0% | 2,855 | 3,237 | +13% | 0 | 0 | — |
▸case-05 After decomposing my monthly retail sales time series using additive decomposition, I plotted the residual component. I want to run a formal hypothesis test to confirm that the residual component represents white noise without uncaptured periodic structure. Which statistical test should I execute on the residuals, and what does a p-value below 0.05 indicate? | pass→pass | 14,588 | 15,930 | +9% | 1 | 1 | 0% | 1,766 | 2,412 | +37% | 0 | 0 | — |
▸case-06 My quarterly revenue time series shows seasonal swings whose amplitude grows proportionally as the overall trend level increases. I want to use additive STL decomposition (`statsmodels.tsa.seasonal.STL`) which only supports additive modeling. What preprocessing mathematical transformation should I apply to the series before passing it to additive STL? | pass→pass | 14,766 | 14,239 | -4% | 1 | 1 | 0% | 1,842 | 2,182 | +18% | 0 | 0 | — |
▸case-07 When initializing `STL(endog, period=12, seasonal=14)` in Python's `statsmodels`, the code fails with a `ValueError`. What structural constraint does `statsmodels.tsa.seasonal.STL` place on the `seasonal` parameter length, and how should `seasonal` be set? | pass→fail | 13,879 | 12,799 | -8% | 1 | 1 | 0% | 1,672 | 1,924 | +15% | 0 | 0 | — |
▸case-08 I am modeling monthly retail sales figures. Some months have 5 weekends while others have 4, causing variations in sales that moving average decomposition cannot adjust for. What specialized time series decomposition software standard or model class explicitly accounts for trading-day count and movable holiday variations like Easter? | pass→pass | 20,692 | 18,037 | -13% | 1 | 1 | 0% | 2,740 | 2,686 | -2% | 0 | 0 | — |
▸case-09 I have a daily sensor reading time series containing 15 missing (`NaN`) values caused by sensor downtime. When I run `STL(series, period=7).fit()`, statsmodels throws an error regarding NaN values. Can STL natively handle missing values, and what preprocessing step should be performed on the missing points? | pass→pass | 18,730 | 17,884 | -5% | 1 | 1 | 0% | 2,284 | 2,664 | +17% | 0 | 0 | — |
▸case-10 I am configuring `STL(series, period=7, trend=5)` for daily data. Why is setting `trend=5` problematic when `period=7`, and what general rule dictates the minimum length of the `trend` window relative to `period` in STL? | pass→pass | 19,692 | 18,358 | -7% | 1 | 1 | 0% | 2,871 | 2,742 | -4% | 0 | 0 | — |
▸case-11 I want to quantitatively measure the strength of the trend component $F_T$ and seasonal component $F_S$ in my additive time series decomposition $Y_t = T_t + S_t + R_t$, as defined by Hyndman. What formula based on component variances should be used to compute trend strength $F_T$? | fail→fail | 13,929 | 7,582 | -46% | 1 | 1 | 0% | 1,872 | 2,001 | +7% | 0 | 0 | — |
▸case-12 I decomposed a time series into trend (`res.trend`), seasonal (`res.seasonal`), and residual (`res.resid`) using `model='multiplicative'`. A junior analyst reconstructed the original series using `reconstructed = res.trend + res.seasonal + res.resid`. Why is this reconstruction incorrect, and what is the correct formula? | pass→pass | 8,631 | 14,397 | +67% | 1 | 1 | 0% | 1,668 | 2,182 | +31% | 0 | 0 | — |
▸case-13 I am using Meta Prophet for time series decomposition and forecasting. The trend component is overfitting short-term noise and producing sharp, unrealistic bend points. A teammate suggested increasing `changepoint_prior_scale` from 0.05 to 0.5. Will increasing this parameter make the trend smoother or more flexible, and how should it be adjusted to reduce overfitting? | pass→pass | 16,179 | 12,693 | -22% | 1 | 1 | 0% | 2,165 | 2,854 | +32% | 0 | 0 | — |
▸case-14 I applied classical centered moving average decomposition `seasonal_decompose(df['sales'], model='additive', period=12)` on 24 months of sales data. The output trend component has 6 NaN values at the beginning and 6 NaN values at the end of the series. Is this a bug in statsmodels, why does it happen, and how can complete trend estimates at the boundaries be obtained? | pass→pass | 13,097 | 18,485 | +41% | 1 | 1 | 0% | 2,471 | 2,857 | +16% | 0 | 0 | — |
▸case-15 I removed the seasonal component from my monthly sales series by calculating $Y_t - S_t$. I plan to fit an ARMA model directly to this deseasonalized series without further differencing. What statistical assumption must be verified on the deseasonalized series before fitting ARMA, and which test should I perform? | pass→pass | 9,835 | 11,962 | +22% | 1 | 1 | 0% | 1,856 | 2,706 | +46% | 0 | 0 | — |
▸case-16 I am analyzing tidal data recorded every 15 minutes where the primary tidal cycle length is approximately 49.21 time steps (non-integer period). Classical decomposition algorithms like `seasonal_decompose` require an integer period parameter. How can non-integer periodicities be modeled in a regression-based time series decomposition frame? | pass→pass | 18,150 | 20,790 | +15% | 1 | 1 | 0% | 3,291 | 4,283 | +30% | 0 | 0 | — |
▸case-17 I want to calculate a 7-day centered moving average in PostgreSQL for time series smoothing. A developer submitted the clause `AVG(val) OVER (ORDER BY date_col ROWS BETWEEN 6 PRECEDING AND CURRENT ROW)`. What type of moving average does this SQL snippet calculate, and how should the frame specification be written for a true 7-day centered moving average? | pass→pass | 15,414 | 14,107 | -8% | 1 | 1 | 0% | 2,004 | 2,063 | +3% | 0 | 0 | — |
▸case-18 I am running `STL` in Python on financial return series with heavy-tailed outlier spikes. I want to enable LOESS bisquare reweighting to make component estimation robust against these outliers. What parameter flag and iteration count parameter in `statsmodels.tsa.seasonal.STL` control this behavior? | fail→pass | 7,656 | 12,851 | +68% | 1 | 1 | 0% | 1,444 | 2,883 | +100% | 0 | 0 | — |
▸case-19 I want to visually assess whether the monthly seasonal pattern of hotel bookings has changed its shape over the past 10 years (e.g., peak shifting from July to August). Standard line charts obscure month-specific trends over time. What specific diagnostic chart groups data by month across years to display the evolution of seasonal components? | pass→pass | 15,828 | 15,142 | -4% | 1 | 1 | 0% | 1,914 | 3,167 | +65% | 0 | 0 | — |
▸case-20 When performing classical additive decomposition on monthly data ($m=12$), why is a simple 12-term moving average uncentered with respect to time, and what specific combination of moving averages ($2 \times 12$ MA) is standard for centering even seasonal periods? | pass→pass | 20,127 | 15,292 | -24% | 1 | 1 | 0% | 3,038 | 3,527 | +16% | 0 | 0 | — |
▸case-21 A business analyst decomposes monthly sales into trend and seasonal components, forecasts the trend component 12 months ahead using an ARIMA model, and presents that raw ARIMA trend forecast as the final predicted sales revenue. What critical post-processing step was omitted from this forecast workflow? | pass→pass | 10,271 | 13,254 | +29% | 1 | 1 | 0% | 936 | 1,962 | +110% | 0 | 0 | — |
▸case-22 I have two stationary multivariate economic series in a pandas DataFrame `df`. I am fitting a Vector Autoregression model using `statsmodels.tsa.api.VAR(df)`. How do I select the optimal lag order $p$ based on information criteria like AIC and BIC before calling `fit()`? | pass→fail | 15,251 | 16,309 | +7% | 1 | 1 | 0% | 1,995 | 2,485 | +25% | 0 | 0 | — |
▸case-23 I have a table `monthly_active_users` with columns `month_date` and `active_users` in PostgreSQL. I need a query that computes both month-over-month (MoM) user growth percentage and year-over-year (YoY) user growth percentage. Write the SQL query using `LAG` window functions. | pass→pass | 13,594 | 7,586 | -44% | 1 | 1 | 0% | 1,926 | 1,968 | +2% | 0 | 0 | — |
▸case-24 I have 100 customer usage time series of equal length. I want to cluster these time series into 4 distinct behavior groups using Dynamic Time Warping distance in Python with `tslearn.clustering.TimeSeriesKMeans`. How should `TimeSeriesKMeans` be initialized and what data scaling is recommended? | pass→pass | 21,921 | 14,825 | -32% | 1 | 1 | 0% | 3,170 | 3,248 | +2% | 0 | 0 | — |