All problems
Coefficient of Variation Ratio
Problem
The relative variability of two groups is compared by the ratio of their coefficients of variation: (s1 / mean1) / (s2 / mean2).
Given each group's mean and standard deviation, return the ratio. Assume positive means and standard deviations.
Hint
Each CV is the standard deviation divided by its mean.
Test cases
case 1
in: [10,2,20,6]
expected: 0.6666666666666667
case 2
in: [5,1,5,1]
expected: 1
case 3
in: [100,10,10,5]
expected: 0.2
Starter codePython
def coefficient_of_variation_ratio(mean1, std1, mean2, std2):
# Your code here
pass3 test cases · run your code against them in the editor