*2.3. Mann–Kendall Test*

The Mann–Kendall test [71,72] is a non-parametric statistical method used to determine whether a time series has a monotonic upward or a downward trend. It is a rank-based procedure that is particularly suitable for data with abnormal distribution that contain outliers and non-linear trends [73].

The Mann–Kendall *S* statistic is described with the Formula (2):

$$S = \sum\_{k=1}^{n-1} \sum\_{j=k+1}^{n} \text{sgn}(\mathbf{x}\_j - \mathbf{x}\_k) \tag{2}$$

$$\operatorname{sgn}(\mathbf{x}\_{j} - \mathbf{x}\_{k}) = \begin{cases} +1 \operatorname{if} \begin{pmatrix} \mathbf{x}\_{j} - \mathbf{x}\_{k} \end{pmatrix} > 0 \\\ 0 \operatorname{if} \begin{pmatrix} \mathbf{x}\_{j} - \mathbf{x}\_{k} \end{pmatrix} = 0 \\\ -1 \operatorname{if} \begin{pmatrix} \mathbf{x}\_{j} - \mathbf{x}\_{k} \end{pmatrix} < 0 \end{cases} \tag{3}$$

where:

*xj* and *xk*—values of the variable in individual years *j* and *k*, where *j* > *k*, *n*—the series count (number of years).

Positive "*S*" values represent an upward trend, while negative values indicate a downward one. The calculation of "*sgn* (*xj* − *xk*)" is done via Equation (3).

The *S* statistic shows a tendency to quickly move towards normality, and for *n* > 10 this statistic has an approximately normal distribution with the mean of 0 and the variance described by the Formula (4):

$$Var(S) = \left[ n(n-1)(2n+5) \right]/18 \tag{4}$$

The normalized *Z* test statistic is determined by the Formula (5):

$$Z = \begin{cases} \frac{S - 1}{\sqrt{Var(S)}} \text{ if } S > 0\\ 0 \text{ if } S = 0\\ \frac{S + 1}{\sqrt{Var(S)}} \text{ if } S < 0 \end{cases} \tag{5}$$

In the Mann–Kendall test, the null hypothesis is that there is no significant trend in the data series. The trend is significant if the null hypothesis cannot be accepted. The acceptance region at the significance level of α = 0.05 is defined by the range of −1.96 ≤ *Z* ≤ 1.96 (no significant trend), while the rejection region was determined by *Z* < −1.96 (significant downward trend) and *Z* > 1.96 (significant upward trend), where *Z* is the normalized test statistic [47].

The non-parametric Mann–Kendall test is commonly used to quantify trends in hydrometeorological time series [74,75], despite some limitations [76–79].

#### *2.4. Sen's Slope*

The Mann–Kendall test is an effective method of identifying trends in a time series, but does not indicate the magnitude of the trends. The test might be supplemented with a non-parametric Sen's method. In order to estimate the actual slope of the existing trend, the non-parametric Sen's method was used [80]. The main advantage of the Sen's slope estimator is its resistance to the presence of extreme values [81].

The slope *β* expressed by the Theil–Sen estimator (*β*) is described by the Formula (6):

$$\beta = \operatorname{Median}\left(\left(\mathbf{x}\_{j} - \mathbf{x}\_{k}\right) / \left(j - k\right)\right) \tag{6}$$

A positive value of *β* indicates an upward (increasing) trend, and a negative value indicates a downward (decreasing) trend in the time series.

The Mann–Kendall test and Theil–Sen estimator were performed by means of a RStudio [82] with packages: "readxl" [83] and "trend" [84]. Information about what equations are used in the "trend" package for Mann–Kendall test and Theil–Sen estimator is available at [85].

QGIS ver. 3.10.9 and QGIS ver. 3.10.9 with GRASS ver. 7.8.3. were used in the study. Additionally, GIMP ver. 2.10.18 and Inkscape ver. 1.0.1 were used as graphic tools. In preparation of the Figure 3 the Inverse Distance Weighting (IDW) interpolation was used.

**Figure 3.** Spatial distribution of the number of months with SPI ≤ −1.0 in the period of 1981–2016. Source: (**a**–**e**) own elaboration made with [52], Table 4, Tables 6 and 7. Location of the stations based on [55,56] and Table 1. Meteorological station Izbica Kujawska is out of catchment area according to coordinates from Table 1. Location of the hydrological station Pako´s´c is determined by cartographic issues. Maps elaborated in the coordinate system: WGS 84/UTM zone 34N.


**Table 4.** Meteorological drought parameters (SPI) in different time scales in the period of 1981–2016.
