List of usage examples for org.apache.commons.math3.stat.inference TestUtils oneWayAnovaFValue
public static double oneWayAnovaFValue(final Collection<double[]> categoryData) throws NullArgumentException, DimensionMismatchException
From source file:org.moeaframework.util.statistics.OneWayANOVATest.java
/** * Test from Sheskin (2004) in Chapter 21. *//*from w ww . ja v a 2s.c o m*/ @Test public void testExample() { OneWayANOVA test = new OneWayANOVA(3); test.add(8, 0); test.add(10, 0); test.add(9, 0); test.add(10, 0); test.add(9, 0); test.add(7, 1); test.add(8, 1); test.add(5, 1); test.add(8, 1); test.add(5, 1); test.add(4, 2); test.add(8, 2); test.add(7, 2); test.add(5, 2); test.add(7, 2); Assert.assertEquals(6.98, TestUtils.oneWayAnovaFValue(test.categorize()), 0.01); Assert.assertTrue(test.test(0.05)); Assert.assertTrue(test.test(0.01)); }