EnviroAutomate
← All validation

Trend Analysis validation

Free Mann-Kendall and Seasonal Mann-Kendall trend tests with Theil-Sen slope estimation for groundwater monitoring time series.

Scenarios
16
Values agreeing
318
Values differing
2
Validated against
R EnvStats / nortest, GWSDAT, USEPA ProUCL, pymannkendall

Open Trend Analysis

Configured for this tool but not run in this pass: GSI Mann-Kendall Toolkit (not included in this comparison run)

Four reference implementations are compared: R EnvStats, GWSDAT, USEPA ProUCL and the GSI Mann-Kendall Toolkit. They agree on the Mann-Kendall statistic, its variance, z and p across all scenarios, including tied data, seasonal data and the smallest and largest series the tools accept. The GSI Confidence Factor comparison identified a defect in this toolkit: where repeated results place Kendall's S between two values covered by the exact probability table, it read the adjacent table entry. It now interpolates between the two, matching the GSI Toolkit including on the worked example in GSI's documentation.

Scenarios

Every result identical - S = 0 and var(S) fully tie-corrected

Boundary case

Input

8 points

xvalue
15
25
35
45
55
65
75
85

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s000exact matchAgree
Variance of S varS000within 1e-9 relativeAgree
Standard normal z zNaN0-within 0.000001 relativeDiffers
Why these differ: With no variation at all the Mann-Kendall variance is zero, so z is 0/0 and the test is formally undefined. The four engines split: this toolkit reports z = 0 and p = 1; GWSDAT's Kendall routine also returns p = 1, while raising its own internal fault code for the degenerate input; R's EnvStats returns NaN; ProUCL returns no statistic at all. So a third package agrees with the number reported here, and the two that decline are declining rather than disagreeing. S and the variance - the quantities that are actually defined for a flat record - agree exactly across all four.
p-value pValueNaN1-within 1e-9Differs
Why these differ: Same reason as z. Reporting p = 1 says 'no evidence of a trend', which is the honest reading of a series that never moves, and GWSDAT reports the same. The result carries a note saying the test is undefined here, so the number is a stated convention rather than a silent one.
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Intercept intercept550within 0.000001 relativeAgree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s000exact matchAgree
Variance of S varS000within 0.000001 relativeAgree
p-value pValue110within 0.00001 relative, or 1e-12 absoluteAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s000exact matchAgree
Variance of S varS000within 1e-9 relativeAgree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s000exact matchAgree
Variance of S varS000within 1e-9 relativeAgree
Standard normal z z000within 0.000001 relativeAgree
p-value pValue110within 1e-9Agree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Trend direction directionNo trendNo trend-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Monthly data, twelve seasons over three years

Typical use

Input

36 points

xvalueseason
1120
2111
3132
4103
594
685
776
867
988
1099
111110
121211
13110
14101
15122
1693
1784
1875
1966
2057
2178
2289
231010
241111
25100
2691
27112
2883
2974
3065
3156
3247
3368
3479
35910
361011

Settings: seasonPeriod = 12

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n36360exact matchAgree
Mann-Kendall S s-36-360exact matchAgree
Variance of S varS43.9999999999999943.999999999999990within 1e-9 relativeAgree
Standard normal z z-5.276448530110864-5.2764485301108640within 0.000001 relativeAgree
p-value pValue1.31711483891223e-71.31711483941643e-75.04e-17within 1e-9Agree
season.0.s season.0.s-3-30within 0.000001 relativeAgree
season.0.varS season.0.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.1.s season.1.s-3-30within 0.000001 relativeAgree
season.1.varS season.1.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.2.s season.2.s-3-30within 0.000001 relativeAgree
season.2.varS season.2.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.3.s season.3.s-3-30within 0.000001 relativeAgree
season.3.varS season.3.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.4.s season.4.s-3-30within 0.000001 relativeAgree
season.4.varS season.4.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.5.s season.5.s-3-30within 0.000001 relativeAgree
season.5.varS season.5.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.6.s season.6.s-3-30within 0.000001 relativeAgree
season.6.varS season.6.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.7.s season.7.s-3-30within 0.000001 relativeAgree
season.7.varS season.7.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.8.s season.8.s-3-30within 0.000001 relativeAgree
season.8.varS season.8.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.9.s season.9.s-3-30within 0.000001 relativeAgree
season.9.varS season.9.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.10.s season.10.s-3-30within 0.000001 relativeAgree
season.10.varS season.10.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
season.11.s season.11.s-3-30within 0.000001 relativeAgree
season.11.varS season.11.varS3.66666666666666653.66666666666666650within 0.000001 relativeAgree
Theil-Sen slope theilSenSlope-0.08333333333333333-0.083333333333333330within 0.000001 relativeAgree

