diff --git a/calculate/tests.py b/calculate/tests.py index 01cc9a4..fb63cfa 100644 --- a/calculate/tests.py +++ b/calculate/tests.py @@ -682,7 +682,7 @@ def test_variation_coefficient(self): 6.442049363362563 ) self.assertEqual( - calculate.variation_coefficient(range(1,100000)), + calculate.variation_coefficient(range(1, 100000)), 0.5773444956580661 ) self.assertRaises( diff --git a/calculate/variation_coefficient.py b/calculate/variation_coefficient.py index a4d85ee..3504287 100644 --- a/calculate/variation_coefficient.py +++ b/calculate/variation_coefficient.py @@ -1,9 +1,10 @@ import calculate + def variation_coefficient(data_list): """ Accepts a list of values and returns the variation coefficient, - which is a normalized measure of the distribution. + which is a normalized measure of the distribution. This is the sort of thing you can use to compare the standard deviation of sets that are measured in different units. @@ -19,7 +20,8 @@ def variation_coefficient(data_list): h3. Documentation - * "coefficient of variation":http://en.wikipedia.org/wiki/Coefficient_of_variation + * "coefficient of variation":http://en.wikipedia.org/wiki/\ +Coefficient_of_variation """ # Convert all the values to floats and test to make sure # there aren't any strings in there