*2.4. Mann–Kendall Test*

It is always useful to assess the monotonic trends in a time series of any geophysical data. In this study, the Mann–Kendall test [45–47] was used. This is a non-parametric rank-based test method, which is commonly used to identify monotonic trends in a time series of climate data, environmental data, or hydrological data. Non-parametric methods are known to be resilient to outliers [48], hence it is desirable to choose such methods. Based on a study by Kendall [47] and recently by Pohlert [49] and others, the Mann–Kendall test statistic is calculated from the following formula:

$$S = \sum\_{k=1}^{n-1} \sum\_{j=k+1}^{n} \text{sign}\left(X\_j - X\_k\right) \tag{5}$$

where

*Climate* **2018**, *6*, 95

$$sign(\mathbf{x}) = \begin{cases} +1, & \text{if } \mathbf{x} > 1 \\ 0, & \text{if } \mathbf{x} = 0 \\ -1, & \text{if } \mathbf{x} < 1 \end{cases} \tag{6}$$

The average value of *S* is *E[S] =* 0, and the variance *σ<sup>2</sup>* is given by the following equation:

$$
\sigma^2 = \left\{ n(n-1)(2n+5) - \sum\_{j=1}^{p} t\_j(t\_j - 1) \left( 2t\_j + 5 \right) \right\} / 18 \tag{7}
$$

where *tj* is the number of data points in the *j*th tied group, and *p* is the number of the tied group in the time series. It is important to mention that the summation operator in the above equation is applied only in the case of tied groups in the time series in order to reduce the influence of individual values in tied groups in the ranked statistics. On the assumption of random and independent time series, the statistic *S* is approximately normally distributed provided that the following z-transformation equation is used:

$$z = \begin{cases} \frac{S - 1}{\sigma} & \text{if } S > 1 \\ 0 & \text{if } S = 0 \\ \frac{S + 1}{\sigma} & \text{if } S < 1 \end{cases} \tag{8}$$

The value of the *S* statistic is associated with the Kendall

$$
\tau = \frac{S}{D} \tag{9}
$$

where

$$D = \left[\frac{1}{2}n(n-1) - \frac{1}{2}\sum\_{j=1}^{p} t\_j(t\_j - 1)\right]^{1/2} \left[\frac{1}{2}n(n-1)\right]^{1/2} \tag{10}$$

In regards to the z-transformation equation defined above, this study considered a 5% confidence level, where the null hypothesis of no trend was rejected if |*z*| > 1.96. Another important output of the Mann–Kendall statistic is the Kendall *τ* term, which is a measure of correlation which indicates the strength of the relationship between any two independent variables. In this study, the Mann–Kendall test system summarized above was applied to the NDVI data by writing a piece of code in R-project and following the instructions by Pohlert [49].

The Mann–Kendall trend method can be extended into a sequential version of the Mann–Kendall test statistic which is called the Sequential Mann–Kendall (SQ-MK). This method was proposed by Reference [50], and it is used to detect approximate potential trends turning points in long-term time series. This test method generates two time series, a forward/progressive one (*u*(*t*)) and a backward/retrograde one (*u* (*t*)). In order to utilize the effectiveness of this trend detection method, it is required that both the progressive and the retrograde time series are plotted in the same figure. If they happen to cross each other and diverge beyond the specific threshold (±1.96 in this study), then there is a statistically significant trend. The region where they cross each other indicates the time period where the trend turning point begins [51]. Basically, this method is computed by using ranked values of *yi* of a given time series (*x*1, *x*2, *x*3, ... , *xn*) in the analyses. The magnitudes of *yi*, (*i* = 1, 2, 3, ... ,*n*) are compared with *yi*, (*j* = 1, 2, 3, ... , *j* − 1). At each comparison, the number of cases where *yi* > *yj* are counted and then donated to *ni*. The statistic *ti* is thereafter defined by the following equation:

$$t\_i = \sum\_{j=1}^{i} n\_i$$

The mean and variance of the statistic *ti* are given by

*<sup>E</sup>*(*ti*) <sup>=</sup> *<sup>i</sup>*(*<sup>i</sup>* <sup>−</sup> <sup>1</sup>) 4

and

$$\text{Var}(t\_i) = \frac{i(i-1)(2i-5)}{72}$$

Finally, the sequential values of statistic *u*(*ti*) which are standardized are calculated using the following equation:

$$u(t\_i) = \frac{t\_i - E(t\_i)}{\sqrt{\text{Var}(t\_i)}}$$

The above equation gives a forward sequential statistic which is normally called the progressive statistic. In order to calculate the backward/retrograde statistic values (*u* (*ti*)), the same time series (*x*1, *x*2, *x*3, ... , *xn*) is used, but statistic values are computed by starting from the end of the time series. The combination of the forward and backward sequential statistic allows for the detection of the approximate beginning of a developing trend. Additionally, in this study, a 95% confidence level was considered, which means critical limit values are ±1.96. This method has been successfully utilized in studies of trends detection in temperature [52,53] and precipitation [51,53,54].