Not run for this scenario

  • USEPA ProUCL - ProUCL does not implement the seasonal Mann-Kendall test, so these scenarios are compared against R EnvStats, which does.
  • GWSDAT - GWSDAT has no seasonal Mann-Kendall; nothing to compare

Quarterly data with a clear decline

Typical use

Input

16 points

xvalueseason
1100
2141
392
463
5110
6151
7102
873
990
10131
1182
1253
1380
14121
1572
1643

Settings: seasonPeriod = 4

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n16160exact matchAgree
Mann-Kendall S s-16-160exact matchAgree
Variance of S varS34.66666666666666434.6666666666666640within 1e-9 relativeAgree
Standard normal z z-2.5476233268253408-2.54762332682534080within 0.000001 relativeAgree
p-value pValue0.0108459509170604480.010845950916601014.59e-13within 1e-9Agree
season.0.s season.0.s-4-40within 0.000001 relativeAgree
season.0.varS season.0.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
season.1.s season.1.s-4-40within 0.000001 relativeAgree
season.1.varS season.1.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
season.2.s season.2.s-4-40within 0.000001 relativeAgree
season.2.varS season.2.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
season.3.s season.3.s-4-40within 0.000001 relativeAgree
season.3.varS season.3.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
Theil-Sen slope theilSenSlope-0.20833333333333331-0.208333333333333310within 0.000001 relativeAgree

Not run for this scenario

  • USEPA ProUCL - ProUCL does not implement the seasonal Mann-Kendall test, so these scenarios are compared against R EnvStats, which does.
  • GWSDAT - GWSDAT has no seasonal Mann-Kendall; nothing to compare

Six quarterly results with a clear downward trend

Typical use

Input

6 points

xvalue
110
29
37
48
55
64

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n660exact matchAgree
Mann-Kendall S s-13-130exact matchAgree
Variance of S varS28.33333333333333228.3333333333333320within 1e-9 relativeAgree
Standard normal z z-2.2544074479065386-2.25440744790653860within 0.000001 relativeAgree
p-value pValue0.0241705471745452470.0241705471734954271.05e-12within 1e-9Agree
Theil-Sen slope theilSenSlope-1.2-1.20within 0.000001 relativeAgree
Intercept intercept11.711.70within 0.000001 relativeAgree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n660exact matchAgree
Mann-Kendall S s-13-130exact matchAgree
Variance of S varS28.3333339691162128.3333333333333326.36e-7within 0.000001 relativeAgree
p-value pValue0.024170551449060440.0241705471734954274.28e-9within 0.00001 relative, or 1e-12 absoluteAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n660exact matchAgree
Mann-Kendall S s-13-130exact matchAgree
Variance of S varS28.3333333333333328.3333333333333323.55e-15within 1e-9 relativeAgree
Standard normal z z-2.2544074479065386-2.25440744790653860within 0.000001 relativeAgree
p-value pValue0.0241705471744548050.0241705471734954279.59e-13within 1e-9Agree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n660exact matchAgree
Mann-Kendall S s-13-130exact matchAgree
Variance of S varS28.33333333333333228.3333333333333320within 1e-9 relativeAgree
Standard normal z z-2.2544074479065386-2.25440744790653860within 0.000001 relativeAgree
p-value pValue0.0241705471745452540.0241705471734954271.05e-12within 1e-9Agree
Theil-Sen slope theilSenSlope-1.2-1.20within 0.000001 relativeAgree
Trend direction directionDecreasingDecreasing-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

