 stats(deprecated)/distributions - Maple Help

Distributions of the stats Package Description

 • Important: The stats package has been deprecated. Use the superseding package Statistics instead.
 • The following discrete distributions are available:

 binomiald[n,p] discreteuniform[a,b] empirical[list_prob] hypergeometric[N1, N2, n] negativebinomial[n,p] poisson[mu]

 • The following continuous distributions are available:

 beta[nu1, nu2] cauchy[a, b] chisquare[nu] exponential[alpha, a] fratio[nu1, nu2] gamma[a, b] laplaced[a, b] logistic[a, b] lognormal[mu, sigma] normald[mu, sigma] studentst[nu] uniform[a, b] weibull[a, b]

 • In the following, the discrete distributions have probability density functions that are evaluated at integral values of x.
 • The ${\mathrm{binomiald}}_{n,p}$ distribution (binomial distribution) has the probability density function $\left(\genfrac{}{}{0}{}{n}{x}\right){p}^{x}{\left(1-p\right)}^{n-x}$. The name binomiald is so chosen in order to distinguish it from the function binomial(). Constraints: x is a non-negative integer no greater than n, n is a positive integer, p is a number between 0 and 1.
 • The ${\mathrm{discreteuniform}}_{a,b}$ distribution has a probability density function that is equal to zero if $x or if $b, and equal to $\frac{1}{b-a+1}$ otherwise. Constraints: x is an integer, $a\le b$
 • The empirical[list_prob] has its probability density function equal to zero if $x<1$ or $\mathrm{nops}\left(\mathrm{list_prob}\right) and equal to ${\mathrm{list_prob}}_{x}$ otherwise. Constraints: the probabilities must add to 1 exactly.
 • The ${\mathrm{hypergeometric}}_{\mathrm{N1},\mathrm{N2},n}$, with N1 equal to the size of the success population, N2 equal to the  size of the failure population and n equal to the sample size, has the probability density function $\frac{\left(\genfrac{}{}{0}{}{\mathrm{N1}}{x}\right)\left(\genfrac{}{}{0}{}{\mathrm{N2}}{n-x}\right)}{\left(\genfrac{}{}{0}{}{\mathrm{N1}+\mathrm{N2}}{n}\right)}$. Constraints: $n\le \mathrm{N1}+\mathrm{N2}$.
 • The ${\mathrm{negativebinomial}}_{n,p}$ distribution has the probability density function equal to

$\left(\genfrac{}{}{0}{}{n+x-1}{x}\right){p}^{n}{\left(1-p\right)}^{x}$

 Constraints: x is a non-negative integer no greater than n, n is a positive integer, p is a number between 0 and 1.
 • The ${\mathrm{poisson}}_{\mathrm{\mu }}$ distribution has the probability density function exp(-mu)*mu^x/x!
 • For the continuous distributions, the parameter x takes a real value.
 • The ${\mathrm{\beta }}_{\mathrm{ν1},\mathrm{ν2}}$ distribution has the probability density function

 1/Beta(nu1, nu2) * x^(nu1-1) * (1-x)^(nu2-1).

 Constraints: nu1, nu2 are positive integers.
 • The ${\mathrm{cauchy}}_{a,b}$ distribution has the probability density function $\frac{1}{\mathrm{\pi }b\left(1+\frac{{\left(x-a\right)}^{2}}{{b}^{2}}\right)},0.
 • The ${\mathrm{chisquare}}_{\mathrm{\nu }}$ distribution has the probability density function

 x^((nu-2)/2) exp(-x/2)/2^(nu/2)/GAMMA(nu/2), x>0, nu>0.

 Constraint: nu is a positive integer.
 • The ${\mathrm{exponential}}_{\mathrm{\alpha },a}$ distribution (exponential distribution) has the probability density function equal to  $\mathrm{\alpha }{ⅇ}^{-\mathrm{\alpha }\left(x-a\right)}$ if $a\le x$ and equal to zero if $x. Constraint: alpha is a non-negative real number. Default: $a=0$.
 • The ${\mathrm{fratio}}_{\mathrm{ν1},\mathrm{ν2}}$ distribution has the probability density function

 GAMMA( (nu1+nu2)/2)/GAMMA(nu1/2)/GAMMA(nu2/2)*(nu1/nu2)^(nu1/2)* x^((nu1-2)/2) / ( 1+ (nu1/nu2)*f) ^ ((nu1+nu2)/2), x>0, nu1>0, nu2>0

 This distribution is also known as the Fisher F distribution and the variance ratio distribution. Constraints: nu1, nu2 are positive integers.
 • The ${\mathrm{\gamma }}_{a,b}$ distribution gamma distribution has the probability density function $\frac{{x}^{a-1}{ⅇ}^{-\frac{x}{b}}}{\mathrm{\Gamma }\left(a\right){b}^{a}},0. The parameter b, if absent, defaults to the value $1$.
 • The ${\mathrm{laplaced}}_{a,b}$ distribution has the probability density function $\frac{{ⅇ}^{-\frac{\left|x-a\right|}{b}}}{2b}$, $0. The name laplaced is so chosen to distinguish it from the laplace() function.
 • The ${\mathrm{logistic}}_{a,b}$ distribution has the probability density function

