| Modifier and Type | Field and Description |
|---|---|
| private NaturalRanking | naturalRanking
Ranking algorithm. |
| Access | Constructor and Description |
|---|---|
| public | MannWhitneyUTest()
Create a test instance using where NaN's are left in place and ties get the average of applicable ranks. |
| public | MannWhitneyUTest(final NaNStrategy
specifies the strategy that should be used for Double.NaN's nanStrategy, final TiesStrategy specifies the strategy that should be used for ties tiesStrategy)Create a test instance using the given strategies for NaN's and ties. |
| Modifier and Type | Method and Description |
|---|---|
| private double | Returns: two-sided asymptotic p-valuesmallest Mann-Whitney U value Umin, final int number of subjects in first sample n1, final int number of subjects in second sample n2)
|
| private double[] | Returns: concatenated arrayfirst sample x, final double[] second sample y)Concatenate the samples into one array. |
| private void | ensureDataConformance(final double[]
first sample x, final double[] second sample y)Ensures that the provided arrays fulfills the assumptions. |
| public double | Returns: Mann-Whitney U statistic (maximum of Ux and Uy)the first sample x, final double[] the second sample y)Computes the Mann-Whitney U statistic comparing mean for two independent samples possibly of different length. |
| public double | Returns: asymptotic p-valuethe first sample x, final double[] the second sample y)Returns the asymptotic observed significance level, or p-value, associated with a Mann-Whitney U statistic comparing mean for two independent samples. |
| naturalRanking | back to summary |
|---|---|
| private NaturalRanking naturalRanking Ranking algorithm. | |
| MannWhitneyUTest | back to summary |
|---|---|
| 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 | back to summary |
|---|---|
| public MannWhitneyUTest(final NaNStrategy nanStrategy, final 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.
| |
| calculateAsymptoticPValue | back to summary |
|---|---|
private double calculateAsymptoticPValue(final double Umin, final int n1, final int n2) throws ConvergenceException, MaxCountExceededException
| |
| concatenateSamples | back to summary |
|---|---|
| private double[] concatenateSamples(final double[] x, final double[] y) Concatenate the samples into one array.
| |
| ensureDataConformance | back to summary |
|---|---|
| private void ensureDataConformance(final double[] x, final double[] y) throws NullArgumentException, NoDataException Ensures that the provided arrays fulfills the assumptions.
| |
| mannWhitneyU | back to summary |
|---|---|
| public double mannWhitneyU(final double[] x, final 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:
| |
| mannWhitneyUTest | back to summary |
|---|---|
| public double mannWhitneyUTest(final double[] x, final double[] y) throws NullArgumentException, NoDataException, ConvergenceException, MaxCountExceededException 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:
Ties give rise to biased variance at the moment. See e.g. http://mlsc.lboro.ac.uk/resources/statistics/Mannwhitney.pdf.
| |