Mann-Kendall trend test

From Wikitia
Jump to navigation Jump to search

Mann-Kendall trend test is used to perceive statistically significant decreasing or increasing trend in long term temporal data. It is based on two hypothesis; one is null hypothesis( H0 ) , which specify existence of no trend and other is Alternative hypothesis (H1) , which expresses significant increasing or decreasing trend in data over a time period.[1]

Mann-Kendall trend test is non-parametric test that is this test is applicable to all types of distribution.

It can be applied on any data set containing a number of data points greater than four but sometimes with less number of samples the test has more chances of not finding a trend however having a trend if more number of data points were considered for the test. Yearly rainfall data of state Assam and Meghalaya , India.[2] This test is widely used on real word data like hydrological data, climate data, environmental data .[3]

The idea behind the test is that it looks for all possible differences between the relative magnitude of one sample to another successive sample and if differences keeps on increasing or keeps on decreasing then it signifies presence of a trend.

Mathematically this idea is expressed with Mann-Kendall statistic(S).

Initially it is assumed that there is no trend that is the value of S assumed to be equal to 0. If the value of data point at next time period is greater than the value of data points at earlier time period 1 is added to the value of S, Otherwise if it is lower than 1 is subtracted from the value of S.

Mann-Kendall statistic Khambhammettu, Prashanth (2020-11-20). ""Mann-Kendall Analysis for the Fort Ord Site", HydroGeoLogic, Inc.-OU-1 2004 Annual Groundwater Monitoring Report-Former Fort Ord, California, 2005" (PDF).</ref> ==

Mann-Kendall statistic is denoted by ‘ S ‘ and it is defined as

<math> S = \sum_{i=1}^{n-1}\sum_{j=i+1}^{n}sig( xj - xi )</math>

Where, n is total number of data points in dataset and x1, x2, x3, x4, x5, …………. xn are values of data points .

<math>sig(xj-xi)=-1,if\ xj\ <\ xi</math>

<math>sig(xj-xi)=0,if\ xj\ =\ xi</math>

<math>sig(xj-xi)=1,if\ xj\ >\ xi</math>

For there to be an increasing trend , the value of Mann-Kendall statistic (S) should have very high positive value. And for there to be a decreasing trend value of S should have Very low negative value. To statistically express the importance of trend , it is necessary to calculate probability associated with Mann-Kendall statistics.

Calculation of p-value associated with Mann-Kendall statistic(S)

Distribution of a dataset can be assumed to be a normal distribution if the number of data points in a data set is greater than 10 and the number of tied values inside the data set are less.

Variance of Mann-Kendall statistic is given as

<math> variance(s)=\frac{1}{18}\ast\left\{n\left(n-1\right)\left(2n+5\right)-\sum_{i=1}^{p}{t_i\left(t_i-1\right)\left(2t_i+5\right)}\right\}</math>


n is the total number of data points in a data set, p is the number of tied groups, a set of sample data having equal value is called tied group. And ti is the total number of data points in ith tied group.

Z- value associated with S

<math>Z=\left(S-1\right)/\sqrt{\left(VARIANCE\left(S\right)\right)}\ \ IF\ S>0</math>

<math>Z=0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ IF\ S=0</math>

<math>Z=\frac{S+1}{\sqrt{VARIANCE\left(S\right)}}\ IF\ S<0</math>

probability(p value) can be calculated using the z-table.

On the basis of 5 % significance level , if p value is less than and equal to 0.05 , then the alternate hypothesis is accepted which signifies the presence of trend and if the p value greater than 0.05 , then null hypothesis is accepted which tells absence of trend in the data.


  1. This test is not suitable for data having seasonal effects. So to make the test more effective it is recommended to remove seasonal effects before applying the test.
  2. Most of the time This test gives negative results for time series having fewer number of data points.


  1. Stephanie (2016-08-22). "Mann Kendall Trend Test: Definition, Running the Test". Statistics How To. Retrieved 2020-11-20.
  2. "5) Rainfall in India , Sub Divisional Monthly Rainfall From 1901 to 2017". open government data (OGD) platform India. 2020-11-20.
  3. Alemu, Zinabu Assefa; Dioha, Michael O. (2020-10-10). "Climate change and trend analysis of temperature: the case of Addis Ababa, Ethiopia". Environmental Systems Research. 9 (1): 27. doi:10.1186/s40068-020-00190-5222233728. ISSN 2193-2697.
  4. "Mann-Kendall Test (mkt) — Mann-Kendall Test 1.0.1 documentation". Retrieved 2020-11-20.

External links

Add External links

This article "Mann-Kendall trend test" is from Wikipedia. The list of its authors can be seen in its historical. Articles taken from Draft Namespace on Wikipedia could be accessed on Wikipedia's Draft Namespace.