i.i.d. Foil, MBB, CBB, Stationary Bootstrap & Model-Based AR(1) Bootstrap
Created by Dr. Pedram Jahangiry | Enhanced with Claude
Each tab resamples the same monthly airline passenger series with a different bootstrap method. Start with the i.i.d. foil to see what goes wrong, then drag the block-size (or mean block length) and sample-count sliders to regenerate the paths, see exactly which stretches of history got reused, and compare block resampling with fitting an AR(1) model to the residuals. Below the tabs, the payoff: what each method does to the uncertainty of a statistic.
Standard bootstrap draws observations independently with replacement — this destroys the temporal dependence structure that defines time series data. Autocorrelations, trends, and seasonal patterns would be completely lost. Time series bootstrapping must preserve the local dependence by resampling in blocks or through model-based approaches. The first tab lets you watch it happen.
Why not cut blocks from the raw counts? A summer 1960 block (about 600 passengers) would land in 1949 (about 120). The residuals have no trend, so their blocks can go anywhere. The catch: trend and seasonality are held fixed, so the bootstrap only captures uncertainty in the wiggles, not in how the trend and seasonal pattern were estimated. That is why the paths stay so close to the original.
The classic bootstrap (Efron, 1979) draws T observations one at a time, independently, with replacement. It works beautifully for independent data. For a time series it shuffles away the order, so everything that depends on order (trend, seasonality, autocorrelation) disappears.
In raw mode the damage is obvious: trend and seasonality vanish and every path is noise around the average. Residuals mode is sneakier. Adding trend and seasonality back makes the paths look reasonable, but the residuals have lost their memory: their lag 1 autocorrelation falls to about zero. The paths look right and are quietly wrong, which is exactly what the bootstrap distribution panel below the tabs exposes.
The MBB (Kunsch, 1989; Liu & Singh, 1992) samples overlapping blocks of fixed size m from the original series. Each block preserves the local dependence structure within it. Blocks are drawn uniformly from the T − m + 1 possible starting positions, then concatenated and trimmed to length T.
Observations near the boundaries (y1 and yT) appear in fewer possible blocks than observations in the middle. For example, y1 only appears in B1, while a middle observation yt appears in up to m different blocks. This creates an edge bias where boundary observations are undersampled — a limitation addressed by CBB.
The CBB (Politis & Romano, 1992) wraps the series into a circle so that yT+1 = y1, yT+2 = y2, etc. This creates exactly T possible blocks of any size m (vs. T−m+1 for MBB), ensuring all observations are sampled with equal probability.
By connecting yT back to y1, the CBB ensures that observations near the series boundaries have equal representation. This eliminates the edge bias of MBB. The trade-off is that the wrap-around junction is artificial — the connection from the end back to the start may not reflect genuine temporal dynamics, especially for non-seasonal data.
The SB (Politis & Romano, 1994) uses random block lengths drawn from a Geometric(p) distribution with mean block length 1/p. At each step, with probability p a new random block begins, and with probability 1−p the current block continues (with circular wrapping).
Among the classic block methods, the SB is the one whose resampled series is stationary (conditional on the data) when the original is stationary. The memoryless Geometric block lengths mean block joins can land anywhere, so no position in the resample is special. MBB and CBB put their joins at fixed positions (every m steps), so their resamples are not stationary even when the data are. The price is efficiency: the extra randomness in block lengths adds variance, so for the same average block length the SB is usually a bit less accurate than MBB or CBB.
This tab uses the same classical decomposition as the block methods (Trend + Seasonal + Residual on log data), but instead of resampling residuals in blocks, it fits an AR(1) model to carry the autocorrelation and then generates brand new residual paths from that model. The only question is where the new shocks come from, and the toggle gives you both answers:
Both flavors trust the AR(1) to carry the memory, so neither has block joins, and both can keep running past the last month. They differ only in the shocks. The semiparametric version reuses the fitted innovations, so their real shape (skew, fat tails, the odd outlier) carries over. The fully parametric version draws clean Normal shocks: exactly right if the errors really are Normal, blind to anything that shape misses. Compare the histogram with the Normal curve above to judge how much that matters here. If the AR(1) itself is wrong, both inherit the mistake; the lag 12 test in the panel below shows a case where it is. Block methods (MBB, CBB, SB) skip the model, which makes them more robust but less efficient.
One resampled path is just a picture. The real job of a bootstrap is to redraw the series hundreds of times, recompute a statistic on every copy, and read off its spread: a standard error or a confidence interval. Here the statistic is computed on the residuals of every resample, for every method at once. A good time series bootstrap should give copies whose autocorrelation sits around the original (the dashed line). The block size below applies to MBB, CBB and the SB mean block length.
Lag 1: the i.i.d. bootstrap collapses to about zero, because it erased the memory. The block methods sit a little below the original: only pairs that land inside the same block keep their link, roughly (m − k)/m of the lag k pairs, so every join drags the autocorrelation down. Slide m from 3 up to 24 and watch them climb. The AR(1) methods land on target, but only because they were fit to lag 1. Lag 12: the fairer test. The residuals still carry some yearly pattern (about 0.35). Blocks of 24 months keep about half of it, longer blocks keep more, and an AR(1) keeps essentially none, since it implies φ12 ≈ 0. That gap is model misspecification made visible. Std. deviation: every method gets the spread of the residuals roughly right, which is why the i.i.d. bootstrap can look fine on simple statistics and still fail on anything that depends on time order.
| Property | i.i.d. | MBB | CBB | Stationary Bootstrap | Model-based AR(1) |
|---|---|---|---|---|---|
| Block length | 1 | Fixed m | Fixed m | Random ~ Geom(p) | N/A (model-based) |
| Possible blocks | T (single points) | T − m + 1 | T | T starts, random lengths | N/A |
| Keeps autocorrelation | No | Within blocks | Within blocks | Within blocks | Through the fitted AR(1) |
| Edge bias | No | Yes | No | No | No |
| Resampled residuals stationary* | Yes (but no memory) | No | No | Yes | Approximately, if |φ| < 1 |
| Equal obs. probability | Yes | No | Yes | Yes | N/A (draws shocks) |
| Model-free | Yes | Yes | Yes | Yes | No |
| Shock distribution | Empirical | Empirical | Empirical | Empirical | Empirical (semiparametric) or Normal (fully parametric) |
| Block boundary artifacts | Every point is a jump | Yes, every m steps | Yes, every m steps | Yes, at random positions | No |
| Can extend residuals past T** | No | No | No | No | Yes (AR recursion) |
* This row is about the resampled residuals, conditional on the data. Once trend and seasonality
are added back, no Y* path is stationary, for any method.
** A forecast path also needs the trend extended past T, which needs its own model. Block bootstraps reach
forecasting a different way, through bagging: resample the series many times, refit a forecaster on each
copy, and average the forecasts (Bergmeir, Hyndman & Benítez, 2016).