Command Reference : Operator and Function Reference : Statistical Distribution Functions
Statistical Distribution Functions
Additional Distribution Related Functions
The following functions provide access to the density or probability functions, cumulative distribution, quantile functions, and random number generators for a number of standard statistical distributions.
There are four functions associated with each distribution. The first character of each function name identifies the type of function:
Function Type
Beginning of Name
Cumulative distribution (CDF)
Density or probability
Quantile (inverse CDF)
Random number generator
The remainder of the function name identifies the distribution. For example, the functions for the beta distribution are @cbeta, @dbeta, @qbeta and @rbeta.
When used with series arguments, EViews will evaluate the function for each observation in the current sample. As with other functions, NA or invalid inputs will yield NA values. For values outside of the support, the functions will return zero.
Note that the CDFs are assumed to be right-continuous: . The quantile functions will return the smallest value where the CDF evaluated at the value equals or exceeds the probability of interest: , where . The inequalities are only relevant for discrete distributions.
Many of the cumulative distribution functions take an optional argument at the end of the options list ([,n]). Non-zero values tell EViews to compute the upper tail of the CDF.
The information provided below should be sufficient to identify the meaning of the parameters for each distribution.
Density/Probability Function
@cbeta(x,a,b[,n]), @dbeta(x,a,b), @qbeta(p,a,b), @rbeta(a,b)
for and for , where is the @beta function.
@cbinom(x,n,p), @dbinom(x,n,p), @qbinom(s,n,p), @rbinom(n,p)
if , and 0 otherwise, for .
@cchisq(x,v[,n]), @dchisq(x,v), @qchisq(p,v), @rchisq(v)
where , and . Note that the degrees of freedom parameter need not be an integer.
In addition, the @chisq(x,v) function may be used to obtain the p-values directly.
for , and .
Extreme Value
(Type I-minimum)
@cextreme(x[,n]), @dextreme(x), @qextreme(p), @cloglog(p), @rextreme
for .
@cfdist(x,v1,v2[,n]), @dfdist(x,v1,v2), @qfdist(p,v1,v2), @rfdist(v1,v1)
where , and . Note that the functions allow for fractional degrees of freedom parameters and .
@cgamma(x,b,r[,n]), @dgamma(x,b,r), @qgamma(p,b,r), @rgamma(b,r)
where , and .
Generalized Error
where , and .
@claplace(x[,n]), @dlaplace(x), @qlaplace(x), @rlaplace
for .
@clogistic(x[,n]), @dlogistic(x), @qlogistic(p), @rlogistic
for .
@clognorm(x,m,s[,n]), @dlognorm(x,m,s), @qlognorm(p,m,s), @rlognorm(m,s)
, , and .
Negative Binomial
@cnegbin(x,n,p), @dnegbin(x,n,p), @qnegbin(s,n,p), @rnegbin(n,p)
if , and 0 otherwise, for .
Normal (Gaussian)
@rnorm, nrnd, @logcnorm
for . @logcnorm is a more numerically stable function for the computation of @log(@cnorm(x))
@cpoisson(x,m), @dpoisson(x,m), @qpoisson(p,m), @rpoisson(m)
if , and 0 otherwise, for .
@cpareto(x,k,a[,n]), @dpareto(x,k,a), @qpareto(p,k,a), @rpareto(k,a)
for location parameter and shape parameter .
Student's ‑distribution
@ctdist(x,v[,n]), @dtdist(x,v), @qtdist(p,v), @rtdist(v)
for , and . Note that , yields the Cauchy distribution.
@runif(a,b), rnd
for and .
@cweib(x,m,a[,n]), @dweib(x,m,a), @qweib(p,m,a), @rweib(m,a)
where , and .
Additional Distribution Related Functions
The following utility functions were designed to facilitate the computation of p-values for common statistical tests. While these results may be derived using the distributional functions above, they are retained for convenience and backward compatibility.
Returns the probability that a Chi-squared statistic with degrees of freedom exceeds :
Probability that an F-statistic with numerator degrees of freedom and denominator degrees of freedom exceeds :
Probability that a t-statistic with degrees of freedom exceeds in absolute value (two-sided p-value):