GSI's own published benzene example

Special case

Input

7 points

xvalue
12190
2384
3357
419
51
61
71

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n770exact matchAgree
Mann-Kendall S s-18-180exact matchAgree
Variance of S varS40.66666666666666440.6666666666666640within 1e-9 relativeAgree
Standard normal z z-2.665812704795515-2.6658127047955150within 0.000001 relativeAgree
p-value pValue0.0076802467861594270.0076802467858367863.23e-13within 1e-9Agree
Theil-Sen slope theilSenSlope-118.66666666666667-118.666666666666670within 0.000001 relativeAgree
Intercept intercept493.6666666666667493.66666666666670within 0.000001 relativeAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n770exact matchAgree
Mann-Kendall S s-18-180exact matchAgree
Variance of S varS40.66666666666666440.6666666666666640within 1e-9 relativeAgree
Standard normal z z-2.665812704795515-2.6658127047955150within 0.000001 relativeAgree
p-value pValue0.0076802467858614190.0076802467858367862.46e-14within 1e-9Agree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n770exact matchAgree
Mann-Kendall S s-18-180exact matchAgree
Variance of S varS40.6666679382324240.6666666666666641.27e-6within 0.000001 relativeAgree
p-value pValue0.0076802470721304420.0076802467858367862.86e-10within 0.00001 relative, or 1e-12 absoluteAgree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n770exact matchAgree
Mann-Kendall S s-18-180exact matchAgree
Variance of S varS40.66666666666666440.6666666666666640within 1e-9 relativeAgree
Standard normal z z-2.665812704795515-2.6658127047955150within 0.000001 relativeAgree
p-value pValue0.0076802467861594170.0076802467858367863.23e-13within 1e-9Agree
Theil-Sen slope theilSenSlope-118.66666666666667-118.666666666666670within 0.000001 relativeAgree
Trend direction directionDecreasingDecreasing-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

A strong seasonal cycle with no underlying trend

Boundary case

Input

16 points

xvalueseason
150
2201
3122
433
560
6191
7132
823
940
10211
11112
1243
1360
14191
15122
1633

Settings: seasonPeriod = 4

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n16160exact matchAgree
Mann-Kendall S s000exact matchAgree
Variance of S varS30.66666666666666830.6666666666666680within 1e-9 relativeAgree
Standard normal z z000within 0.000001 relativeAgree
p-value pValue110within 1e-9Agree
season.0.s season.0.s110within 0.000001 relativeAgree
season.0.varS season.0.varS7.6666666666666677.6666666666666670within 0.000001 relativeAgree
season.1.s season.1.s-1-10within 0.000001 relativeAgree
season.1.varS season.1.varS7.6666666666666677.6666666666666670within 0.000001 relativeAgree
season.2.s season.2.s-1-10within 0.000001 relativeAgree
season.2.varS season.2.varS7.6666666666666677.6666666666666670within 0.000001 relativeAgree
season.3.s season.3.s110within 0.000001 relativeAgree
season.3.varS season.3.varS7.6666666666666677.6666666666666670within 0.000001 relativeAgree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree

Not run for this scenario

  • USEPA ProUCL - ProUCL does not implement the seasonal Mann-Kendall test, so these scenarios are compared against R EnvStats, which does.
  • GWSDAT - GWSDAT has no seasonal Mann-Kendall; nothing to compare

Forty sampling events - the last size the GSI workbook accepts

Boundary case

Input

40 points

