The Wilcoxon signed rank test is a non-parametric test that determines if two related paired samples come from the same distribution. It can be regarded as a non-parametric version of the paired t-test.
The Wilcoxon signed rank test is mathematically equivalent to the 1-sample Wilcoxon signed rank test conducted on the difference vector with set to zero. Consequently, the the null hypothesis can be expressed as:
Samples are symmetric around .
The default alternative hypothesis is two-sided and also be
set explicitly (h1 = "two"
). It can be expressed as:
Samples are symmetric around
If the alternative hypothesis is set to "greater than" (h1 = "gt"
), it is:
Samples are symmetric around
If the alternative hypothesis is set to "less than" (h1 = "lt"
), it is:
Samples are symmetric around
The procedure takes into consideration tied ranks.
Impure wrapper procedure for s_tst_signedrank_2s_core
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x1(:) |
sample 1 (paired data) |
||
real(kind=wp), | intent(in) | :: | x2(:) |
sample 2 (paired data) |
||
real(kind=wp), | intent(out) | :: | w |
W statistic (sum of signed ranks) |
||
real(kind=wp), | intent(out) | :: | p |
p-value |
||
character(len=*), | intent(in), | optional | :: | h1 |
: "two" (default), "lt", "gt" |