The 1-sample Wilcoxon signed rank test is a non-parametric test that determines if data comes from a symmetric population with centre . It can be regarded as a non-parametric version of the 1-sample t-test.
If the data consists of independent and similarly distributed samples from distribution , the null hypothesis can be expressed as:
is symmetric around .
The default alternative hypothesis is two-sided and also be
set explicitly (h1 = "two"
). It can be expressed as:
is symmetric around
If the alternative hypothesis is set to "greater than" (h1 = "gt"
), it is:
is symmetric around
If the alternative hypothesis is set to "less than" (h1 = "lt"
), it is:
is symmetric around
The test statistic is the smaller of the sum of positive and negative signed ranks:
The procedure takes into consideration tied ranks.
Impure wrapper procedure for s_tst_signedrank_1s_core
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x(:) |
x vector (samples) |
||
real(kind=wp), | intent(in) | :: | mu0 |
population mean (null hypothesis expected value) |
||
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" |