This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Add-ons & Links / Standard Packages / Statistics /


This package provides support for several important multivariate discrete distributions: the multinomial, negative multinomial, and multiple Poisson distributions.

Distributions are usually represented in the symbolic form name[, , ... ]. When there are many parameters, they may be organized into a list; an example of this is the probability vector parameterizing the multinomial and negative multinomial distributions. Functions such as Mean, which give properties of statistical distributions, take the symbolic representation of the distribution as an argument.

Discrete multivariate probability distributions.

A -variate multinomial distribution with index and probability vector may be used to describe a series of independent trials, in each of which just one of mutually exclusive events is observed with probability , .

A -variate negative multinomial distribution with success count and failure probability vector may be used to describe a series of independent trials, in each of which there may be a success or one of mutually exclusive modes of failure. The failure mode is observed with probability , , and the trials are discontinued when successes are observed.

A -variate multiple Poisson distribution with mean vector is a common way to generalize the univariate Poisson distribution. Here the random -vector following this distribution is equivalent to , where is a Poisson random variable with mean , .

Functions of univariate statistical distributions applicable to multivariate distributions.

In this package distributions are represented in symbolic form. Generally, PDF[dist, x] evaluates the density at if is a vector, and otherwise leaves the function in symbolic form. Similarly, CDF[dist, x] gives the cumulative density and CharacteristicFunction[dist, t] gives the characteristic function of the specified distribution.

Note that for a vector-valued distribution, functions like Mean, Variance, and Kurtosis give a vector-valued result since they are applied to each coordinate of the vector.

This loads the package.

In[1]:= <<Statistics`MultiDiscreteDistributions`

Here is a symbolic representation of a bivariate multinomial distribution.

In[2]:= (p = {.4, .6};
mdist = MultinomialDistribution[10, p])


This gives its probability density function.

In[3]:= pdf = PDF[mdist, {x1, x2}]


You can make a plot of the density to observe its distribution.

In[4]:= (r = Range[0, 10]; t = Transpose[{r + .5, r}];
Table[pdf, {x1, 0, 10}, {x2, 0, 10}],
FrameTicks -> {t, t}])


Here is the probability of the distribution in the region .

In[5]:= CDF[mdist, {6, 7}]


This gives the mean vectors of the trivariate versions of the three distributions.

In[6]:= {Mean[MultinomialDistribution[n, {p1, p2, p3}]],
Mean[NegativeMultinomialDistribution[n, {p1, p2, p3}]],
Mean[MultiPoissonDistribution[mu0, {mu1, mu2, mu3}]]}


Here is a sample from each of the distributions.

In[7]:= {Random[MultinomialDistribution[10, {.2, .3, .5}]],
Random[NegativeMultinomialDistribution[5, {2/15, 1/5, 1/3}]],
Random[MultiPoissonDistribution[1, {1, 2, 4}]]}


Functions of vector-valued multivariate statistical distributions.

The covariance for the bivariate form of the distributions is given here. The covariance is negative for the multinomial distribution, but positive for the negative multinomial and multiple Poisson.

In[8]:= {CovarianceMatrix[
MultinomialDistribution[n, {p1, p2}]
][[1, 2]],
NegativeMultinomialDistribution[n, {p1, p2}]
][[1, 2]],
MultiPoissonDistribution[mu0, {mu1, mu2}]
][[1, 2]]}