naginterfaces.library.nonpar.prob_​mwu_​noties

naginterfaces.library.nonpar.prob_mwu_noties(n1, n2, tail, u)[source]

prob_mwu_noties calculates the exact tail probability for the Mann–Whitney rank sum test statistic for the case where there are no ties in the two samples pooled together.

For full information please refer to the NAG Library document for g08aj

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/g08/g08ajf.html

Parameters
n1int

The number of non-tied pairs, .

n2int

The size of the second sample, .

tailstr, length 1

Indicates the choice of tail probability, and hence the alternative hypothesis.

A two tailed probability is calculated and the alternative hypothesis is .

An upper tailed probability is calculated and the alternative hypothesis , i.e., the ’s tend to be greater than the ’s.

A lower tailed probability is calculated and the alternative hypothesis , i.e., the ’s tend to be less than the ’s.

ufloat

, the value of the Mann–Whitney rank sum test statistic. This is the statistic returned through the argument by test_mwu().

Returns
pfloat

The exact tail probability, , as specified by the argument .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and the minimum workspace is .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

prob_mwu_noties computes the exact tail probability for the Mann–Whitney test statistic (calculated by test_mwu() and returned through the argument ) using a method based on an algorithm developed by Harding (1983), and presented by Neumann (1988), for the case where there are no ties in the pooled sample.

The Mann–Whitney test investigates the difference between two populations defined by the distribution functions and respectively. The data consist of two independent samples of size and , denoted by and , taken from the two populations.

The hypothesis under test, , often called the null hypothesis, is that the two distributions are the same, that is , and this is to be tested against an alternative hypothesis which is

: ; or

: , i.e., the ’s tend to be greater than the ’s; or

: , i.e., the ’s tend to be less than the ’s,

using a two tailed, upper tailed or lower tailed probability respectively. You select the alternative hypothesis by choosing the appropriate tail probability to be computed (see the description of argument in Parameters).

Note that when using this test to test for differences in the distributions one is primarily detecting differences in the location of the two distributions. That is to say, if we reject the null hypothesis in favour of the alternative hypothesis : we have evidence to suggest that the location, of the distribution defined by , is less than the location, of the distribution defined by .

prob_mwu_noties returns the exact tail probability, , corresponding to , depending on the choice of alternative hypothesis, .

The value of can be used to perform a significance test on the null hypothesis against the alternative hypothesis . Let be the size of the significance test (that is, is the probability of rejecting when is true). If then the null hypothesis is rejected. Typically might be or .

References

Conover, W J, 1980, Practical Nonparametric Statistics, Wiley

Harding, E F, 1983, An efficient minimal-storage procedure for calculating the Mann–Whitney U, generalised U and similar distributions, Appl. Statist. (33), 1–6

Neumann, N, 1988, Some procedures for calculating the distributions of elementary nonparametric teststatistics, Statistical Software Newsletter (14(3)), 120–126

Siegel, S, 1956, Non-parametric Statistics for the Behavioral Sciences, McGraw–Hill