Find the Split
Here are 100 years of a simulated series. Did its level shift at some point? Pick a split, and the years before it are compared with the years after it by a two-sample \(t\)-test with a pooled standard deviation. Move the split to find where the two segments differ most.
\(|t|\) for each split you have tried
This series has no shift: every value is an independent draw from the same Gaussian distribution. Its largest \(|t|\) is 2.65, for the split after year 51, where the \(t\)-test gives p = 0.009. That p-value describes a single split chosen before looking at the data. Trying all 81 splits and keeping the one with the largest \(|t|\) runs 81 overlapping tests and reports the most extreme, so the search needs a null distribution of its own.
Simulate the Search
The test statistic is now the largest \(|t|\) over every split with at least 10 years on each side. Simulate series with no shift, search each one the same way, and see how often the largest \(|t|\) is at least as large as the observed one.
Largest \(|t|\) of every simulated series
This Test's Choices
- Test statistic: the largest \(|t|\) over every split with at least 10 years on each side, which for 100 years is 81 splits.
- Null model: no shift, and either
- shuffled years: the series' own values in a random order; or
- Gaussian years: each year an independent Gaussian draw with the series' mean and standard deviation.
- Alternative hypothesis: a shift up or down at some unknown year, so large values of the largest \(|t|\) count against the null.
In series of 100 independent Gaussian years with no shift, the best split's \(t\)-test gives p < 0.05 in 40% of series, and each of these is a false alarm: a p below 0.05 when the null is true. The cutoff for one split, \(|t| =\) 1.98, is far too low for the largest of 81. (Neighboring splits share most of their years, so the 81 tests overlap; 81 independent tests would give at least one p below 0.05 in 98% of series.) To keep false alarms at 5%, the largest \(|t|\) has to exceed about 3.0. For the series above, the simulated p-value is about 0.11, not 0.009.
The largest \(|t|\) doesn't change when every value is shifted or rescaled, so Gaussian years with any mean and standard deviation give the same null distribution: one simulation serves every series of the same length.
Formulas for the Search
Formulas exist for this maximum. The largest \(t^2\) is the sup-\(F\) statistic of Andrews (1993), who gave its large-sample critical values, and Hansen (1997) gave p-values; both depend on how many years are excluded at each end. With 10% excluded at each end, Andrews' corrected tables (Andrews 2003) give a 5% cutoff of about 3.02 for the largest \(|t|\). Simulating Gaussian series gives 3.00 for 100 years and 3.03 for 2,000. Simulation gives the p-value for the record length, the minimum segment and the statistic at hand without a table, and the same steps work for a statistic no table covers.
The Nile
Choose "Nile at Aswan" in the figure. The Nile's annual flow at Aswan drops after 1898: the mean is about 1,098 × 108 m³ for 1871–1898 and 850 × 108 m³ for 1899–1970, and the largest \(|t|\) is 8.71. None of 200,000 shuffled series reached it, so the simulated p-value is below 0.0001. The drop coincides with the building of the first Aswan dam (1898–1902), although the flows alone can't show what caused it. If a split year had been fixed from the dam's history before looking at the flows, the \(t\)-test for that one split would be a valid test. Choosing 1898 because the plot drops there is a search.
Bootstrap and Permutation Tests
"Shuffled years" is a permutation test, and "Gaussian years" is a parametric bootstrap test from the no-shift fit. The shuffle assumes that, with no shift, the years are exchangeable: their order carries no information. Gaussian years go further and treat the years as independent draws. Once its shift is removed, the Nile's flow in one year is only weakly correlated with the next year's (correlation 0.16, against 0.51 before the shift is removed), so the shift, not persistence from year to year, accounts for most of the raw series' correlation. For a series with stronger persistence, a block bootstrap keeps it in the null world: it resamples blocks of consecutive years from the deviations around the two segment means.