Distribution Densities Library

Revision as of 22:38, 6 August 2008 by Lchrisman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Distribution Densities library is a library that ships with Analytica. The library contains functions that analytically (i.e., without sampling) compute the probability density at a point, cumulative probability at a point and inverse cumulative probability for many distributions.

If you have Analytica 4.1.1 (or earlier) currently installed, a new expanded version of this library is now available. The newest version contains a complete set of density functions for all continuous distributions, probability functions for all discrete distributions, as well as cumulative and inverse cumulative probability functions for almost all continuous built-in distributions.

All functions here take a first parameter, indicating the point where the function is being computed, followed by exactly the same parameters that the corresponding distribution function takes.

Density Functions

For each continuous distribution, the library contains a function prefixed by Dens_, then the name of the distribution, which computes the probability density at a point. The parameters after the first are the same as the corresponding distribution function. So, for example, to find the density of a Normal(5,7) distribution at x=3, we would use:

Dens_Normal(3,5,7) &arr; 0.05471

Probability densities are, of course, used for many purposes in statistics. One area where they are needed, for example, is for importance sampling.

Probability Functions

For each discrete distribution, the library contains a corresponding function prefixed with the name Prob_ that computes the probability at the value k. The first parameter is the point k, for which the desired probability is desired, followed by the same parameters used by the corresponding distribution function. So, for example, to find the probability that a sample drawn from a Binomial(10,0.7) distribution is equal to 4, we would use:

Prob_Binomial(4,10,0.7) &arr; 0.03676

Cumulative Probability Functions

These exist for univariate distributions, both continuous and discrete. They return the probability area to the left of and at the indicated value. These consist of functions prefixed with Cum, followed by the distribution name. A few of the more difficult cumulative distribution functions are already built into Analytica, and are not repeated in this library, for example CumNormal, BetaI, and GammaI. The BetaI and GammaI functions are the only ones that deviate from the CumDist naming convention, which occurs because these particular functions more often are refered to as the incomplete beta function and incomplete gamma function.

To find the cumulative probability to the left of 5.5 in a Logistic(10) distribution, use:

CumLogistic(5.5,10) &arr; 0.01099

The collection also contains cumulative distribution functions for the F-Distribution, CumFDist and CumFDistInv, functions often used in classical hypothesis testing, even though these aren't built-in distributions in Analytica.

Inverse Cumulative Probability Functions

Inverse cumulative distribution functions return the value where the probability mass to the left of the value is equal to the given value. These are included for all built-in parametric continuous distributions.

Listing of functions in this library

= Continuous Distributions

Distribution Function Density Function Cumulative Density Function Inverse Cumulative Function
Beta(a,b) Dens_Beta(x,a,b) CumBeta(x,a,b) CumBetaInv(p,a,b)

Discrete Distributions

See Also

Comments


You are not allowed to post comments.