Documentation of 'org.apache.commons.math3.stat.inference.MannWhitneyUTest' Java class
MannWhitneyUTest
org.apache.commons.math3.stat.inference

Class MannWhitneyUTest



  • public class MannWhitneyUTest
    extends java.lang.Object
    An implementation of the Mann-Whitney U test (also called Wilcoxon rank-sum test).
    • Constructor Summary

      Constructors 
      Constructor and Description
      MannWhitneyUTest()
      Create a test instance using where NaN's are left in place and ties get the average of applicable ranks.
      MannWhitneyUTest(NaNStrategy nanStrategy, TiesStrategy tiesStrategy)
      Create a test instance using the given strategies for NaN's and ties.
    • Constructor Detail

      • MannWhitneyUTest

        public MannWhitneyUTest()
        Create a test instance using where NaN's are left in place and ties get the average of applicable ranks. Use this unless you are very sure of what you are doing.
      • MannWhitneyUTest

        public MannWhitneyUTest(NaNStrategy nanStrategy,
                                TiesStrategy tiesStrategy)
        Create a test instance using the given strategies for NaN's and ties. Only use this if you are sure of what you are doing.
        Parameters:
        nanStrategy - specifies the strategy that should be used for Double.NaN's
        tiesStrategy - specifies the strategy that should be used for ties
    • Method Detail

      • mannWhitneyU

        public double mannWhitneyU(double[] x,
                                   double[] y)
                            throws NullArgumentException,
                                   NoDataException
        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:

        • All observations in the two samples are independent.
        • The observations are at least ordinal (continuous are also ordinal).

        Parameters:
        x - the first sample
        y - the second sample
        Returns:
        Mann-Whitney U statistic (maximum of Ux and Uy)
        Throws:
        NullArgumentException - if x or y are null.
        NoDataException - if x or y are zero-length.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.