Distributions of the stats Package
Description
Examples
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 binomialdn,p distribution (binomial distribution) has the probability density function nx⁢px⁢1−pn−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 discreteuniforma,b distribution has a probability density function that is equal to zero if x<a or if b<x, and equal to 1b−a+1 otherwise. Constraints: x is an integer, a≤b
The empirical[list_prob] has its probability density function equal to zero if x<1 or nops⁡list_prob<x and equal to list_probx otherwise. Constraints: the probabilities must add to 1 exactly.
The hypergeometricN1,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 N1x⁢N2n−xN1+N2n. Constraints: n≤N1+N2.
The negativebinomialn,p distribution has the probability density function equal to
n+x−1x⁢pn⁢1−px
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 poissonμ distribution has the probability density function exp(-mu)*mu^x/x!
For the continuous distributions, the parameter x takes a real value.
The βν1,ν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 cauchya,b distribution has the probability density function 1π⁢b⁢1+x−a2b2,0<b.
The chisquareν 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 exponentialα,a distribution (exponential distribution) has the probability density function equal to α⁢ⅇ−α⁢x−a if a≤x and equal to zero if x<a. Constraint: alpha is a non-negative real number. Default: a=0.
The fratioν1,ν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 γa,b distribution gamma distribution has the probability density function xa−1⁢ⅇ−xbΓ⁡a⁢ba,0<x,0<a,0<b. The parameter b, if absent, defaults to the value 1.
The laplaceda,b distribution has the probability density function ⅇ−x−ab2⁢b, 0<b. The name laplaced is so chosen to distinguish it from the laplace() function.
The logistica,b distribution has the probability density function
ⅇ−x−abb⁢1+ⅇ−x−ab2,0<b
The lognormalμ,σ has the probability density function
ⅇ−ln⁡x−μ22⁢σ2x⁢2⁢π⁢σ,0<x
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 normaldμ,σ distribution has the probability density function
ⅇ−x−μ22⁢σ22⁢π⁢σ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 studentstν distribution has the probability density function
GAMMA( (nu+1)/2 )/GAMMA(nu/2)/sqrt(nu*Pi)/(1+t^2/nu)^((nu+1)/2)
The uniforma,b distribution has the probability density function equal to 1b−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<b.
The weibulla,b distribution has the probability density function
a⁢xa−1⁢ⅇ−xbaba,0<x,0<a,0<b
statsstatevalf,pf,poisson3⁡2
0.2240418077
statsstatevalf,icdf,normald⁡0.56
0.1509692155
statsrandom,γ3,1⁡3
2.482561473,0.5545542660,2.632923698
See Also
Statistics
Statistics[Distributions]
stats(deprecated)[random]
stats(deprecated)[statevalf]
Download Help Document