asv._stats¶
Attributes¶
Functions¶
|
Return a data point weight for the result. |
|
Check whether the samples are statistically different. |
|
Mann-Whitney U test |
|
|
|
|
|
|
|
Number of orderings in Mann-Whitney U test. |
|
Binomial coefficient (n over k) |
Module Contents¶
- asv._stats.is_different(samples_a, samples_b, stats_a, stats_b, p_threshold=0.002)[source]¶
Check whether the samples are statistically different.
If sample data is not provided, or the sample is too small, falls back to a pessimistic CI-based check. If it returns True, then the difference is statistically significant. If it returns False, it might or might not be statistically significant.
Parameters¶
- samples_a, samples_b
Input samples
- stats_a, stats_b
Input stats data
- asv._stats.mann_whitney_u(x, y, method='auto')[source]¶
Mann-Whitney U test
Ties are handled conservatively, returning the least significant tie breaking. .
Parameters¶
- x, ylist of float
Samples to test
- method{‘auto’, ‘exact’, ‘normal’}
Whether to compute p-value exactly of via normal approximation. The option ‘auto’ switches to approximation for sample size > 20.
Returns¶
- uint
U-statistic
- pfloat
p-value for two-sided alternative
References¶
[MWU_GC10]Jean Dickinson Gibbons and Subhabrata Chakraborti. Nonparametric Statistical Inference. Chapman and Hall/CRC, New York, 5 edition, July 2010. ISBN 978-0-429-11188-4. doi:10.1201/9781439896129.
[MWU_MW47]H. B. Mann and D. R. Whitney. On a Test of Whether one of Two Random Variables is Stochastically Larger than the Other. The Annals of Mathematical Statistics, 18(1):50–60, 1947. arXiv:2236101, doi:10.1214/aoms/1177730491.
- asv._stats.mann_whitney_u_r(m, n, u, memo=None)[source]¶
Number of orderings in Mann-Whitney U test.
The PMF of U for samples of sizes (m, n) is given by
p(u) = r(m, n, u) / binom(m + n, m).
References¶
[MWUR_MW47]H. B. Mann and D. R. Whitney. On a Test of Whether one of Two Random Variables is Stochastically Larger than the Other. The Annals of Mathematical Statistics, 18(1):50–60, 1947. arXiv:2236101, doi:10.1214/aoms/1177730491.