8.1 The Mann–Kendall Test
Let \(x_1, x_2, \ldots , x_n\) be observations in time order. Compare every pair and count how often the later value exceeds the earlier one.
\[S = \sum ^{n-1}_{i=1}\sum ^{n}_{j=i+1}\operatorname {sgn}\left (x_j - x_i\right ), \hspace {0.8cm} \operatorname {sgn}(u) = \begin {cases} +1 & u > 0,\\ \ 0 & u = 0,\\ -1 & u < 0. \end {cases}\]
A large positive \(S\) says later observations tend to exceed earlier ones: an upward trend. A large negative \(S\) says the reverse. Under \[H_0: \text {the observations are independent and identically distributed}\] every ordering of the data is equally likely, so \(S\) is symmetric about zero and \(E(S) = 0\).
Notice what \(S\) does not use: the sizes of the differences, only their signs. This is exactly why an outlier cannot drag the result — one absurd value contributes at most \(n-1\) to a sum that ranges over \(\binom {n}{2}\) pairs, whereas in least squares it would move the fitted slope by an unbounded amount.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.