A control measure is introduced in April. Concentrations drop sharply and stay down. Run a trend test on the whole record and it reports a gradual decline — which is not what happened, understates the effect of the intervention, and misleads anyone deciding whether to repeat it.
Steps and trends are different phenomena and need different methods.
Step or Trend?
| Step change | Trend | |
|---|---|---|
| Shape | Abrupt shift to a new level | Gradual change over time |
| Typical cause | Intervention, instrument swap, site move | Accumulated emissions change, policy over years |
| Right method | Change point test | Mann-Kendall, Theil-Sen |
| Wrong method result | Trend test reports a spurious gradual decline | Change point test finds an arbitrary break |
Plot the series before choosing. This is the step people skip, and it is the one that decides which method is appropriate. A test cannot tell you which shape you are looking at; your eyes can.
Causes of Step Changes
Genuine and interesting:
- A control measure taking effect on a known date
- A major source starting or closing
- A traffic scheme, fuel standard or industrial change
- A lockdown or comparable activity change
Artefactual and important to catch:
- An instrument replacement or method change
- A site relocation, even a short one
- A calibration correction applied retrospectively
- A change in data processing or capture rules
That second list matters. An unrecognised instrument-driven step will be reported as an air quality improvement, and it is one of the more common ways trend analyses go wrong. Always check the site metadata against any detected break date before interpreting it.
Methods
Pettitt test. Non-parametric, detects a single change point without needing you to specify when. Rank-based like Mann-Kendall, so it suits skewed data. The usual first choice for air quality.
CUSUM. Cumulative sums of deviations from the mean; the point of maximum deviation indicates the break. Simple and easy to visualise.
Binary segmentation and PELT. For multiple change points. PELT — Pruned Exact Linear Time — is efficient and widely implemented, and finds an optimal set of breaks rather than one.
Intervention analysis. Where the date is known in advance, this is the strongest approach: model the series with a term for the intervention and test whether it is significant. Much more powerful than searching for an unknown break, because you are testing a specific hypothesis rather than fishing.
The Known-Date Case
If you know when the intervention happened, use that knowledge. Searching blindly for a break when you already have a date throws away information and invites a spurious result elsewhere in the series.
A sound approach:
- Define the before and after periods, with a buffer around the date if the effect took time to establish
- Check both periods have adequate data capture
- Compare like with like seasonally — never a winter "before" against a monsoon "after"
- Account for meteorological differences between the periods
- Test the difference formally rather than comparing two means by eye
- Report the effect size with a confidence interval
Step 3 causes more bad intervention analyses than anything else. An intervention in October, compared across the following months, is competing with the entire winter cycle.
Tools:
library(trend)
pettitt.test(series)
library(changepoint)
cpt.mean(series, method = "PELT")
import ruptures as rpt
algo = rpt.Pelt(model="rbf").fit(values)
breaks = algo.predict(pen=10)
Interpreting a Detected Break
A detected change point is a hypothesis, not a conclusion. Work through:
Does a real event correspond to the date? Check the site log, instrument records and any known intervention. An unexplained break is more likely instrumental than atmospheric.
Is the magnitude plausible? A 40% overnight drop from a modest traffic measure is implausible; from a major source closure it is not.
Does it survive seasonal adjustment? Run the detection on deseasonalised data — see seasonal decomposition. Breaks that disappear were seasonal artefacts.
Do nearby stations show it? A regional cause should appear at several sites. A break at one station only points to something local — quite possibly the instrument.
Was there a meteorological shift? Compare wind, rainfall and mixing conditions before and after.
That fourth check is the most useful single diagnostic available, and it costs nothing if you have neighbouring station data.
COVID as a Worked Case
The 2020 lockdowns are the clearest large-scale step change in recent air quality records, and they illustrate every difficulty.
Concentrations fell sharply. Attributing all of it to reduced activity was tempting and wrong for several reasons: the lockdown coincided with the seasonal transition into the pre-monsoon period; meteorological conditions in spring 2020 differed from previous years; and different pollutants responded very differently — NO2 fell far more than PM2.5, because PM has substantial regional and secondary contributions that traffic reduction does not remove.
The lesson generalises. A step change in the data is a starting point for investigation, not a finished attribution. The pollutant-by-pollutant differences were more informative than the headline drop, because they pointed at which sources actually changed.
Segmented Trend Analysis
Where a break is real and explained, the correct treatment is usually not to discard the earlier data but to analyse each segment separately.
This answers a more useful question than a single whole-record trend. Consider a record with a source closure in year six of twelve: a whole-record trend reports a decline that mixes the step with whatever was happening within each period. Segmenting gives you three separate facts — the trend before, the size of the step, and the trend after.
The third is often the most policy-relevant. A step down followed by a flat period means the intervention worked once and nothing has improved since. A step down followed by a continued decline means the intervention worked and other measures are also delivering. Those imply very different next actions, and the single-slope analysis cannot distinguish them.
Practical constraints: each segment needs enough data to support a trend test in its own right, which in practice means at least five to eight years per segment. With a break in the middle of a twelve-year record you may be able to characterise the step reliably but not the trends either side — in which case report the step and say explicitly that the within-segment trends are indeterminate.
Reporting
State the detected date and the method. Give the before and after levels with intervals rather than point estimates. Say what corroborating evidence exists — metadata, neighbouring stations, meteorology. And be explicit about what could not be ruled out. A break with no identified cause should be reported as unexplained, not attributed to the most convenient explanation available.
Multiple Breaks and Over-Fitting
Methods such as PELT will find as many change points as you let them, and the penalty parameter controls how many. This is where change point analysis most often goes wrong.
Set the penalty low and the algorithm finds a break every time the series wobbles — a twelve-year record can yield eight "change points", none of which correspond to anything real. Set it high and genuine breaks are missed.
Three safeguards:
Start from known events. If you have three documented interventions, expect around three breaks. A method returning nine is over-fitting.
Require corroboration. Every detected break should match either a metadata event or a break at a neighbouring station. Unexplained breaks in isolation are usually noise or instrument behaviour.
Check stability. Re-run with a range of penalty values. Breaks that persist across the range are more credible than those appearing only at one setting.
The underlying discipline is the same as elsewhere in this field: a method that can produce a result from any input needs an external check on whether the result means anything. The algorithm cannot tell you that the break in March 2021 was a filter change rather than an air quality improvement — only the site log can.
Frequently Asked Questions
How do I know whether to test for a step or a trend? Plot the series first. If the shape is ambiguous, test both and report both, noting the ambiguity.
Can a series have both? Yes, commonly — a gradual trend with an intervention step. Handle the break, then test the trend within segments.
How much data do I need either side? Enough to characterise both levels reliably, and ideally covering a full seasonal cycle each side. Two months against five years is not a fair comparison.
What if the break is at the start or end? Detection is unreliable near the boundaries. Treat such results with caution.
Does the Pettitt test handle seasonality? Not inherently. Deseasonalise first, or the seasonal cycle can generate a false break.
How do I separate an instrument change from a real one? Site metadata, neighbouring stations, and whether other pollutants at the same site moved together. A single-parameter step at one site is almost always the instrument.
What if I find no break where I expected one? That is a result. It may mean the intervention had no detectable effect, or that the record is too noisy to detect one — the confidence interval tells you which.
Need to prove an air quality change is real? DSTechnoverse runs trend analysis, meteorological normalisation and compliance reporting on monitoring data — with the uncertainty stated, not hidden. We are based in Indore, Madhya Pradesh and work with clients across India. See our air quality analysis service, or talk to our team.
Related services
Related articles
- Air Quality Analysis: The Complete Guide to Parameters, Methods and Data Interpretation
- Air Quality Compliance Reporting Against NAAQS: Percentiles, Exceedances and Defensible Statistics
- Air Quality Forecasting with Machine Learning: Models, Features and Honest Validation
- Air Quality GIS Mapping: Spatial Interpolation, Kriging and Exposure Surfaces