Looking at the documentation for ANOVA, I see this sample code:
double[] classA = {93.0, 103.0, 95.0, 101.0, 91.0, 105.0, 96.0, 94.0,
101.0 };
double[] classB = {99.0, 92.0, 102.0, 100.0, 102.0, 89.0 };
double[] classC = {110.0, 115.0, 111.0, 117.0, 128.0, 117.0 };
List classes = new ArrayList();
classes.add(classA);
classes.add(classB);
classes.add(classC);
and then
TestUtils.oneWayAnovaPValue(classes);
Works fine. However, if I add only classA, I get a
IllegalArgumentException: ANOVA: two or more categories required
I do not understand why this was implemented this way. In my own code, I
have one array of double. It appears that I will have to artificially
split it into 2 parts to work with this. I could be wrong, of course.
Can someone please explain?