We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2698724 commit 986ac92Copy full SHA for 986ac92
ciw/dists/distributions.py
@@ -17,7 +17,7 @@
17
from typing import List, NoReturn
18
19
import numpy as np
20
-from scipy.stats import norm
+import statistics as st
21
22
from ciw.auxiliary import *
23
from ciw.individual import Individual
@@ -416,8 +416,9 @@ def variance(self):
416
def median(self):
417
# Truncated below at 0
418
z = self._mean / self._sd
419
- target = 1.0 - 0.5 * norm.cdf(z)
420
- return self._mean + self._sd * norm.ppf(target)
+ Norm = st.NormalDist(0, 1)
+ target = 1.0 - 0.5 * Norm.cdf(z)
421
+ return self._mean + self._sd * Norm.inv_cdf(target)
422
423
@property
424
def upper_limit(self):
0 commit comments