public class MannWhitneyUTest extends OrdinalStatisticalTest
Assumptions:
References:
comparator, data, numberOfGroups
Constructor and Description |
---|
MannWhitneyUTest()
Constructs a Mann-Whitney U test.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double value,
int group)
Adds a new observation with the specified value and group.
|
void |
addAll(double[] values,
int group)
Adds several new observations to the specified group.
|
boolean |
test(double alpha)
Returns
true if the null hypothesis is rejected; false
otherwise. |
getComparator, getNumberOfGroups, size, update
public void add(double value, int group)
OrdinalStatisticalTest
add
in class OrdinalStatisticalTest
value
- the value of the new observationgroup
- the group to which the new observation belongspublic void addAll(double[] values, int group)
OrdinalStatisticalTest
addAll
in class OrdinalStatisticalTest
values
- the values of the new observationsgroup
- the group to which the new observations belongpublic boolean test(double alpha)
true
if the null hypothesis is rejected; false
otherwise. The meaning of the null hypothesis and alternative hypothesis
depends on the specific test.
The prespecified level of confidence, alpha, can be used for either one-tailed or two-tailed (directional or nondirectional) distributions, depending on the specific test. Some tests may only support specific values for alpha.
When the samples from both populations are less than 20, only alpha values of 0.05 and 0.01 are valid. This is because a table is used to accurately determine the critical values. When more than 20 samples are available, the normal approximation is used allowing any value for alpha.
alpha
- the prespecified level of confidencetrue
if the null hypothesis is rejected; false
otherwisejava.lang.IllegalArgumentException
- if an insufficient sampling size is
provided, or if an invalid alpha value is providedCopyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.