15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SciPy Reference Guide, Release 0.8.dev<br />

tiecorrect(rankvals)<br />

Tie-corrector for ties in Mann Whitney U and Kruskal Wallis H tests. See Siegel, S. (1956) Nonparametric<br />

Statistics for the Behavioral Sciences. New York: McGraw-Hill. Code adapted from |Stat rankind.c code.<br />

Returns: T correction factor for U or H<br />

ranksums(x, y)<br />

Compute the Wilcoxon rank-sum statistic for two samples.<br />

The Wilcoxon rank-sum test tests the null hypothesis that two sets of measurements are drawn from the same<br />

distribution. The alternative hypothesis is that values in one sample are more likely to be larger than the values<br />

in the other sample.<br />

This test should be used to compare two samples from continuous distributions. It does not handle ties between<br />

measurements in x and y. For tie-handling and an optional continuity correction see ‘stats.mannwhitneyu‘_<br />

Parameters<br />

x,y : array_like<br />

The data from the two samples<br />

Returns<br />

z-statistic : float<br />

References<br />

[R32]<br />

The test statistic under the large-sample approximation that the rank sum statistic is<br />

normally distributed<br />

p-value : float<br />

The two-sided p-value of the test<br />

wilcoxon(x, y=None)<br />

Calculate the Wilcoxon signed-rank test<br />

The Wilcoxon signed-rank test tests the null hypothesis that two related samples come from the same distribution.<br />

It is a a non-parametric version of the paired T-test.<br />

Notes<br />

Parameters<br />

x : array_like<br />

The first set of measurements<br />

y : array_like, optional, default None<br />

The second set of measurements. If y is not given, then the x array is considered to<br />

be the differences between the two sets of measurements.<br />

Returns<br />

z-statistic : float<br />

The test statistic under the large-sample approximation that the signed-rank statistic<br />

is normally distributed.<br />

p-value : float<br />

The two-sided p-value for the test<br />

Because the normal approximation is used for the calculations, the samples used should be large. A typical rule<br />

is to require that n > 20.<br />

662 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!