xvalue
120.8
219.3
319
419.9
518.4
618.1
719
817.5
917.2
1018.1
1116.6
1216.3
1317.2
1415.7
1515.4
1616.3
1714.8
1814.5
1915.4
2013.9
2113.6
2214.5
2313
2412.7
2513.6
2612.1
2711.8
2812.7
2911.2
3010.9
3111.8
3210.3
3310
3410.9
359.4
369.1
3710
388.5
398.2
409.1

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n40400exact matchAgree
Mann-Kendall S s-716-7160exact matchAgree
Variance of S varS7354.6666666666677354.6666666666670within 1e-9 relativeAgree
Standard normal z z-8.337283025803837-8.3372830258038370within 0.000001 relativeAgree
p-value pValue7.60169612913962e-1707.60e-17within 1e-9Agree
Theil-Sen slope theilSenSlope-0.3-0.30within 0.000001 relativeAgree
Intercept intercept20.34999999999999820.3499999999999980within 0.000001 relativeAgree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n40400exact matchAgree
Mann-Kendall S s-716-7160exact matchAgree
Variance of S varS7354.666503906257354.6666666666670.000163within 0.000001 relativeAgree
p-value pValue7.60168130326596e-1707.60e-17within 0.00001 relative, or 1e-12 absoluteAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n40400exact matchAgree
Mann-Kendall S s-716-7160exact matchAgree
Variance of S varS7354.6666666666687354.6666666666679.09e-13within 1e-9 relativeAgree
Standard normal z z-8.337283025803837-8.3372830258038370within 0.000001 relativeAgree
p-value pValue7.60169612933010e-1707.60e-17within 1e-9Agree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n40400exact matchAgree
Mann-Kendall S s-716-7160exact matchAgree
Variance of S varS7354.6666666666677354.6666666666670within 1e-9 relativeAgree
Standard normal z z-8.337283025803837-8.3372830258038370within 0.000001 relativeAgree
p-value pValue000within 1e-9Agree
Theil-Sen slope theilSenSlope-0.3-0.30within 0.000001 relativeAgree
Trend direction directionDecreasingDecreasing-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Forty-one sampling events - one past the GSI workbook's capacity

Boundary case

Input

41 points

xvalue
120.8
219.3
319
419.9
518.4
618.1
719
817.5
917.2
1018.1
1116.6
1216.3
1317.2
1415.7
1515.4
1616.3
1714.8
1814.5
1915.4
2013.9
2113.6
2214.5
2313
2412.7
2513.6
2612.1
2711.8
2812.7
2911.2
3010.9
3111.8
3210.3
3310
3410.9
359.4
369.1
3710
388.5
398.2
409.1
417.6

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n41410exact matchAgree
Mann-Kendall S s-756-7560exact matchAgree
Variance of S varS7914.6666666666677914.6666666666670within 1e-9 relativeAgree
Standard normal z z-8.486539504580369-8.4865395045803690within 0.000001 relativeAgree
p-value pValue2.12881316104394e-1702.13e-17within 1e-9Agree
Theil-Sen slope theilSenSlope-0.3-0.30within 0.000001 relativeAgree
Intercept intercept20.220.20within 0.000001 relativeAgree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n41410exact matchAgree
Mann-Kendall S s-756-7560exact matchAgree
Variance of S varS7914.666503906257914.6666666666670.000163within 0.000001 relativeAgree
p-value pValue2.12881117951504e-1702.13e-17within 0.00001 relative, or 1e-12 absoluteAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n41410exact matchAgree
Mann-Kendall S s-756-7560exact matchAgree
Variance of S varS7914.6666666666677914.6666666666670within 1e-9 relativeAgree
Standard normal z z-8.486539504580369-8.4865395045803690within 0.000001 relativeAgree
p-value pValue2.1288131610894e-1702.13e-17within 1e-9Agree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n41410exact matchAgree
Mann-Kendall S s-756-7560exact matchAgree
Variance of S varS7914.6666666666677914.6666666666670within 1e-9 relativeAgree
Standard normal z z-8.486539504580369-8.4865395045803690within 0.000001 relativeAgree
p-value pValue000within 1e-9Agree
Theil-Sen slope theilSenSlope-0.3-0.30within 0.000001 relativeAgree
Trend direction directionDecreasingDecreasing-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Four points - the smallest series the toolkit will test

