Skip to content

Commit 62c7186

Browse files
committed
Update overlap() as well
1 parent c974db1 commit 62c7186

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/statistics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
from decimal import Decimal
139139
from itertools import count, groupby, repeat
140140
from bisect import bisect_left, bisect_right
141-
from math import hypot, sqrt, fabs, exp, erf, erfc, tau, log, fsum, sumprod
141+
from math import hypot, sqrt, fabs, exp, erfc, tau, log, fsum, sumprod
142142
from math import isfinite, isinf, pi, cos, sin, tan, cosh, asin, atan, acos
143143
from functools import reduce
144144
from operator import itemgetter
@@ -1312,7 +1312,7 @@ def overlap(self, other):
13121312
dv = Y_var - X_var
13131313
dm = fabs(Y._mu - X._mu)
13141314
if not dv:
1315-
return 1.0 - erf(dm / (2.0 * X._sigma * _SQRT2))
1315+
return erfc(dm / (2.0 * X._sigma * _SQRT2))
13161316
a = X._mu * Y_var - Y._mu * X_var
13171317
b = X._sigma * Y._sigma * sqrt(dm * dm + dv * log(Y_var / X_var))
13181318
x1 = (a + b) / dv

0 commit comments

Comments
 (0)