Continuous Distributions

The functions described here are among the most commonly used continuous univariate statistical distributions. You can compute their densities, means, variances, and other related properties. The distributions themselves are represented in the symbolic form name[(Subscript[param, 1]),(Subscript[param, 2]),…]. Functions such as (RefLink[Mean, paclet:ref/Mean]), which give properties of statistical distributions, take the symbolic representation of the distribution as an argument. "Discrete Distributions" describes many common discrete univariate statistical distributions.

Distributions related to the normal distribution.

The lognormal distribution (RefLink[LogNormalDistribution, paclet:ref/LogNormalDistribution])[μ,σ] is the distribution followed by the exponential of a normally distributed random variable. This distribution arises when many independent random variables are combined in a multiplicative fashion. The half-normal distribution (RefLink[HalfNormalDistribution, paclet:ref/HalfNormalDistribution])[θ] is proportional to the distribution (RefLink[NormalDistribution, paclet:ref/NormalDistribution])[0,1/(θ (RefLink[Sqrt, paclet:ref/Sqrt])[2/π])] limited to the domain [0,∞).

The inverse Gaussian distribution (RefLink[InverseGaussianDistribution, paclet:ref/InverseGaussianDistribution])[μ,λ], sometimes called the Wald distribution, is the distribution of first passage times in Brownian motion with positive drift.

Distributions related to normally distributed samples.

If (Subscript[X, 1]), …, (Subscript[X, ν]) are independent normal random variables with unit variance and mean zero, then (∑_(i==1)^ν)(Subscript[X, i]^2) has a (χ^2) distribution with ν degrees of freedom. If a normal variable is standardized by subtracting its mean and dividing by its standard deviation, then the sum of squares of such quantities follows this distribution. The (χ^2) distribution is most typically used when describing the variance of normal samples.

If Y follows a (χ^2) distribution with ν degrees of freedom, 1/Y follows the inverse (χ^2) distribution (RefLink[InverseChiSquareDistribution, paclet:ref/InverseChiSquareDistribution])[ν]. A scaled inverse (χ^2) distribution with ν degrees of freedom and scale ξ can be given as (RefLink[InverseChiSquareDistribution, paclet:ref/InverseChiSquareDistribution])[ν,ξ]. Inverse (χ^2) distributions are commonly used as prior distributions for the variance in Bayesian analysis of normally distributed samples.

A variable that has a Student t distribution can also be written as a function of normal random variables. Let X and Z be independent random variables, where X is a standard normal distribution and Z is a (χ^2) variable with ν degrees of freedom. In this case, X/(Sqrt[Z/ν]) has a t distribution with ν degrees of freedom. The Student t distribution is symmetric about the vertical axis, and characterizes the ratio of a normal variable to its standard deviation. Location and scale parameters can be included as μ and σ in (RefLink[StudentTDistribution, paclet:ref/StudentTDistribution])[μ,σ,ν]. When ν==1, the t distribution is the same as the Cauchy distribution.

The F-ratio distribution is the distribution of the ratio of two independent (χ^2) variables divided by their respective degrees of freedom. It is commonly used when comparing the variances of two populations in hypothesis testing.

Distributions that are derived from normal distributions with nonzero means are called noncentral distributions.

The sum of the squares of ν normally distributed random variables with variance (σ^2)==1 and nonzero means follows a noncentral (χ^2) distribution (RefLink[NoncentralChiSquareDistribution, paclet:ref/NoncentralChiSquareDistribution])[ν,λ]. The noncentrality parameter λ is the sum of the squares of the means of the random variables in the sum. Note that in various places in the literature, λ/2 or (Sqrt[λ]) is used as the noncentrality parameter.

The noncentral Student t distribution (RefLink[NoncentralStudentTDistribution, paclet:ref/NoncentralStudentTDistribution])[ν,δ] describes the ratio X/(Sqrt[(Subscript[χ, ν]^2)/ν]) where (Subscript[χ, ν]^2) is a central (χ^2) random variable with ν degrees of freedom, and X is an independent normally distributed random variable with variance (σ^2)==1 and mean δ.

