Statistics Toolbox    
ranksum

Wilcoxon rank sum test that two populations are identical

Syntax

Description

p = ranksum(x,y,alpha) returns the significance probability that the populations generating two independent samples, 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.

[p,h] = ranksum(x,y,alpha) also returns the result of the hypothesis test, 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.

[p,h,stats] = ranksum(x,y,alpha) also returns a structure containing the field 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