File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 33import math
44from math import sqrt , exp , pi , erf
55import numpy as np
6- from scipy . stats import norm
6+ import statistics as st
77from csv import reader
88from random import random , choice
99from hypothesis import given
@@ -669,8 +669,9 @@ def test_normal_truncated_summary_stats(self):
669669 self .assertEqual (N .mean , expected_mean )
670670 self .assertEqual (N .variance , expected_variance )
671671 self .assertEqual (N .sd , math .sqrt (N .variance ))
672- target = 1.0 - 0.5 * norm .cdf (z )
673- expected_med = mu + sd * norm .ppf (target )
672+ Norm = st .NormalDist (0 , 1 )
673+ target = 1.0 - 0.5 * Norm .cdf (z )
674+ expected_med = mu + sd * Norm .inv_cdf (target )
674675 self .assertEqual (N .median , expected_med )
675676 self .assertTrue (math .isinf (N .upper_limit ))
676677 self .assertEqual (N .lower_limit , 0.0 )
You can’t perform that action at this time.
0 commit comments