This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Add-ons / Standard Packages / Statistics  /

Statistics`ContinuousDistributions`

This package gives you access to the most commonly used continuous statistical distributions. You can compute their densities, means, variances, and other related properties. The distributions themselves are represented in the symbolic form name[

,

, ... ]. Functions such as Mean, which give properties of statistical distributions, take the symbolic representation of the distribution as an argument.
Several of the most commonly used distributions are derived from the normal or Gaussian distribution. These distributions can also be found in the NormalDistribution package. You should use NormalDistribution instead of this package when you need only the normal, Student , chi-square, or -ratio distributions. Descriptions of these four distributions are given in more detail in the NormalDistribution section. The package DiscreteDistributions

contains many discrete statistical distributions.


Common distributions derived from the normal distribution.


Continuous statistical distributions.

The uniform distributionUniformDistribution[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. If is uniformly distributed on [, ], then the random variable follows a Cauchy distribution

CauchyDistribution[a,b], with and .
The lognormal distribution

LogNormalDistribution[mu,sigma] 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 halfnormal distributionHalfNormalDistribution[theta] is proportional to the distribution NormalDistribution[0,1/(thetaSqrt[2/Pi])] limited to the domain [0, ).
When and , the gamma distribution

GammaDistribution[alpha,lambda] describes the distribution of a sum of squares of unit normal random variables. This form of the gamma distribution is called a chi-square distribution with degrees of freedom. When , the gamma distribution takes on the form of the exponential distribution

ExponentialDistribution[lambda], often used in describing the waiting time between events.
The chi distributionChiDistribution[n] is followed by the square root of a chi-square random variable. For , the chi distribution is identical to HalfNormalDistribution[

theta] with . For , the chi distribution is identical to the Rayleigh distribution

RayleighDistribution[sigma] with .
When and have independent gamma distributions with equal scale parameters, the random variable follows the beta distribution

BetaDistribution[alpha,beta], where and are the shape parameters of the gamma variables.
The Weibull distribution

WeibullDistribution[alpha,beta] is commonly used in engineering to describe the lifetime of an object. The extreme value distributionExtremeValueDistribution[alpha,beta] is the limiting distribution for the smallest or largest values in large samples drawn from a variety of distributions, including the normal distribution. The extreme value distribution is sometimes referred to as the log-Weibull distribution because it describes the distribution of the log of a Weibull distributed random variable.
The Laplace distributionLaplaceDistribution[mu,beta] is the distribution of the difference of two independent random variables with identical exponential distributions. The logistic distributionLogisticDistribution[mu,beta] is frequently used in place of the normal distribution when a distribution with longer "tails" is desired.
The Pareto distributionParetoDistribution[k,alpha] may be used to describe income,

representing the minimum income possible.


Distributions with noncentrality parameters.

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 and nonzero means follows a noncentral chi-square distribution

NoncentralChiSquareDistribution[n,lambda]. 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, or is used as the noncentrality parameter.
The noncentral Student

t distributionNoncentralStudentTDistribution[n,lambda] describes the ratio where is a central chi-square random variable with degrees of freedom, and is an independent normally distributed random variable with variance and mean .
The noncentral

F-ratio distributionNoncentralFRatioDistribution[

,

,lambda] is the distribution of the ratio of a noncentral chi-square random variable with noncentrality parameter and degrees of freedom to a central chi-square random variable with

degrees of freedom.


Functions of statistical distributions.

The cumulative distribution function (cdf) at is given by the integral of the probability density function (pdf) up to . 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. PDF[

dist,x] evaluates the density at if is a numerical value, and otherwise leaves the function in symbolic form. Similarly, CDF[

dist,x] gives the cumulative distribution. Domain[dist] gives the domain of PDF[dist,x] and CDF[dist,x].
The quantile Quantile[dist,q] is effectively the inverse of the cdf. It gives the value of at which CDF[

dist,x] reaches . The median is given by Quantile[

dist,1/2]; quartiles, deciles and percentiles can also be expressed as quantiles. Quantiles are used in constructing confidence intervals for statistical parameters.
The mean Mean[dist] is the expectation of the random variable distributed according to and is usually denoted by . The mean is given by , where is the pdf of the distribution. The variance Variance[

dist] is given by . The square root of the variance is called the standard deviation, and is usually denoted by .
The Skewness[

dist] and Kurtosis[dist] functions give shape statistics summarizing the asymmetry and the peakedness of a distribution, respectively. Skewness is given by and kurtosis is given by .
The characteristic function CharacteristicFunction[

dist, t] is given by . In the discrete case,
. Each distribution has a unique characteristic function, which is sometimes used instead of the pdf to define a distribution.
Random[
dist] gives pseudorandom numbers from the specified distribution. It can be used with a seed like other built-in forms of Random, as described in the section on pseudorandom numbers in The Mathematica Book.

  • This loads the package.
  • In[1]:= <<Statistics`ContinuousDistributions`

  • This gives a symbolic representation of the gamma distribution with as the shape parameter and

    as the scale parameter.
  • In[2]:= gdist = GammaDistribution[3, 1]

    Out[2]=

  • Here is the cumulative distribution function evaluated at

    .
  • In[3]:= CDF[gdist, 10]

    Out[3]=

  • This is the cumulative distribution function. It is given in terms of the built-in function GammaRegularized.
  • In[4]:= cdfunction = CDF[gdist, x]

    Out[4]=

  • Here is a plot of the cumulative distribution function.
  • In[5]:= Plot[cdfunction, {x, 0, 10}]


  • This is a pseudorandom array with elements distributed according to the gamma distribution.
  • In[6]:= RandomArray[gdist, 5]

    Out[6]=