Statistics Toolbox | ![]() ![]() |
Wilcoxon rank sum test that two populations are identical
Syntax
Description
returns the significance probability that the populations generating two independent samples, p = ranksum(x,y,alpha)
x
and y
, are identical. x
and y
are both vectors, but can have different lengths. alpha
is the desired level of significance and must be a scalar between zero and one.
also returns the result of the hypothesis test, [p,h] = ranksum(x,y,alpha)
h
. h
is zero if the populations of x
and y
are not significantly different. h
is one if the two populations are significantly different.
p
is the probability of observing a result equally or more extreme than the one using the data (x
and y
) if the null hypothesis is true. If p
is near zero, this casts doubt on this hypothesis.
also returns a structure containing the field [p,h,stats] = ranksum(x,y,alpha)
stats.ranksum
whose value is equal to the rank sum statistic. For large samples, it also contains stats.zval
that is the value of the normal (Z) statistic used to compute p
.
Example
This example tests the hypothesis of equality of means for two samples generated with poissrnd
.
See Also
signrank
, signtest
, ttest2
![]() | range | raylcdf | ![]() |