[frames] | no frames]

# Module chisq

source code

Python implementation of chisqprob, to avoid SciPy dependency.

 Functions

 chisqprob(x, df) Probability value (1-tail) for the Chi^2 probability distribution. source code

 _igamc(a, x) Complemented incomplete Gamma integral (PRIVATE). source code

 _igam(a, x) Left tail of incomplete Gamma function (PRIVATE). source code
 Variables
MACHEP = `1e-07`
BIG = `4.50359962737e+15`
BIGINV = `2.22044604925e-16`
__package__ = `'Bio.codonalign'`
 Function Details

### chisqprob(x, df)

source code

Probability value (1-tail) for the Chi^2 probability distribution.

# Parameters

x : array_like or float > 0

df : array_like or float, probably int >= 1

# Returns

chisqprob : ndarray
The area from chisq to infinity under the Chi^2 probability distribution with degrees of freedom `df`.

### _igamc(a, x)

source code

Complemented incomplete Gamma integral (PRIVATE).

# Parameters

a: float x: float

float

# Notes

The function is defined by:

```igamc(a,x)   =   1 - igam(a,x)

inf.
-
1       | |  -t  a-1
=   -----     |   e   t   dt.
-      | |
| (a)    -
x
```

In this implementation both arguments must be positive. The integral is evaluated by either a power series or continued fraction expansion, depending on the relative values of a and x.

### _igam(a, x)

source code

Left tail of incomplete Gamma function (PRIVATE).

Computes this formula:

```        inf.      k
a  -x   -       x
x  e     >   ----------
-     -
k=0   | (a+k+1)
```

 Generated by Epydoc 3.0.1 on Fri Jun 22 16:34:28 2018 http://epydoc.sourceforge.net