Where n is the length of the dataset and sgn(x) is the sign function that takes the values 1 if x > 0, 0 if x = 0, and -1 if x < 0. The sequential data values at times i and j are represented by Xi and Xj, respectively. The MK test statistic z standardizes to determine whether there is a statistically significant trend in the time series data. This statistic follows the standard normal distribution, which has a mean of zero and a variance of one, and it is calculated using: