|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.math.stat.comp.MannWhitneyU
public class MannWhitneyU
This class is used to compute Mann-Whitney U statistics. The implementation is based on the algorithm and equations provided on pages 428-430 in Sokal, Robert and Rohlf, James (1995). Biometry, Third Edition. NY, W. H. Freeman and Company; ISBN: 0-7167-2411-1.
Constructor Summary | |
---|---|
MannWhitneyU()
|
Method Summary | |
---|---|
int |
getN1(int size1,
int size2)
Returns the largest provided sample size. |
int |
getN2(int size1,
int size2)
Returns the smallest provided sample size. |
double |
getT(double uValue,
int n1,
int n2)
Computes and returns an approximate t value for the provided U value. |
double |
getU(double[] sampleA,
double[] sampleB)
Computes and returns the Mann-Whitney U statistic for the provided samples. |
double |
getU(int[] sampleA,
int[] sampleB)
Computes and returns the Mann-Whitney U statistic for the provided samples. |
double |
getU(java.util.List<? extends java.lang.Number> sampleA,
java.util.List<? extends java.lang.Number> sampleB)
Computes and returns the Mann-Whitney U statistic for the provided samples. |
static void |
main(java.lang.String[] args)
Used for testing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MannWhitneyU()
Method Detail |
---|
public double getU(java.util.List<? extends java.lang.Number> sampleA, java.util.List<? extends java.lang.Number> sampleB)
sampleA
- a sample of numbers.sampleB
- a sample of numbers.
public double getU(int[] sampleA, int[] sampleB)
sampleA
- a sample of integers.sampleB
- a sample of integers.
public double getU(double[] sampleA, double[] sampleB)
sampleA
- a sample of doubles.sampleB
- a sample of doubles.
public double getT(double uValue, int n1, int n2)
uValue
- the computed U value.n1
- the size of the larger samplen2
- the size of the smaller sample
java.lang.IllegalArgumentException
- if n1 < n2, or if n1 ≤ 20public int getN1(int size1, int size2)
size1
- a sample size.size2
- a sample size.
public int getN2(int size1, int size2)
size1
- a sample size.size2
- a sample size.
public static void main(java.lang.String[] args)
args
- none required.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |