Discrete Distributions

The functions described here are among the most commonly used discrete 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. "Continuous Distributions" describes many continuous statistical distributions.

Discrete statistical distributions.

Most of the common discrete statistical distributions can be understood by considering a sequence of trials, each with two possible outcomes, for example, success and failure.

The Bernoulli distribution (RefLink[BernoulliDistribution, paclet:ref/BernoulliDistribution])[p] is the probability distribution for a single trial in which success, corresponding to value 1, occurs with probability p, and failure, corresponding to value 0, occurs with probability 1-p.

The binomial distribution (RefLink[BinomialDistribution, paclet:ref/BinomialDistribution])[n,p] is the distribution of the number of successes that occur in n independent trials, where the probability of success in each trial is p.

The negative binomial distribution (RefLink[NegativeBinomialDistribution, paclet:ref/NegativeBinomialDistribution])[n,p] for positive integer n is the distribution of the number of failures that occur in a sequence of trials before n successes have occurred, where the probability of success in each trial is p. The distribution is defined for any positive n, though the interpretation of n as the number of successes and p as the success probability no longer holds if n is not an integer.

The beta binomial distribution (RefLink[BetaBinomialDistribution, paclet:ref/BetaBinomialDistribution])[α,β,n] is a mixture of binomial and beta distributions. A (RefLink[BetaBinomialDistribution, paclet:ref/BetaBinomialDistribution])[α,β,n] random variable follows a (RefLink[BinomialDistribution, paclet:ref/BinomialDistribution])[n,p] distribution, where the success probability p is itself a random variable following the beta distribution (RefLink[BetaDistribution, paclet:ref/BetaDistribution])[α,β]. The beta negative binomial distribution (RefLink[BetaNegativeBinomialDistribution, paclet:ref/BetaNegativeBinomialDistribution])[α,β,n] is a similar mixture of the beta and negative binomial distributions.

The geometric distribution (RefLink[GeometricDistribution, paclet:ref/GeometricDistribution])[p] is the distribution of the total number of trials before the first success occurs, where the probability of success in each trial is p.

The hypergeometric distribution (RefLink[HypergeometricDistribution, paclet:ref/HypergeometricDistribution])[n,(Subscript[n, succ]),(Subscript[n, tot])] is used in place of the binomial distribution for experiments in which the n trials correspond to sampling without replacement from a population of size (Subscript[n, tot]) with (Subscript[n, succ]) potential successes.

The discrete uniform distribution (RefLink[DiscreteUniformDistribution, paclet:ref/DiscreteUniformDistribution])[{(Subscript[i, min]),(Subscript[i, max])}] represents an experiment with multiple equally probable outcomes represented by integers (Subscript[i, min]) through (Subscript[i, max]).

The Poisson distribution (RefLink[PoissonDistribution, paclet:ref/PoissonDistribution])[μ] describes the number of events that occur in a given time period where μ is the average number of events per period.

The terms in the series expansion of log(1-θ) about θ==0 are proportional to the probabilities of a discrete random variable following the logarithmic series distribution (RefLink[LogSeriesDistribution, paclet:ref/LogSeriesDistribution])[θ]. The distribution of the number of items of a product purchased by a buyer in a specified interval is sometimes modeled by this distribution.

The Zipf distribution (RefLink[ZipfDistribution, paclet:ref/ZipfDistribution])[ρ], sometimes referred to as the zeta distribution, was first used in linguistics and its use has been extended to model rare events.

Some functions of statistical distributions.

Distributions are represented in symbolic form. (RefLink[PDF, paclet:ref/PDF])[dist,x] evaluates the mass function at x if x is a numerical value, and otherwise leaves the function in symbolic form whenever possible. Similarly, (RefLink[CDF, paclet:ref/CDF])[dist,x] gives the cumulative distribution and (RefLink[Mean, paclet:ref/Mean])[dist] gives the mean of the specified distribution. The table above gives a sampling of some of the more common functions available for distributions. For a more complete description of these functions, see the description of their continuous analogues in "Continuous Distributions".

Here is a symbolic representation of the binomial distribution for 34 trials, each having probability 0.3 of success:

bdist=BinomialDistribution[34,0.3]

This is the mean of the distribution:

Mean[bdist]

You can get the expression for the mean by using symbolic variables as arguments:

Mean[BinomialDistribution[n,p]]

Here is the 50% quantile, which is equal to the median:

Quantile[bdist,0.5]

This gives the expected value of (x^3) with respect to the binomial distribution:

Expectation[x^3,x\[Distributed] bdist]

The elements of this matrix are pseudorandom numbers from the binomial distribution:

RandomVariate[bdist,{2,3}]