The module randist offer a set of functions that mirrors those available from the module rnd. Generally, for each kind of distribution a few functions are available to calculate the probability density, the cumulative probability and its inverse.
Continuous random number distributions are defined by a probability density function, p(x), such that the probability of x occurring in the infinitesimal range x to x+dx is p dx.
The cumulative distribution function for the lower tail P(x) is defined by the integral,
and gives the probability of a variate taking a value less than x.
The cumulative distribution function for the upper tail Q(x) is defined by the integral,
and gives the probability of a variate taking a value greater than x.
The upper and lower cumulative distribution functions are related by and satisfy , .
The inverse cumulative distributions, and give the values of x which correspond to a specific value of p or q. They can be used to find confidence limits from probability values.
For discrete distributions the probability of sampling the integer value k is given by , where . The cumulative distribution for the lower tail P(k) of a discrete distribution is defined as,
where the sum is over the allowed range of the distribution less than or equal to k.
The cumulative distribution for the upper tail of a discrete distribution Q(k) is defined as
giving the sum of probabilities for all values greater than k. These two definitions satisfy the identity .
If the range of the distribution is 1 to n inclusive then , while , .
The probability functions are named following an uniform naming convention. The probability density function end with the suffix _pdf. The cumulative functions and ends with the suffix _P and _Q respectively. The inverse cumulative functions and ends with the suffix _Pinv and _Qinv respectively.
We present here the list of the available probability functions.
Note
Actually GSL Shell implements all the functions provided by the GSL library but some of them are not listed here. Please consult the GSL reference manual if you need a complete list of all the distributions available.
See Laplace Distribution.
See t- Distribution.
See Cauchy Distribution.
See F- Distribution.
See Gamma Distribution.
See Beta Distribution.
See Poisson Distribution.