CHANGEPOINT DETECTOR · RESEARCH ALGORITHMS IN YOUR BROWSER · NOTHING UPLOADED

When did your series change?

Analyse a series Try the Nile river example

Paste or upload a time series — sales, sign-ups, sensor readings, latency, prices — and find the points where its level or its volatility shifted. Two published methods run side by side: PELT returns the exact best segmentation, and Bayesian online changepoint detection gives the probability that a change happened at each point.

Nothing you enter leaves this browser tab. Statistical analysis of data you supply, not advice. Not legal, tax, or financial advice.

1. Your data

Method and citation

PELT (Pruned Exact Linear Time; Killick, Fearnhead & Eckley 2012) minimises the total cost of a segmentation — twice the negative Gaussian log-likelihood of each segment, plus a penalty for every change — over every possible set of changes. Dynamic programming makes this exact; pruning discards candidate change locations that can never be optimal, which makes it about linear in the length of the series. For a change in level, the noise standard deviation is estimated once from the median absolute difference of successive points, so the level shifts themselves do not inflate it.

Bayesian online changepoint detection (Adams & MacKay 2007) keeps a posterior distribution over the run length — how many points since the last change — and updates it with each new point. Each segment has an unknown mean and variance with a Normal-Inverse-Gamma prior, so predictions are Student-t and the update is exact. The prior is centred on your data (its median and robust noise variance) and kept weak. Because the probability of a change at the newest point always equals the hazard, this tool reports, for each point, the posterior probability — seen five points later — that a new segment began there.

Limits. Both methods assume the points within a segment are independent around a constant level; strong seasonality or autocorrelation shows up as extra changes, so remove a known seasonal pattern first. Gradual trends are approximated as steps unless you choose the level-or-slope model, which fits a straight line per segment. BIC, the default penalty, still splits roughly one series in ten of pure noise of length 300 (our tests measure this), so treat a single small change with care. A changepoint is a statement about the data, not about what caused it.

Source, tests and a command-line version: GitHub. AI agents can call the same engine: node platform/agents/tools.mjs call changepoint-detector analyze --input '{"values":[...]}'.

Cite the methods

@article{adams2007bayesian,
  title   = {Bayesian Online Changepoint Detection},
  author  = {Adams, Ryan Prescott and MacKay, David J. C.},
  journal = {arXiv preprint arXiv:0710.3742},
  year    = {2007}
}
@article{killick2012optimal,
  title   = {Optimal Detection of Changepoints With a Linear Computational Cost},
  author  = {Killick, Rebecca and Fearnhead, Paul and Eckley, Idris A.},
  journal = {Journal of the American Statistical Association},
  volume  = {107}, number = {500}, pages = {1590--1598}, year = {2012},
  doi     = {10.1080/01621459.2012.737745}
}

Example data: annual flow of the Nile at Aswan, 1871–1970 (108 m³), first analysed for a changepoint by Cobb (1978, Biometrika 65(2):243–251); public domain, as distributed with statsmodels. Both methods here put the change after 1898, as the literature does.

Questions

What is changepoint detection?

Changepoint detection finds the points in a series where its behaviour changed: the average level stepped up or down, or the volatility grew or shrank. It answers "did something change, and when?" for sales, sensor readings, response times, prices or any measurement taken in order.

What is the difference between PELT and Bayesian online changepoint detection?

PELT looks at the whole series at once and returns the single best segmentation under a penalty for each extra change; it is exact, not a heuristic. Bayesian online changepoint detection reads the series one point at a time and gives a probability that a new segment started at each point. Use PELT for the answer and the Bayesian probability for how sure to be; a change both methods agree on is strong evidence.

Which penalty should I choose?

BIC is the default and a sensible one: it charges each extra change about log(n) per parameter, so it rarely invents changes in long series. AIC charges less and finds more, smaller changes. You can also type your own number; a larger penalty means fewer changes.

Should I detect a change in mean or in mean and variance?

Choose mean if you care about shifts in level and the noise looks roughly constant. Choose mean and variance if the series can become calmer or more volatile, for example error rates or returns. The mean-and-variance model needs at least five points per segment, because a variance fitted to two or three points is unreliable.

Does a detected changepoint prove that something caused the change?

No. It shows that the data before and after are better described as two segments than one. Whether a price change, a release or an outage caused it is a separate question that needs your knowledge of what happened then.

Is my data uploaded?

No. The file is read and analysed in this browser tab. There are no accounts, cookies or analytics vendors.