Random variable and distribution functions
Random variable and distribution function keywords
are all of the form prefix.suffix
, where the prefix specifies the function to be applied to the distribution
and the suffix specifies the distribution.
- Random variable and distribution functions take both constants and variables for arguments.
- A function argument, if required, must come first and is denoted by x (quantile, which must fall in the range of values for the distribution) for cumulative distribution and probability density functions and p (probability) for inverse distribution functions.
- All random variable and distribution functions must specify distribution parameters as noted in their definitions.
- All arguments are real numbers.
- Restrictions to distribution parameters apply to all functions for that distribution. Restrictions for the function parameter x apply to that particular distribution function. The program issues a warning and returns system-missing when it encounters an out-of-range value for an argument.
The following are possible prefixes:
CDF. Cumulative
distribution function. A cumulative distribution function CDF.d_spec(x,a,...)
returns a probability p that a variate with the specified distribution
(d_spec
) falls below x for continuous functions and at or below x for discrete functions.
IDF. Inverse distribution
function. Inverse distribution functions are not available
for discrete distributions. An inverse distribution function IDF.d_spec(p,a,...)
returns a value x such that CDF.d_spec(x,a,...)=
p with the specified distribution
(d_spec
).
PDF. Probability
density function. A probability density function PDF.d_spec(x,a,...)
returns the density
of the specified distribution (d_spec
) at x for continuous functions
and the probability that a random variable with the specified distribution
equals x for discrete functions.
RV. Random number
generation function. A random number generation function RV.d_spec(a,...)
generates an independent
observation with the specified distribution (d_spec
).
NCDF. Noncentral
cumulative distribution function. A noncentral distribution
function NCDF.d_spec(x,a,b,...)
returns a probability p that
a variate with the specified noncentral distribution falls below x. It is available only for beta, chi-square, F, and Student’s t.
NPDF. Noncentral
probability density function. A noncentral probability
density function NCDF.d_spec(x,a,...)
returns the density of the specified distribution (d_spec
) at x. It is available only for beta, chi-square, F, and Student’s t.
SIG. Tail probability
function. A tail probability function SIG.d_spec(x,a,...)
returns a probability p that a variate with the specified distribution
(d_spec
) is larger than x. The tail probability function is equal
to 1 minus the cumulative distribution function.
The following are suffixes for continuous distributions:
BETA. Beta distribution. The beta distribution takes values in the range 0<x<1 and has two shape parameters, α and β. Both α and β must be positive, and they have the property that the mean of the distribution is α/(α+β).
Noncentral beta distribution. The noncentral beta distribution is a generalization of the beta distribution that takes values in the range 0<x<1 and has an extra noncentrality parameter, λ, which must be greater than or equal to 0.
BVNOR. Bivariate normal distribution. The bivariate normal distribution takes real values and has one correlation parameter, ρ, which must be between –1 and 1, inclusive.
CAUCHY. Cauchy distribution. The Cauchy distribution takes real values and has a location parameter, θ, and a scale parameter, ς; ς must be positive. The Cauchy distribution is symmetric about the location parameter, but has such slowly decaying tails that the distribution does not have a computable mean.
CHISQ. Chi-square distribution. The chi-square(ν) distribution takes values in the range x>=0 and has one degrees of freedom parameter, ν; it must be positive and has the property that the mean of the distribution is ν.
Noncentral chi-square distribution. The noncentral chi-square distribution is a generalization of the chi-square distribution that takes values in the range x>=0 and has an extra noncentrality parameter, λ, which must be greater than or equal to 0.
EXP. Exponential distribution. The exponential distribution takes values in the range x>=0 and has one scale parameter, β, which must be greater than 0 and has the property that the mean of the distribution is 1/β.
F. F distribution. The F distribution takes values in the range x>=0 and has two degrees of freedom parameters, ν1 and ν2, which are the "numerator" and "denominator" degrees of freedom, respectively. Both ν1 and ν2 must be positive.
Noncentral F distribution. The noncentral F distribution is a generalization of the F distribution that takes values in the range x>=0 and has an extra noncentrality parameter, λ, which must be greater than or equal to 0.
GAMMA. Gamma distribution. The gamma distribution takes values in the range x>=0 and has one shape parameter, α, and one scale parameter, β. Both parameters must be positive and have the property that the mean of the distribution is α/β.
HALFNRM. Half-normal distribution. The half-normal distribution takes values in the range x>=μ and has one location parameter, μ, and one scale parameter, σ. Parameter σ must be positive.
IGAUSS. Inverse Gaussian distribution. The inverse Gaussian, or Wald, distribution takes values in the range x>0 and has two parameters, μ and λ, both of which must be positive. The distribution has mean μ.
LAPLACE. Laplace or double exponential distribution. The Laplace distribution takes real values and has one location parameter, μ, and one scale parameter, β. Parameter β must be positive. The distribution is symmetric about μ and has exponentially decaying tails.
LOGISTIC. Logistic distribution. The logistic distribution takes real values and has one location parameter, μ, and one scale parameter, ς. Parameter ς must be positive. The distribution is symmetric about μ and has longer tails than the normal distribution.
LNORMAL. Lognormal distribution. The lognormal distribution takes values in the range x>=0 and has two parameters, η and σ, both of which must be positive.
NORMAL. Normal distribution. The normal, or Gaussian, distribution takes real values and has one location parameter, μ, and one scale parameter, σ. Parameter σ must be positive. The distribution has mean μ and standard deviation σ.
Three functions in releases earlier than 6.0 are special cases
of the normal distribution functions: CDFNORM(arg)=CDF.NORMAL(x,0,1)
, where arg
is x; PROBIT(arg)=IDF.NORMAL(p,0,1)
, where arg
is p; and NORMAL(arg)=RV.NORMAL(0,σ)
, where arg
is σ.
PARETO. Pareto distribution. The Pareto distribution takes values in the range xmin<x and has a threshold parameter, xmin, and a shape parameter, α. Both parameters must be positive.
SMOD. Studentized maximum modulus distribution. The Studentized maximum modulus distribution takes values in the range x>0 and has a number of comparisons parameter, k*, and degrees of freedom parameter, ν, both of which must be greater than or equal to 1.
SRANGE. Studentized range distribution. The Studentized range distribution takes values in the range x>0 and has a number of samples parameter, k, and degrees of freedom parameter, ν, both of which must be greater than or equal to 1.
T. Student t distribution. The Student t distribution takes real values and has one degrees of freedom parameter, ν, which must be positive. The Student t distribution is symmetric about 0.
Noncentral t distribution. The noncentral t distribution is a generalization of the t distribution that takes real values and has an extra noncentrality parameter, λ, which must be greater than or equal to 0. When λ equals 0, this distribution reduces to the t distribution.
UNIFORM. Uniform distribution. The uniform distribution takes values in the range a<x<b and has a minimum value parameter, a, and a maximum value parameter, b.
The uniform random number function in releases earlier than 6.0
is a special case: UNIFORM(arg)=RV.UNIFORM(0,b)
, where arg
is parameter b. Among other uses, the uniform distribution
commonly models the round-off error.
WEIBULL. Weibull distribution. The Weibull distribution takes values in the range x>=0 and has one scale parameter, β, and one shape parameter, α, both of which must be positive.
The following are suffixes for discrete distributions:
BERNOULLI. Bernoulli distribution. The Bernoulli distribution takes values 0 or 1 and has one success probability parameter, θ, which must be between 0 and 1, inclusive.
BINOM. Binomial distribution. The binomial distribution takes integer values 0<=x<=n, representing the number of successes in n trials, and has one number of trials parameter, n, and one success probability parameter, θ. Parameter n must be a positive integer and parameter θ must be between 0 and 1, inclusive.
GEOM. Geometric distribution. The geometric distribution takes integer values x>=1, representing the number of trials needed (including the last trial) before a success is observed, and has one success probability parameter, θ, which must be between 0 and 1, inclusive.
HYPER. Hypergeometric distribution. The hypergeometric distribution takes integer values in the range max(0, Np+n−N)<=x<=min(Np,n), and has three parameters, N, n, and Np, where N is the total number of objects in an urn model, n is the number of objects randomly drawn without replacement from the urn, Np is the number of objects with a given characteristic, and x is the number of objects with the given characteristic observed out of the withdrawn objects. All three parameters are positive integers, and both n and Np must be less than or equal to N.
NEGBIN. Negative binomial distribution. The negative binomial distribution takes integer values in the range x>=r, where x is the number of trials needed (including the last trial) before r successes are observed, and has one threshold parameter, r, and one success probability parameter, θ. Parameter r must be a positive integer and parameter θ must be greater than 0 and less than or equal to 1.
POISSON. Poisson distribution. The Poisson distribution takes integer values in the range x>=0 and has one rate or mean parameter, λ. Parameter λ must be positive.