Skip to content

Mann-Kendall and Sen’s Slope With Nothing to Install

Quarterly monitoring reports need a trend test, and the software that runs one is mostly desktop software. That is a problem on a Mac, on a locked-down work laptop, and on a deadline — and it is a solvable one, because Mann-Kendall and Sen’s slope are small pieces of arithmetic that a browser can do as well as anything else.

What the incumbents are, and what they are good at

ProUCL is the EPA’s statistical software for environmental data. It is free, it is thoroughly documented, its technical guide is a reference in its own right, and it covers a great deal more than trend testing — background comparisons, upper confidence limits, goodness-of-fit, outlier tests, and the whole apparatus of decision statistics that a site investigation needs. It is also, in practice, what a regulator expects to see named in a report, and nothing on this site changes that.

GWSDAT is the other one worth knowing about, and it deserves naming here rather than being quietly left out: a free, industry-backed groundwater data analysis tool with a hosted browser version, spatiotemporal modelling and its own trend reporting. If your work is groundwater plume analysis it is a serious tool and it already runs in a browser.

XLSTAT, ESdat and the various Excel toolkits round out the field, each with a different trade between cost, integration and how much of the workflow they own.

The checkable bits

ProUCL is a Windows desktop application built on the .NET Framework. There is no macOS build, and installing it requires the rights to install software on the machine.
Source: EPA’s ProUCL software page and the installation section of its user guide.
The most recent ProUCL release is version 5.2, from 2022.
Source: EPA’s ProUCL software downloads page.
Non-detects are handled here the way both Gilbert (1987) and the Fort Ord appendix describe: values below a detection limit form a tied group with each other, rather than being substituted with half the limit or dropped from the series.
Source: Gilbert (1987), Statistical Methods for Environmental Pollution Monitoring, chapter 16; HydroGeoLogic (2005), Fort Ord OU-1 Appendix D. Both reproductions are on the validation page.

The two ProUCL facts describe the software as its own documentation does, and were written down on the date at the bottom of this page. This site is not EPA software, is not endorsed or approved by the EPA or by any regulator, and no claim of equivalence with ProUCL is made anywhere on it. If your regulator names a package, use the package it names.

What this is, stated narrowly

The methods a trend section of a monitoring report rests on — the Mann-Kendall S with the tie correction, the normal approximation and the exact small-sample tail, Sen’s slope with interpolated confidence limits, and non-detects carried as censored values rather than substituted or dropped — computed in a browser tab, with nothing to install.

Those methods run across a whole network in one pass rather than one series at a time. A wide export from a laboratory database goes in; what comes out is a matrix of wells against analytes with a direction and a p-value in every cell, and a detail table underneath carrying n, the non-detect count, S, Z, p, Sen’s slope and its confidence interval for every series. The table is drawn INSIDE the exported SVG, so the file that goes into an appendix is the summary table as well as the picture — and the figure states on its own face which non-detect method ran, how many tests were run at what α, and that no multiple-comparison correction has been applied to any of them.

The seasonal test is there for the well that rises and falls with the water table. Turn it on and a Q1 is compared only with other Q1s, the seasons are summed after Hirsch, Slack and Smith (1982), and the covariance between seasons is folded into the variance after Hirsch and Slack (1984) wherever the record is long enough to support it. Where it is not — a well installed five years ago, or a season-year holding two samples — the correction is refused rather than approximated: that cell keeps the uncorrected variance, carries an asterisk, and the key to the asterisk is on the figure. And where the seasons of one well are trending in genuinely different directions, van Belle and Hughes’ homogeneity test says so, because a pooled seasonal slope is not meaningful for a series like that and Gilbert says as much on page 229.

Non-detects are treated the same way in a network run as in a single one, and that is a structural claim rather than a promise: both pages call the same censoring code, and the test suite asserts cell by cell that a well tested inside the matrix returns the same S, variance, p and slope as the same well tested on its own page. Each series is tied below its OWN highest reporting limit rather than a level pooled across the site, and where a non-detect arrives with no reporting limit at all the trend test still runs but Sen’s slope is withheld, because a rate of change cannot be estimated from a magnitude nobody wrote down.

The single-series test is free and the network run is the paid one. Both pages compute a complete figure from a sample dataset for every visitor, with nothing blurred and no number withheld, so what the paid one produces can be read in full before anybody decides anything.

That is the whole claim, and it is deliberately narrow. It is not a claim to cover what ProUCL covers: there are no upper confidence limits, no background comparison, no goodness-of-fit machinery and no distributional testing here, and if your report needs those then it needs ProUCL and this is at best a second opinion on one section of it.

Where it is genuinely better is the operating system, the install and the data. A browser tab is a browser tab on macOS, on Linux and on a laptop whose IT policy will not let you install a .NET application; and because everything runs in that tab, a file under litigation hold does not have to be uploaded anywhere to get a p-value out of it.

What the trend test actually gives you here

The S statistic and the number of pairs behind it; the variance with the tie correction; the normal approximation with the continuity correction, or the exact permutation tail for short untied series; a two-sided p-value that says which of the two it used; Sen’s slope with a confidence interval found by interpolating between ranked slopes rather than by rounding the ranks; and a sentence in plain English saying what that adds up to.

All of it is checked against Gilbert’s four worked examples, which print every intermediate — the tie-corrected variance, the time-tie variance, the continuity correction, the median slope and the interpolated limits. Those reproductions are published with the test files that assert them, so the arithmetic is something you can check rather than something you have to believe.

The seasonal test is checked the same way, against Gilbert’s chapter 17 and against something rarer: the two example datasets distributed with the USGS Kendall program, run through and compared with the numbers that program printed for them — including the p-value adjusted for correlation among seasons, which is the one number in the output that nothing but a correct covariance correction can produce. Those two comparisons are on the validation page with the rest.

Where you should not use this

If a regulator, a permit or a work plan names a specific package, use that package. A report whose statistics were produced by software the reviewer has never heard of is a conversation you did not need to have, and no amount of published validation makes that conversation shorter.

If your analysis needs upper confidence limits on a mean, background threshold values, distributional fitting, or any of the other things a decision-statistics package exists for, this does not do them and there is no plan for it to. The scope here is sensor and environmental TIME SERIES, not the whole of environmental statistics.

And if your work is plume-scale groundwater analysis rather than a per-well trend, look at GWSDAT first. It was built for exactly that and it is free.

Common questions

Is this approved by the EPA?
No. It is not EPA software, it is not endorsed or reviewed by the EPA or by anyone else, and no claim of equivalence with any EPA package is made anywhere on this site. What is published instead is the reproductions: the worked examples from the literature that the arithmetic here matches, and the test files that assert them.
How are non-detects handled?
They are carried as censored values and form a tied group with each other, which is what Gilbert’s own trace-value example and the Fort Ord appendix both describe. They are not substituted with half the detection limit and they are not dropped — either of those changes the answer, and doing it silently is the thing that makes a trend section indefensible.
Does my data get uploaded?
No. The file is read and the statistics computed in your own browser tab; there is nowhere on this site to upload anything to, and no request goes out while you work. Load the page, disconnect from the network, and it still runs.
Does it run on a Mac?
Yes, and on Linux, and on a Chromebook, and on a work laptop where you cannot install anything. It is a web page.

In short

This does not replace a decision-statistics package and does not claim to. It runs the trend methods a monitoring report needs, on any machine with a browser, with the reproductions published so a reviewer can check them.