@Test public void testVarianceScalar() { assertThat( Stats.variance(set, mean), equalTo(1.2)); // more accurate than Stats.varianceVector() }
@Test(expected = IllegalArgumentException.class) public void testEmptySetForVarianceScalar() { Stats.variance(new ArrayList<Pattern>(), mean); }