Boundary case

Input

4 points

xvalue
112
29.5
38.1
46

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n440exact matchAgree
Mann-Kendall S s-6-60exact matchAgree
Variance of S varS8.6666666666666668.6666666666666660within 1e-9 relativeAgree
Standard normal z z-1.6984155512168937-1.69841555121689370within 0.000001 relativeAgree
p-value pValue0.089429359028993540.089429359032738633.75e-12within 1e-9Agree
Theil-Sen slope theilSenSlope-1.975-1.9750within 0.000001 relativeAgree
Intercept intercept13.737513.73750within 0.000001 relativeAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n440exact matchAgree
Mann-Kendall S s-6-60exact matchAgree
Variance of S varS8.6666666666666668.6666666666666660within 1e-9 relativeAgree
Standard normal z z-1.6984155512168937-1.69841555121689370within 0.000001 relativeAgree
p-value pValue0.089429359027674970.089429359032738635.06e-12within 1e-9Agree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n440exact matchAgree
Mann-Kendall S s-6-60exact matchAgree
Variance of S varS8.6666666666666668.6666666666666660within 1e-9 relativeAgree
Standard normal z z-1.6984155512168937-1.69841555121689370within 0.000001 relativeAgree
p-value pValue0.089429359028993630.089429359032738633.75e-12within 1e-9Agree
Theil-Sen slope theilSenSlope-1.975-1.9750within 0.000001 relativeAgree
Trend direction directionNo trendNo trend-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Heavy ties around a weak rising trend

Boundary case

Input

8 points

xvalue
13
23
33
43
52
64
73
85

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s880exact matchAgree
Variance of S varS48.66666666666666448.6666666666666640within 1e-9 relativeAgree
Standard normal z z1.00341881339174281.00341881339174280within 0.000001 relativeAgree
p-value pValue0.31565883057340860.315658830600423552.70e-11within 1e-9Agree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Intercept intercept330within 0.000001 relativeAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s880exact matchAgree
Variance of S varS48.6666666666666748.6666666666666647.11e-15within 1e-9 relativeAgree
Standard normal z z1.0034188133917431.00341881339174282.22e-16within 0.000001 relativeAgree
p-value pValue0.3156588305669050.315658830600423553.35e-11within 1e-9Agree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s880exact matchAgree
Variance of S varS48.6666679382324248.6666666666666641.27e-6within 0.000001 relativeAgree
p-value pValue0.31565880775451660.315658830600423552.28e-8within 0.00001 relative, or 1e-12 absoluteAgree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s880exact matchAgree
Variance of S varS48.66666666666666448.6666666666666640within 1e-9 relativeAgree
Standard normal z z1.00341881339174281.00341881339174280within 0.000001 relativeAgree
p-value pValue0.31565883057340870.315658830600423552.70e-11within 1e-9Agree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Trend direction directionNo trendNo trend-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Repeated values exercise the tie correction in var(S)

Boundary case

Input

8 points

xvalue
15
25
35
47
57
69
79
812

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s23230exact matchAgree
Variance of S varS59.66666666666666459.6666666666666640within 1e-9 relativeAgree
Standard normal z z2.84811022321388042.84811022321388040within 0.000001 relativeAgree
p-value pValue0.0043979689615242680.0043979689613415921.83e-13within 1e-9Agree
Theil-Sen slope theilSenSlope110within 0.000001 relativeAgree
Intercept intercept2.52.50within 0.000001 relativeAgree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s23230exact matchAgree
Variance of S varS59.6666679382324259.6666666666666641.27e-6within 0.000001 relativeAgree
p-value pValue0.0043979883193969730.0043979689613415921.94e-8within 0.00001 relative, or 1e-12 absoluteAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s23230exact matchAgree
Variance of S varS59.66666666666666459.6666666666666640within 1e-9 relativeAgree
Standard normal z z2.84811022321388042.84811022321388040within 0.000001 relativeAgree
p-value pValue0.0043979689614244140.0043979689613415928.28e-14within 1e-9Agree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s23230exact matchAgree
Variance of S varS59.66666666666666459.6666666666666640within 1e-9 relativeAgree
Standard normal z z2.84811022321388042.84811022321388040within 0.000001 relativeAgree
p-value pValue0.004397968961524330.0043979689613415921.83e-13within 1e-9Agree
Theil-Sen slope theilSenSlope110within 0.000001 relativeAgree
Trend direction directionIncreasingIncreasing-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Seasons that trend in opposite directions