$\frac{{ⅇ}^{-\frac{x-a}{b}}}{b{\left(1+{ⅇ}^{-\frac{x-a}{b}}\right)}^{2}},0

 • The ${\mathrm{lognormal}}_{\mathrm{\mu },\mathrm{\sigma }}$ has the probability density function

$\frac{{ⅇ}^{-\frac{{\left(\mathrm{ln}\left(x\right)-\mathrm{\mu }\right)}^{2}}{2{\mathrm{\sigma }}^{2}}}}{x\sqrt{2\mathrm{\pi }}\mathrm{\sigma }},0

 The parameter mu has the default value $0$ and the parameter sigma has the default value $1$. Constraint: sigma cannot be 0. See also the normald distribution.
 • The ${\mathrm{normald}}_{\mathrm{\mu },\mathrm{\sigma }}$ distribution has the probability density function

$\frac{{ⅇ}^{-\frac{{\left(x-\mathrm{\mu }\right)}^{2}}{2{\mathrm{\sigma }}^{2}}}}{\sqrt{2\mathrm{\pi }{\mathrm{\sigma }}^{2}}}$

 The parameter mu has the default value $0$ and the parameter sigma has the default value $1$. Note that sigma is the standard deviation and not the variance. Constraint: sigma must be positive.
 • The ${\mathrm{studentst}}_{\mathrm{\nu }}$ distribution has the probability density function

 GAMMA( (nu+1)/2 )/GAMMA(nu/2)/sqrt(nu*Pi)/(1+t^2/nu)^((nu+1)/2)

 Constraint: nu is a positive integer.
 • The ${\mathrm{uniform}}_{a,b}$ distribution has the probability density function equal to $\frac{1}{b-a}$ if $a<=x<=b$, and to  $0$ otherwise. The value of b defaults to $1+a$. The value of a defaults to 0. Constraint: $a.
 • The ${\mathrm{weibull}}_{a,b}$ distribution has the probability density function

$\frac{a{x}^{a-1}{ⅇ}^{-{\left(\frac{x}{b}\right)}^{a}}}{{b}^{a}},0 Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

 > $\mathrm{stats}\left[\mathrm{statevalf},\mathrm{pf},\mathrm{poisson}\left[3\right]\right]\left(2\right)$
 ${0.2240418077}$ (1)
 > $\mathrm{stats}\left[\mathrm{statevalf},\mathrm{icdf},\mathrm{normald}\right]\left(0.56\right)$
 ${0.1509692155}$ (2)
 > $\mathrm{stats}\left[\mathrm{random},\mathrm{\gamma }\left[3,1\right]\right]\left(3\right)$
 ${2.482561473}{,}{0.5545542660}{,}{2.632923698}$ (3)