I would like to perform a two-sided Mann-Kendall Test to check if I have a trend in my data. I understand that I calculate the Mann-Kendall statistic S

enter image description here


enter image description here

And the variance of S

enter image description here

Then I calculated normalized test statistic Z

enter image description here

Now here is the first thing I’m not sure about: As I understand it I could now check if |Z| > Z_alpha/2 (alpha/2 because I am performing a 2 sided test, right?) and if that is true, I can reject the null hypothesis.

Now I am using the “trend” package in R to do the calculation. There instead of selecting an alpha a p-value is calculated. As I understand it this p-value is calculated using the Z from above in the equation:

f(Z)=1/√2π e^(-Z^2/2)

Obviously there is something wrong with my thinking, because when I insert the Z I calculated I only get half the value R is calculating. I guess that has something to do with the two sided test. But what? Also I am not quite sure how to interpret the resulting p-value. I read that the higher the calculated p-value, the higher the probability that I accept the null hypothesis (that there is no evidence for a trend in my data). But for my data, if I perform a two sided test with a significance level of 95% does that mean I can reject the null hypothesis when the p-value is less than 0.05? Or can I reduce this value, because it is a two-sided test?

I am sorry if this is confusion. I tried my best to explain my thoughts.

  • $\begingroup$ You were doing great until your introduction of $f(Z),$ which appears to confuse the density of the standard Normal distribution (which you show) with its distribution function. This is basic stuff--which makes it hard to search for! You might look at threads on hypothesis testing and perhaps refine your search by including "standard normal" among the keywords. $\endgroup$ – whuber Jan 23 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.