Boundary case

Input

16 points

xvalueseason
1100
2101
3102
4103
5110
691
7112
893
9120
1081
11122
1283
13130
1471
15132
1673

Settings: seasonPeriod = 4

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n16160exact matchAgree
Mann-Kendall S s000exact matchAgree
Variance of S varS34.66666666666666434.6666666666666640within 1e-9 relativeAgree
Standard normal z z000within 0.000001 relativeAgree
p-value pValue110within 1e-9Agree
season.0.s season.0.s660within 0.000001 relativeAgree
season.0.varS season.0.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
season.1.s season.1.s-6-60within 0.000001 relativeAgree
season.1.varS season.1.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
season.2.s season.2.s660within 0.000001 relativeAgree
season.2.varS season.2.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
season.3.s season.3.s-6-60within 0.000001 relativeAgree
season.3.varS season.3.varS8.6666666666666668.6666666666666660within 0.000001 relativeAgree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree

Not run for this scenario

  • USEPA ProUCL - ProUCL does not implement the seasonal Mann-Kendall test, so these scenarios are compared against R EnvStats, which does.
  • GWSDAT - GWSDAT has no seasonal Mann-Kendall; nothing to compare

The same question at ten results

Boundary case

Input

10 points

xvalue
11
25
32
45
55
65
71
85
95
105

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n10100exact matchAgree
Mann-Kendall S s11110exact matchAgree
Variance of S varS79.6666666666666779.666666666666670within 1e-9 relativeAgree
Standard normal z z1.12037053045990681.12037053045990680within 0.000001 relativeAgree
p-value pValue0.262555897629856260.26255589764267871.28e-11within 1e-9Agree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Intercept intercept550within 0.000001 relativeAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n10100exact matchAgree
Mann-Kendall S s11110exact matchAgree
Variance of S varS79.6666666666666679.666666666666671.42e-14within 1e-9 relativeAgree
Standard normal z z1.12037053045990681.12037053045990680within 0.000001 relativeAgree
p-value pValue0.26255589762419220.26255589764267871.85e-11within 1e-9Agree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n10100exact matchAgree
Mann-Kendall S s11110exact matchAgree
Variance of S varS79.6666641235351679.666666666666672.54e-6within 0.000001 relativeAgree
p-value pValue0.26255583763122560.26255589764267876.00e-8within 0.00001 relative, or 1e-12 absoluteAgree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n10100exact matchAgree
Mann-Kendall S s11110exact matchAgree
Variance of S varS79.6666666666666779.666666666666670within 1e-9 relativeAgree
Standard normal z z1.12037053045990681.12037053045990680within 0.000001 relativeAgree
p-value pValue0.26255589762985610.26255589764267871.28e-11within 1e-9Agree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Trend direction directionNo trendNo trend-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Ties inside every season

Boundary case

Input

16 points

xvalueseason
190
291
352
453
590
671
752
833
970
1071
1132
1233
1370
1451
1532
1613

