Discrete Distributions

Each of the distribution is prefixed with the required distribution for the function.  For instance, to obtain a random number from a Bernoulli distribution the dbo.Bernoulli_Rand function would be used.  The required parameters of the functions depend on the parameters of the distribution.  For instance, the Discrete Uniform distribution takes the lower and upper parameters.  To determine the cumulative distribution for probability p = 0.75 of the Discrete Uniform with a lower of 5 and an upper of 10 the transact-sql function in SQL Server is dbo.DiscreteUniform_CDF(0.75, 5, 10)

Distributions

Distribution Parameters Description
Bernoulli Double p The Bernoulli distribution, named after Swiss scientist Jacob Bernoulli, is a discrete probability distribution, which takes value 1 with success probability p and value 0 with failure probability q = 1 - p  More Information.
ConwayMaxwellPoisson Double lambda
Double nu
The Conway–Maxwell–Poisson (CMP or COM-Poisson) distribution is a discrete probability distribution named after Richard W. Conway, William L. Maxwell, and Siméon Denis Poisson that generalizes the Poisson distribution by adding a parameter to model overdispersion and underdispersion. It is a member of the exponential family, has the Poisson distribution and geometric distribution as special cases and the Bernoulli distribution as a limiting case.  It is parameterized by two real numbers "lambda" and "nu" More Information.
DiscreteUniform

Double lower
Double upper

The discrete uniform distribution is a probability distribution whereby a finite number of equally spaced values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of equally spaced outcomes equally likely to happen." More Information.
Geometric Double p The probability distribution of the number of X Bernoulli trials needed to get one success, supported on the set { 1, 2, 3, ...}. This implementation of the Geometric distribution will never generate 0's. More Information.
Hypergeometric

Int populationSize
Int m
Int n

The hypergeometric distribution is a discrete probability distribution that describes the probability of m successes in n draws from a finite population of size "populationSize" containing successes without replacement. More Information.
Poisson

Double lambda

The Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time and/or space if these events occur with a known average rate and independently of the time since the last event. The Poisson distribution can also be used for the number of events in other specified intervals such as distance, area or volume. More Information.
Zipf

Double s
Int n

Zipf's law, an empirical law formulated using mathematical statistics, refers to the fact that many types of data studied in the physical and social sciences can be approximated with a Zipfian distribution, one of a family of related discrete power law probability distributions. The Zipf distribution is sometimes called the discrete Pareto distribution because it is analogous to the continuous Pareto distribution in the same way that the discrete uniform distribution is analogous to the continuous uniform distribution. More Information.
 

Functions

Function Description
CDF(p) Cumulative Distribution Function. This is the probability that a real-valued random variable "p" will be found at a value less than or equal to p. Intuitively, it is the "area so far" function of the probability distribution. More Information.
Entropy A measure of the uncertainty associated with a random variable. More Information.
Log_PMF(k) The Log value of the Probability Mass Function.
Mean The arithmetic mean.
Median The numerical value separating the higher half of the probability distribution from the lower half.
Mode The mode is the number that appears most often in the distribution.
PMF(k) Probability Mass Function.  The probability that a discrete random variable is exactly equal to some value. More Information.
Precision The reciprocal of the variance.
Skewness The skewness is a measure of the asymmetry of the probability distribution.
StdDev The standard deviation is a measure of dispersion of the probability distribution and is the square root of the variance.
Rand A random number generated from the probability distribution.
Variance The variance is a measure of how far a set of numbers is spread out.

Purchase SQL Math