Ejemplo n.º 1
0
 def test_binom(self):
     for n in xrange(1, 100):
         for x in xrange(n + 1):
             left, right = math.binomial_conf_interval(x, n)
             assert 0 <= left <= x/n <= right <= 1, (left, right, x, n)
Ejemplo n.º 2
0
 def test_binom(self):
     for n in xrange(100):
         for x in xrange(n + 1):
             left, right = math.binomial_conf_interval(x, n)
             assert left >= 0 and right <= 1