Settings: seasonPeriod = 4

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n16160exact matchAgree
Mann-Kendall S s-18-180exact matchAgree
Variance of S varS28.66666666666666828.6666666666666680within 1e-9 relativeAgree
Standard normal z z-3.175121312459921-3.1751213124599210within 0.000001 relativeAgree
p-value pValue0.001497738713350810.001497738713289516.13e-14within 1e-9Agree
season.0.s season.0.s-4-40within 0.000001 relativeAgree
season.0.varS season.0.varS6.6666666666666676.6666666666666670within 0.000001 relativeAgree
season.1.s season.1.s-5-50within 0.000001 relativeAgree
season.1.varS season.1.varS7.6666666666666677.6666666666666670within 0.000001 relativeAgree
season.2.s season.2.s-4-40within 0.000001 relativeAgree
season.2.varS season.2.varS6.6666666666666676.6666666666666670within 0.000001 relativeAgree
season.3.s season.3.s-5-50within 0.000001 relativeAgree
season.3.varS season.3.varS7.6666666666666677.6666666666666670within 0.000001 relativeAgree
Theil-Sen slope theilSenSlope-0.25-0.250within 0.000001 relativeAgree

Not run for this scenario

  • USEPA ProUCL - ProUCL does not implement the seasonal Mann-Kendall test, so these scenarios are compared against R EnvStats, which does.
  • GWSDAT - GWSDAT has no seasonal Mann-Kendall; nothing to compare

Ties producing a Kendall S the untied distribution cannot reach

Boundary case

Input

8 points

xvalue
12
24
33
43
53
63
73
83

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s110exact matchAgree
Variance of S varS37370within 1e-9 relativeAgree
Standard normal z z000within 0.000001 relativeAgree
p-value pValue110within 1e-9Agree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Intercept intercept330within 0.000001 relativeAgree

Against USEPA ProUCL (ProUCL 5.2.0)

ValueUSEPA ProUCLEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s110exact matchAgree
Variance of S varS36.99999999999999377.11e-15within 1e-9 relativeAgree
Standard normal z z000within 0.000001 relativeAgree
p-value pValue110within 1e-9Agree

Against GWSDAT (GWSDAT 3.3.0, R 4.6.1)

ValueGWSDATEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s110exact matchAgree
Variance of S varS37370within 0.000001 relativeAgree
p-value pValue110within 0.00001 relative, or 1e-12 absoluteAgree

Against pymannkendall (pymannkendall 1.4.3)

ValuepymannkendallEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n880exact matchAgree
Mann-Kendall S s110exact matchAgree
Variance of S varS37370within 1e-9 relativeAgree
Standard normal z z000within 0.000001 relativeAgree
p-value pValue110within 1e-9Agree
Theil-Sen slope theilSenSlope000within 0.000001 relativeAgree
Trend direction directionNo trendNo trend-exact matchAgree

Not run for this scenario

  • GSI Mann-Kendall Toolkit - not included in this comparison run

Two seasons, the fewest the test allows

Boundary case

Input

10 points

xvalueseason
180
2141
370
4131
560
6121
750
8111
940
10101

Settings: seasonPeriod = 2

Against R EnvStats / nortest (EnvStats 3.1.0, nortest 1.0-4, R 4.6.1)

ValueR EnvStats / nortestEnviroAutomateDifferenceAgreement bandVerdict
Sample size (n) n10100exact matchAgree
Mann-Kendall S s-20-200exact matchAgree
Variance of S varS33.33333333333333633.3333333333333360within 1e-9 relativeAgree
Standard normal z z-3.2908965343808667-3.29089653438086670within 0.000001 relativeAgree
p-value pValue0.0009986863791802590.000998686379262378.21e-14within 1e-9Agree
season.0.s season.0.s-10-100within 0.000001 relativeAgree
season.0.varS season.0.varS16.66666666666666816.6666666666666680within 0.000001 relativeAgree
season.1.s season.1.s-10-100within 0.000001 relativeAgree
season.1.varS season.1.varS16.66666666666666816.6666666666666680within 0.000001 relativeAgree
Theil-Sen slope theilSenSlope-0.5-0.50within 0.000001 relativeAgree

Not run for this scenario

  • USEPA ProUCL - ProUCL does not implement the seasonal Mann-Kendall test, so these scenarios are compared against R EnvStats, which does.
  • GWSDAT - GWSDAT has no seasonal Mann-Kendall; nothing to compare

Evidence generated 2026-08-26 from a full comparison run against the versions named above.