The noncentral F-ratio distribution (RefLink[NoncentralFRatioDistribution, paclet:ref/NoncentralFRatioDistribution])[n,m,λ] is the distribution of the ratio of (1/n)(Subscript[χ, n]^2)(λ) to (1/m)(Subscript[χ, m]^2), where (Subscript[χ, n]^2)(λ) is a noncentral (χ^2) random variable with noncentrality parameter λ and (Subscript[n, 1]) degrees of freedom and (Subscript[χ, m]^2) is a central (χ^2) random variable with m degrees of freedom.

Piecewise linear distributions.

The triangular distribution (RefLink[TriangularDistribution, paclet:ref/TriangularDistribution])[{a,b},c] is a triangular distribution for a<X<b with maximum probability at c and a<c<b. If c is ((a+b)/2), (RefLink[TriangularDistribution, paclet:ref/TriangularDistribution])[{a,b},c] is the symmetric triangular distribution (RefLink[TriangularDistribution, paclet:ref/TriangularDistribution])[{a,b}].

The uniform distribution (RefLink[UniformDistribution, paclet:ref/UniformDistribution])[{min,max}], commonly referred to as the rectangular distribution, characterizes a random variable whose value is everywhere equally likely. An example of a uniformly distributed random variable is the location of a point chosen randomly on a line from min to max.

Other continuous statistical distributions.

If X is uniformly distributed on [-π,π], then the random variable tan(X) follows a Cauchy distribution (RefLink[CauchyDistribution, paclet:ref/CauchyDistribution])[a,b], with a==0 and b==1.

When α==n/2 and λ==2, the gamma distribution (RefLink[GammaDistribution, paclet:ref/GammaDistribution])[α,λ] describes the distribution of a sum of squares of n-unit normal random variables. This form of the gamma distribution is called a (χ^2) distribution with ν degrees of freedom. When α==1, the gamma distribution takes on the form of the exponential distribution (RefLink[ExponentialDistribution, paclet:ref/ExponentialDistribution])[λ], often used in describing the waiting time between events.

If a random variable X follows the gamma distribution (RefLink[GammaDistribution, paclet:ref/GammaDistribution])[α,β], 1/X follows the inverse gamma distribution (RefLink[InverseGammaDistribution, paclet:ref/InverseGammaDistribution])[α,1/β]. If a random variable X follows (RefLink[InverseGammaDistribution, paclet:ref/InverseGammaDistribution])[1/2,σ/2], X+μ follows a Lévy distribution (RefLink[LevyDistribution, paclet:ref/LevyDistribution])[μ,σ].

When (Subscript[X, 1]) and (Subscript[X, 2]) have independent gamma distributions with equal scale parameters, the random variable ((Subscript[X, 1])/((Subscript[X, 1])+(Subscript[X, 2]))) follows the beta distribution (RefLink[BetaDistribution, paclet:ref/BetaDistribution])[α,β], where α and β are the shape parameters of the gamma variables.

The χ distribution (RefLink[ChiDistribution, paclet:ref/ChiDistribution])[ν] is followed by the square root of a (χ^2) random variable. For n==1, the χ distribution is identical to (RefLink[HalfNormalDistribution, paclet:ref/HalfNormalDistribution])[θ] with θ==(Sqrt[(π/2)]). For n==2, the χ distribution is identical to the Rayleigh distribution (RefLink[RayleighDistribution, paclet:ref/RayleighDistribution])[σ] with σ==1. For n==3, the χ distribution is identical to the Maxwell–Boltzmann distribution (RefLink[MaxwellDistribution, paclet:ref/MaxwellDistribution])[σ] with σ==1.

The Laplace distribution (RefLink[LaplaceDistribution, paclet:ref/LaplaceDistribution])[μ,β] is the distribution of the difference of two independent random variables with identical exponential distributions. The logistic distribution (RefLink[LogisticDistribution, paclet:ref/LogisticDistribution])[μ,β] is frequently used in place of the normal distribution when a distribution with longer tails is desired.

The Pareto distribution (RefLink[ParetoDistribution, paclet:ref/ParetoDistribution])[k,α] may be used to describe income, with k representing the minimum income possible.

