Error in scipy.stats.mannwhitneyu documentation
See original GitHub issueBelow is the docstring of the scipy.stats.mannwhitneyu
function (scipy==1.8.0)
If F(u) and G(u) are the cumulative distribution functions of the distributions underlying x
and y
, respectively
then the hypothesis for ‘greater’ would be F(u) > G(u) for all u, right?. However, in the documentation, the inequality is written in the other direction. And the same for the ‘less’ hypothesis.
Parameters
----------
x, y : array-like
N-d arrays of samples. The arrays must be broadcastable except along
the dimension given by `axis`.
use_continuity : bool, optional
Whether a continuity correction (1/2) should be applied.
Default is True when `method` is ``'asymptotic'``; has no effect
otherwise.
alternative : {'two-sided', 'less', 'greater'}, optional
Defines the alternative hypothesis. Default is 'two-sided'.
Let *F(u)* and *G(u)* be the cumulative distribution functions of the
distributions underlying `x` and `y`, respectively. Then the following
alternative hypotheses are available:
* 'two-sided': the distributions are not equal, i.e. *F(u) ≠ G(u)* for
at least one *u*.
* 'less': the distribution underlying `x` is stochastically less
than the distribution underlying `y`, i.e. *F(u) > G(u)* for all *u*.
* 'greater': the distribution underlying `x` is stochastically greater
than the distribution underlying `y`, i.e. *F(u) < G(u)* for all *u*.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
scipy.stats.mannwhitneyu — SciPy v1.9.3 Manual
The Mann-Whitney U test is a nonparametric test of the null hypothesis that the distribution underlying sample x is the same as the...
Read more >TypeError: mannwhitneyu() got an unexpected keyword ...
I am getting the same answer for scipy.stats wilcoxon package, although the documentation appeared to state method as a valid parameter.
Read more >How to Perform Mann-Whitney U Test in Python with Scipy ...
In this data analysis tutorial, you will learn how to carry out a Mann-Whitney U test in Python with the packages SciPy and...
Read more >Comparing two independent groups - Phil Mike Jones
the non–parametric Mann–Whitney U test. These tests work by comparing the means to see if they are statistically significantly different. Obviously the means...
Read more >3.1. Statistics in Python - Scipy Lecture Notes
In this document, the Python inputs are represented with the sign “>>>”. ... in the non paired case is the Mann–Whitney U test,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Documentation improvement are always welcomed.
For reference, SciPy’s description of the alternatives is directly from the original paper: