Continuous Distributions

Each of the distribution is prefixed with the required distribution for the function.  For instance, to obtain a random number from a Chi distribution the dbo.Chi_Rand function would be used.  The required parameters of the functions depend on the parameters of the distribution.  For instance, the Normal distribution takes the mean (mu) and standard deviation (sigma) parameters.  To determine the cumulative distribution for probability p = 0.75 of the Normal distribution with a mean of 5 and a standard deviation of 10 the transact-sql function in SQL Server is dbo.Normal_CDF(0.75, 5, 10).


Distribution Parameters Description

Double a
Double b

The beta distribution is a family of continuous probability distributions defined on the interval (0, 1) parametrized by two positive shape parameters, typically denoted by α and β. The beta distribution can be suited to the statistical modelling of proportions in applications where values of proportions equal to 0 or 1 do not occur.

There are a few special cases for the parametrization of the Beta distribution. When both shape parameters are positive infinity, the Beta distribution degenerates to a point distribution at 0.5. When one of the shape parameters is positive infinity, the distribution degenerates to a point distribution at the positive infinity. When both shape parameters are 0.0, the Beta distribution degenerates to a Bernoulli distribution with parameter 0.5. When one shape parameter is 0.0, the distribution degenerates to a point distribution at the non-zero shape parameter.  More Information.

Cauchy Double location
Double scale

The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution (after Hendrik Lorentz), Cauchy–Lorentz distribution, Lorentz(ian) function, or Breit–Wigner distribution.

The Cauchy distribution is often used in statistics as the canonical example of a "pathological" distribution. Its mean does not exist and its variance is infinite. The Cauchy distribution does not have finite moments of order greater than or equal to one; only fractional absolute moments exist. The Cauchy distribution has no moment generating function. More Information.

Chi Double df The Chi distribution usually arises when a k-dimensional vector's orthogonal components are independent and each follow a standard normal distribution. The length of the vector will then have a chi distribution.  It is the distribution of the square root of the sum of squares of independent random variables having a standard normal distribution. The most familiar example is the Maxwell distribution of (normalized) molecular speeds which is a chi distribution with 3 degrees of freedom (one for each spatial coordinate). More Information.
ChiSquare Double df

The Chi-Square distribution (also chi-squared or χ²-distribution) with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. It is one of the most widely used probability distributions in inferential statistics, e.g., in hypothesis testing or in construction of confidence intervals.  More Information.


Int shape
Double scale

The Erlang distribution is a continuous probability distribution with wide applicability primarily due to its relation to the exponential and Gamma distributions. The Erlang distribution was developed by A. K. Erlang to examine the number of telephone calls which might be made at the same time to the operators of the switching stations. This work on telephone traffic engineering has been expanded to consider waiting times in queueing systems in general. The distribution is now used in the fields of stochastic processes and of biomathematics. More Information.
Exponential Double lambda The exponential distribution (a.k.a. negative exponential distribution) is a family of continuous probability distributions. It describes the time between events in a Poisson process, i.e. a process in which events occur continuously and independently at a constant average rate. It is the continuous analogue of the geometric distribution. More Information.
F Double d1
Double d2
The F-distribution is a continuous probability distribution. It is also known as Snedecor's F distribution or the Fisher-Snedecor distribution (after R.A. Fisher and George W. Snedecor). The F-distribution arises frequently as the null distribution of a test statistic, most notably in the analysis of variance. More Information.

Double a
Double b

The gamma distribution is a two-parameter family of continuous probability distributions.  In this implementation the shape parameter a (alpha) α = k and an inverse scale parameter b(beta) β = 1⁄θ, called a rate parameter.  Therefore the scale parameter should be inversed for the θ implementation common in econometrics. More Information.

Int n
Int m

The Hypergeometric distribution describes the number of successes in a sequence of n draws from a finite population of size m without replacement, just as the binomial distribution describes the number of successes for draws with replacement. More Information.

Double a
Double b

