org.apache.commons.math.stat.inference
Interface MannWhitneyUTest

All Known Implementing Classes:
MannWhitneyUTestImpl

public interface MannWhitneyUTest

An interface for Mann-Whitney U test (also called Wilcoxon rank-sum test).

Version:
$Id: MannWhitneyUTest.java 1131229 2011-06-03 20:49:25Z luc $

Method Summary
 double mannWhitneyU(double[] x, double[] y)
          Computes the Mann-Whitney U statistic comparing mean for two independent samples possibly of different length.
 double mannWhitneyUTest(double[] x, double[] y)
          Returns the asymptotic observed significance level, or p-value, associated with a Mann-Whitney U statistic comparing mean for two independent samples.
 

Method Detail

mannWhitneyU

double mannWhitneyU(double[] x,
                    double[] y)
                    throws java.lang.IllegalArgumentException
Computes the Mann-Whitney U statistic comparing mean for two independent samples possibly of different length.

This statistic can be used to perform a Mann-Whitney U test evaluating the null hypothesis that the two independent samples has equal mean.

Let Xi denote the i'th individual of the first sample and Yj the j'th individual in the second sample. Note that the samples would often have different length.

Preconditions:

Parameters:
x - the first sample
y - the second sample
Returns:
mannWhitneyU statistic
Throws:
java.lang.IllegalArgumentException - if preconditions are not met

mannWhitneyUTest

double mannWhitneyUTest(double[] x,
                        double[] y)
                        throws java.lang.IllegalArgumentException,
                               MathException
Returns the asymptotic observed significance level, or p-value, associated with a Mann-Whitney U statistic comparing mean for two independent samples.

Let Xi denote the i'th individual of the first sample and Yj the j'th individual in the second sample. Note that the samples would often have different length.

Preconditions:

Parameters:
x - the first sample
y - the second sample
Returns:
asymptotic p-value
Throws:
java.lang.IllegalArgumentException - if preconditions are not met
MathException - if an error occurs computing the p-value


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.