Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# cogent.maths.stats.special.ln_binomial

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

```"""
from __future__ import division
from cogent.maths.stats.special import erf, erfc, igamc, igam, betai, log1p, \
expm1, SQRTH, MACHEP, MAXNUM, PI, ndtri, incbi, igami, fix_rounding_error,\
ln_binomial
```
```    if (successes < 0) or (trials < successes):
raise ValueError, "Binomial successes must be between 0 and trials."
return exp(ln_binomial(successes, trials, prob))

def f_low(df1, df2, x):
```

```"""
from __future__ import division
from cogent.maths.stats.special import erf, erfc, igamc, igam, betai, log1p, \
expm1, SQRTH, MACHEP, MAXNUM, PI, ndtri, incbi, igami, fix_rounding_error,\
ln_binomial
```
```    if (successes < 0) or (trials < successes):
raise ValueError, "Binomial successes must be between 0 and trials."
return exp(ln_binomial(successes, trials, prob))

def f_low(df1, df2, x):
```

```#!/usr/bin/env python
"""Unit tests for special functions used in statistics.
"""
from cogent.util.unit_test import TestCase, main
from cogent.maths.stats.special import permutations, permutations_exact, \
```
```        for (key, value) in expected.items():
min_val, max_val = value
assert min_val < ln_binomial(*key) < max_val
#self.assertFloatEqualRel(binomial_exact(*key), value, 1e-4)

```
```        previous_value = -1.784
while start <= end:
obs = ln_binomial(start,5,.3)
assert lower_lim <= obs <= upper_lim
assert obs > previous_value
```

```#!/usr/bin/env python
"""Unit tests for special functions used in statistics.
"""
from cogent.util.unit_test import TestCase, main
from cogent.maths.stats.special import permutations, permutations_exact, \
```
```        for (key, value) in expected.items():
min_val, max_val = value
assert min_val < ln_binomial(*key) < max_val
#self.assertFloatEqualRel(binomial_exact(*key), value, 1e-4)

```
```        previous_value = -1.784
while start <= end:
obs = ln_binomial(start,5,.3)
assert lower_lim <= obs <= upper_lim
assert obs > previous_value
```