def testOtherPrecisionCV(self): X = [1, 2, 2, 4, 3] self.assertEqual(stats.coeffVar(X, 5), 0.42492)
def testDefaultPrecisionCV(self): X = [1, 2, 2, 4, 3] self.assertEqual(stats.coeffVar(X), 0.425)
def testSingleCoeffVar(self): # passing only one data point must return zero (no deviation!) self.assertEqual(stats.coeffVar([5]), 0.0)
def testOtherPrecisionCV(self): X = [1, 2, 2, 4, 3] self.assertEqual(stats.coeffVar(X,5), 0.42492)