| Index: tools/auto_bisect/math_utils.py
|
| diff --git a/tools/auto_bisect/math_utils.py b/tools/auto_bisect/math_utils.py
|
| index fe94f53583bd255f7ecb07902ab114f863e4380e..c225bdd8597c47d1a47f357309fad03445b4587e 100644
|
| --- a/tools/auto_bisect/math_utils.py
|
| +++ b/tools/auto_bisect/math_utils.py
|
| @@ -57,18 +57,20 @@ def Mean(values):
|
| return TruncatedMean(values, 0.0)
|
|
|
|
|
| -def StandardDeviation(values):
|
| - """Calculates the sample standard deviation of the given list of values."""
|
| +def Variance(values):
|
| + """Calculates the sample variance."""
|
| if len(values) == 1:
|
| return 0.0
|
| -
|
| mean = Mean(values)
|
| differences_from_mean = [float(x) - mean for x in values]
|
| squared_differences = [float(x * x) for x in differences_from_mean]
|
| variance = sum(squared_differences) / (len(values) - 1)
|
| - std_dev = math.sqrt(variance)
|
| + return variance
|
|
|
| - return std_dev
|
| +
|
| +def StandardDeviation(values):
|
| + """Calculates the sample standard deviation of the given list of values."""
|
| + return math.sqrt(Variance(values))
|
|
|
|
|
| def RelativeChange(before, after):
|
|
|