The inverse gamma distribution is a two-parameter family of continuous probability distributions on the positive real line, which is the distribution of the reciprocal of a variable distributed according to the gamma distribution. Perhaps the chief use of the inverse gamma distribution is in Bayesian statistics, where it serves as the conjugate prior of the variance of a normal distribution.  More Information.
 Laplace Double location
Double scale
 The Laplace distribution is a continuous probability distribution named after Pierre-Simon Laplace. It is also sometimes called the double exponential distribution, because it can be thought of as two exponential distributions (with an additional location parameter) spliced together back-to-back, but the term double exponential distribution is also sometimes used to refer to the Gumbel distribution. More Information.
LogNormal Double mu
Double sigma
The log-normal distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed.  og-normal is also written log normal or lognormal. The distribution is occasionally referred to as the Galton distribution or Galton's distribution, after Francis Galton, and other names such as McAlister, Gibrat and Cobb-Douglas been associated.
Normal Double mu
Double sigma
The normal (or Gaussian) distribution is a continuous probability distribution that has a bell-shaped probability density function, known as the Gaussian function or informally the bell curve. More Information.
Pareto Double scale
Double shape
The Pareto distribution, named after the Italian economist Vilfredo Pareto, is a power law probability distribution that coincides with social, scientific, geophysical, actuarial, and many other types of observable phenomena. Outside the field of economics it is sometimes referred to as the Bradford distribution. More Information.
Rayleigh Double df A Rayleigh distribution is often observed when the overall magnitude of a vector is related to its directional components. One example where the Rayleigh distribution naturally arises is when wind speed is analyzed into its orthogonal 2-dimensional vector components. Assuming that the magnitude of each component is uncorrelated and normally distributed with equal variance, then the overall wind speed (vector magnitude) will be characterized by a Rayleigh distribution. More Information.
Stable Double a
Double b
Double scale
Double location
A random variable is said to be stable (or to have a stable distribution) if it has the property that a linear combination of two independent copies of the variable has the same distribution, up to location and scale parameters. The stable distribution family is also sometimes referred to as the Lévy alpha-stable distribution. More Information

Double location
Double scale
Double df

Student’s t-distribution (or simply the t-distribution) is a family of continuous probability distributions that arises when estimating the mean of a normally distributed population in situations where the sample size is small and population standard deviation is unknown. It plays a role in a number of widely used statistical analyses, including the Student’s t-test for assessing the statistical significance of the difference between two sample means, the construction of confidence intervals for the difference between two population means, and in linear regression analysis. The Student’s t-distribution also arises in the Bayesian analysis of data from a normal family. More Information.

Double lower
Double upper

The continuous uniform distribution or rectangular distribution is a family of probability distributions such that for each member of the family, all intervals of the same length on the distribution's support are equally probable. The support is defined by the two parameters, lower and upper a and b, which are its minimum and maximum values. The distribution is often abbreviated as U(a,b) where a is the "lower" and b is the "upper" parameter. It is the maximum entropy probability distribution for a random variate X under no constraint other than that it is contained in the distribution's support. More Information.

Double scale
Double shape

The Weibull distribution is related to a number of other probability distributions; in particular, it interpolates between the exponential distribution (k = 1) and the Rayleigh distribution (k = 2).  If the quantity x is a "time-to-failure", the Weibull distribution gives a distribution for which the failure rate is proportional to a power of time. The shape parameter, k, is that power plus one, and so this parameter can be interpreted directly as follows:
  • A value of k<1 indicates that the failure rate decreases over time. This happens if there is significant "infant mortality", or defective items failing early and the failure rate decreasing over time as the defective items are weeded out of the population.
  • A value of k=1 indicates that the failure rate is constant over time. This might suggest random external events are causing mortality, or failure.
  • A value of k>1 indicates that the failure rate increases with time. This happens if there is an "aging" process, or parts that are more likely to fail as time goes on.
In the field of materials science, the shape parameter k of a distribution of strengths is known as the Weibull modulus. More Information.
Z   This is a normal distribution with a mean (mu) of 0 and standard deviation (sigma) of 1.  This is not to be confused with Fisher's Z distribution.



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_PDF(x) The Log value of the Probability Density 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.
PDF(x) Probability Density 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