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


The most commonly used probability distributions for univariate data analysis are those derived from the normal (Gaussian) distribution. This package contains normal, Student , chi-square and -ratio distributions, which are also included in the package Statistics`ContinuousDistributions`. If these distributions are all you need, you can save time by loading the Statistics`NormalDistribution` package instead of the larger Statistics`ContinuousDistributions`.
The distributions 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.

Standard probability distributions derived from the Gaussian distribution.

If each is a normal random variable with unit variance and mean zero, then has a chi-square 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 chi-square distribution is most typically used when describing the variance of normal samples.
A variable that has a Student

t distribution can also be written as a function of normal random variables. Let be a normal variable with unit variance and zero mean and be a chi-square variable with degrees of freedom. In this case, has a distribution with degrees of freedom. The Student distribution is symmetric about the vertical axis, and characterizes the ratio of a normal variable to its standard deviation. When , the distribution is the same as the Cauchy distribution.
The F-ratio distribution

is the distribution of the ratio of two chi-square variables divided by their respective degrees of freedom. It is commonly used when comparing the variances of two populations in hypothesis testing.

Functions of statistical distributions.

In this package distributions are represented in symbolic form. PDF[dist,x] evaluates the distribution at if is a numerical value, and otherwise leaves the function in symbolic form. Similarly, CDF[

dist,x] gives the cumulative distribution and Mean[dist] gives the mean of the specified distribution. For a more complete description of the various functions of statistical distributions, see the section that describes the package Statistics`ContinuousDistributions`.

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

  • Here is a symbolic representation of the normal distribution with zero mean and unit variance.
  • In[2]:= ndist = NormalDistribution[0, 1]


  • This gives its probability density function.
  • In[3]:= pdf = PDF[ndist, x]


  • You can make a plot of the density to observe its distribution.
  • In[4]:= Plot[pdf,{x, -3, 3}]

  • Here is the probability of the lower tail of the distribution, to the left of

  • In[5]:= CDF[ndist, -2]


  • This is the domain.
  • In[6]:= Domain[ndist]


  • This gives the expected value of a pure function with respect to the chi-square distribution with 5 degrees of freedom.
  • In[7]:= ExpectedValue[#^2&, ChiSquareDistribution[5]]


  • Here the function is expressed in terms of

  • In[8]:= ExpectedValue[x^2, ChiSquareDistribution[5], x]