Class MannWhitneyUTest.Result
- java.lang.Object
-
- org.apache.commons.statistics.inference.BaseSignificanceResult
-
- org.apache.commons.statistics.inference.MannWhitneyUTest.Result
-
- All Implemented Interfaces:
SignificanceResult
- Enclosing class:
- MannWhitneyUTest
public static final class MannWhitneyUTest.Result extends BaseSignificanceResult
Result for the Mann-Whitney U test.This class is immutable.
- Since:
- 1.1
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
tiedValues
Flag indicating the data has tied values.
-
Constructor Summary
Constructors Constructor Description Result(double statistic, boolean tiedValues, double p)
Create an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getStatistic()
Returns the test statistic.boolean
hasTiedValues()
Returntrue
if the data had tied values.-
Methods inherited from class org.apache.commons.statistics.inference.BaseSignificanceResult
getPValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.statistics.inference.SignificanceResult
reject
-
-
-
-
Method Detail
-
getStatistic
public double getStatistic()
Returns the test statistic.This is the U1 statistic. Compute the U2 statistic using the original sample lengths
n
andm
using:u2 = (long) n * m - u1;
- Specified by:
getStatistic
in interfaceSignificanceResult
- Overrides:
getStatistic
in classBaseSignificanceResult
- Returns:
- the statistic
-
hasTiedValues
public boolean hasTiedValues()
Returntrue
if the data had tied values.Note: The exact computation cannot be used when there are tied values.
- Returns:
true
if there were tied values
-
-