The Weibull distribution (RefLink[WeibullDistribution, paclet:ref/WeibullDistribution])[α,β] is commonly used in engineering to describe the lifetime of an object. The extreme value distribution (RefLink[ExtremeValueDistribution, paclet:ref/ExtremeValueDistribution])[α,β] is the limiting distribution for the largest values in large samples drawn from a variety of distributions, including the normal distribution. The limiting distribution for the smallest values in such samples is the Gumbel distribution, (RefLink[GumbelDistribution, paclet:ref/GumbelDistribution])[α,β]. The names "extreme value" and "Gumbel distribution" are sometimes used interchangeably because the distributions of the largest and smallest extreme values are related by a linear change of variable. The extreme value distribution is also sometimes referred to as the log-Weibull distribution because of logarithmic relationships between an extreme value-distributed random variable and a properly shifted and scaled Weibull-distributed random variable.

Some functions of statistical distributions.

The preceding table gives a list of some of the more common functions available for distributions in the Wolfram Language.

The cumulative distribution function (CDF) at x is given by the integral of the probability density function (PDF) up to x. The PDF can therefore be obtained by differentiating the CDF (perhaps in a generalized sense). In this package the distributions are represented in symbolic form. (RefLink[PDF, paclet:ref/PDF])[dist,x] evaluates the density at x if x is a numerical value, and otherwise leaves the function in symbolic form. Similarly, (RefLink[CDF, paclet:ref/CDF])[dist,x] gives the cumulative distribution.

The inverse CDF (RefLink[InverseCDF, paclet:ref/InverseCDF])[dist,q] gives the value of x at which (RefLink[CDF, paclet:ref/CDF])[dist,x] reaches q. The median is given by (RefLink[InverseCDF, paclet:ref/InverseCDF])[dist,1/2]. Quartiles, deciles, and percentiles are particular values of the inverse CDF. Quartile skewness is equivalent to ((Subscript[q, 1])-2(Subscript[q, 2])+(Subscript[q, 3]))/((Subscript[q, 3])-(Subscript[q, 1])), where (Subscript[q, 1]), (Subscript[q, 2]), and (Subscript[q, 3]) are the first, second, and third quartiles, respectively. Inverse CDFs are used in constructing confidence intervals for statistical parameters. (RefLink[InverseCDF, paclet:ref/InverseCDF])[dist,q] and (RefLink[Quantile, paclet:ref/Quantile])[dist,q] are equivalent for continuous distributions.

The mean (RefLink[Mean, paclet:ref/Mean])[dist] is the expectation of the random variable distributed according to dist and is usually denoted by μ. The mean is given by y∫x f(x)dx, where f(x) is the PDF of the distribution. The variance (RefLink[Variance, paclet:ref/Variance])[dist] is given by ∫(((x-μ))^2)f(x)dx. The square root of the variance is called the standard deviation, and is usually denoted by σ.

The (RefLink[Skewness, paclet:ref/Skewness])[dist] and (RefLink[Kurtosis, paclet:ref/Kurtosis])[dist] functions give shape statistics summarizing the asymmetry and the peakedness of a distribution, respectively. Skewness is given by (1/(σ^3))∫(((x-μ))^3)f(x)dx and kurtosis is given by (1/(σ^4))∫(((x-μ))^4)f(x)dx.

The characteristic function (RefLink[CharacteristicFunction, paclet:ref/CharacteristicFunction])[dist,t] is given by ϕ(t)==∫f(x)exp(itx)dx. In the discrete case, ϕ(t)==∑f(x)exp(itx). Each distribution has a unique characteristic function, which is sometimes used instead of the PDF to define a distribution.

The expected value (RefLink[Expectation, paclet:ref/Expectation])[g[x],x\[Distributed]dist] of a function g is given by ∫f(x)g(x)dx. In the discrete case, the expected value of g is given by ∑f(x)g(x).

(RefLink[RandomVariate, paclet:ref/RandomVariate])[dist] gives pseudorandom numbers from the specified distribution.

This gives a symbolic representation of the gamma distribution with α==3 and β==1:

gdist=GammaDistribution[3,1]

Here is the cumulative distribution function evaluated at 10:

CDF[gdist,10]

This is the cumulative distribution function. It is given in terms of the built-in function (RefLink[GammaRegularized, paclet:ref/GammaRegularized]):

cdfunction=CDF[gdist,x]

Here is a plot of the cumulative distribution function:

Plot[cdfunction,{x,0,10}]

This is a pseudorandom array with elements distributed according to the gamma distribution:

RandomVariate[gdist,5]