12.9 The stats module

The stats module contains statistical functions:

stats.binomialCDF($k,p,n$)
The stats.binomialCDF($k,p,n$) function evaluates the probability of getting fewer than or exactly $k$ successes out of $n$ trials in a binomial distribution with success probability $p$. $k$ and $n$ must be positive real integers. $p$ must be a real number in the range $0\leq p \leq 1$.

stats.binomialPDF($k,p,n$)
The stats.binomialPDF($k,p,n$) function evaluates the probability of getting $k$ successes out of $n$ trials in a binomial distribution with success probability $p$. $k$ and $n$ must be positive real integers. $p$ must be a real number in the range $0\leq p \leq 1$.

stats.chisqCDF($x,\nu $)
The stats.chisqCDF($x,\nu $) function returns the cumulative probability density at $x$ in a $\chi $-squared distribution with $\nu $ degrees of freedom. $\nu $ must be a positive real dimensionless integer. $x$ must be a positive real dimensionless number.

stats.chisqCDFi($P,\nu $)
The stats.chisqCDFi($P,\nu $) function returns the point $x$ at which the cumulative probability density in a $\chi $-squared distribution with $\nu $ degrees of freedom is $P$. $\nu $ must be a positive real dimensionless integer. $P$ must be a real number in the range $0\leq p \leq 1$.

stats.chisqPDF($x,\nu $)
The stats.chisqPDF($x,\nu $) function returns the probability density at $x$ in a $\chi $-squared distribution with $\nu $ degrees of freedom. $\nu $ must be a positive real dimensionless integer. $x$ must be a positive real dimensionless number.

stats.gaussianCDF($x,\sigma $)
The stats.gaussianCDF($x,\sigma $) function evaluates the Gaussian cumulative distribution function of standard deviation $\sigma $ at $x$. The distribution is centred upon $x=0$. $x$ and $\sigma $ must both be real, but may have any physical dimensions so long as they match.

stats.gaussianCDFi($x,\sigma $)
The stats.gaussianCDFi($x,\sigma $) function evaluates the inverse Gaussian cumulative distribution function of standard deviation $\sigma $ at $x$. The distribution is centred upon $x=0$. $x$ and $\sigma $ must both be real, but may have any physical dimensions so long as they match.

stats.gaussianPDF($x,\sigma $)
The stats.gaussianPDF($x,\sigma $) function evaluates the Gaussian probability density function of standard deviation $\sigma $ at $x$. The distribution is centred upon $x=0$. $x$ and $\sigma $ must both be real, but may have any physical dimensions so long as they match.

stats.lognormalCDF($x,\zeta ,\sigma $)
The stats.lognormalCDF($x,\zeta ,\sigma $) function evaluates the log normal cumulative distribution function of standard deviation $\sigma $, centred upon $\zeta $, at $x$. $\sigma $ must be real, positive and dimensionless. $x$ and $\zeta $ must both be real, but may have any physical dimensions so long as they match.

stats.lognormalCDFi($x,\zeta ,\sigma $)
The stats.lognormalCDFi($x,\zeta ,\sigma $) function evaluates the inverse log normal cumulative distribution function of standard deviation $\sigma $, centred upon $\zeta $, at $x$. $\sigma $ must be real, positive and dimensionless. $x$ and $\zeta $ must both be real, but may have any physical dimensions so long as they match.

stats.lognormalPDF($x,\zeta ,\sigma $)
The stats.lognormalPDF($x,\zeta ,\sigma $) function evaluates the log normal probability density function of standard deviation $\sigma $, centred upon $\zeta $, at $x$. $\sigma $ must be real, positive and dimensionless. $x$ and $\zeta $ must both be real, but may have any physical dimensions so long as they match.

stats.poissonCDF($x,\mu $)
The stats.poissonCDF($x,\mu $) function returns the probability of getting $\leq x$ from a Poisson distribution with mean $\mu $, where $\mu $ must be real, positive and dimensionless and $x$ must be real and dimensionless.

stats.poissonPDF($x,\mu $)
The stats.poissonPDF($x,\mu $) function returns the probability of getting $x$ from a Poisson distribution with mean $\mu $, where $\mu $ must be real, positive and dimensionless and $x$ must be a real dimensionless integer.

stats.tdistCDF($x,\nu $)
The stats.tdistCDF($x,\nu $) function returns the cumulative probability density at $x$ in a $t$-distribution with $\nu $ degrees of freedom. $\nu $ must be a positive real dimensionless integer. $x$ must be a positive real dimensionless number.

stats.tdistCDFi($P,\nu $)
The stats.tdistCDFi($P,\nu $) function returns the point $x$ at which the cumulative probability density in a $t$-distribution with $\nu $ degrees of freedom is $P$. $\nu $ must be a positive real dimensionless integer. $P$ must be a real number in the range $0\leq p \leq 1$.

stats.tdistPDF($x,\nu $)
The stats.tdistPDF($x,\nu $) function returns the probability density at $x$ in a $t$-distribution with $\nu $ degrees of freedom. $\nu $ must be a positive real dimensionless integer. $x$ must be a positive real dimensionless number.