gsl-random-0.3: Bindings the the GSL random number generation facilities.

Stability experimental Patrick Perry

GSL.Random.Dist

Description

Random number distributions. Functions for generating random variates and computing their probability distributions.

Synopsis

The Gaussian Distribution

General

`gaussianPdf x sigma` computes the probabililty density p(x) for a Gaussian distribution with mean `0` and standard deviation `sigma`.

`gaussianP x sigma` computes the cumulative distribution function P(x) for a Gaussian distribution with mean `0` and standard deviation `sigma`.

`gaussianQ x sigma` computes the cumulative distribution function Q(x) for a Gaussian distribution with mean `0` and standard deviation `sigma`.

`gaussianPInv p sigma` computes the inverse of the cumulative distribution function of a Gaussian distribution with mean `0` and standard deviation `sigma`. It returns `x` such that `P(x) = p`.

`gaussianPInv q sigma` computes the inverse of the cumulative distribution function of a Gaussian distribution with mean `0` and standard deviation `sigma`. It returns `x` such that `Q(x) = q`.

`getGaussian r sigma` gets a normal random variable with mean `0` and standard deviation `sigma`. This uses the Box-Mueller algorithm.

`getGaussianZiggurat r sigma` gets a normal random variable with mean `0` and standard deviation `sigma`. This uses the Marsaglia-Tsang ziggurat algorithm.

`getGaussianRatioMethod r sigma` gets a normal random variable with mean `0` and standard deviation `sigma`. This uses the Kinderman-Monahan-Leva ratio method.

Unit Variance

`ugaussianPdf x` computes the probabililty density p(x) for a Gaussian distribution with mean `0` and standard deviation `1`.

`ugaussianP x` computes the cumulative distribution function P(x) for a Gaussian distribution with mean `0` and standard deviation `1`.

`ugaussianQ x` computes the cumulative distribution function Q(x) for a Gaussian distribution with mean `0` and standard deviation `1`.

`ugaussianPInv p` computes the inverse of the cumulative distribution function of a Gaussian distribution with mean `0` and standard deviation `1`. It returns `x` such that `P(x) = p`.

`ugaussianPInv q` computes the inverse of the cumulative distribution function of a Gaussian distribution with mean `0` and standard deviation `1`. It returns `x` such that `Q(x) = q`.

`getUGaussian r` gets a normal random variable with mean `0` and standard deviation `1`. This uses the Box-Mueller algorithm.

`getUGaussianRatioMethod r` gets a normal random variable with mean `0` and standard deviation `1`. This uses the Kinderman-Monahan-Leva ratio method.

The Flat (Uniform) Distribution

`flatPdf x a b` computes the probability density `p(x)` at `x` for a uniform distribution from `a` to `b`.

`flatP x a b` computes the cumulative distribution function `P(x)`.

`flatQ x a b` computes the cumulative distribution function `Q(x)`.

`flatPInv p a b` computes the inverse of the cumulative distribution and returns `x` so that function `P(x) = p`.

`flatQInv q a b` computes the inverse of the cumulative distribution and returns `x` so that function `Q(x) = q`.

`getFlat r a b` gets a value uniformly chosen in `[a,b)`.

The Levy alpha-Stable Distributions

`getLevy r c alpha` gets a variate from the Levy symmetric stable distribution with scale `c` and exponent `alpha`. The algorithm only works for `0 <= alpha <= 2`.

`getLevySkew r c alpha beta` gets a variate from the Levy skew stable distribution with scale `c`, exponent `alpha`, and skewness parameter `beta`. The skewness parameter must lie in the range `[-1,1]`. The algorithm only works for `0 <= alpha <= 2`.

The Poisson Distribution

`poissonPdf k mu` evaluates the probability density `p(k)` at `k` for a Poisson distribution with mean `mu`.

`poissonP k mu` evaluates the cumulative distribution function `P(k)` at `k` for a Poisson distribution with mean `mu`.

`poissonQ k mu` evaluates the cumulative distribution function `Q(k)` at `k` for a Poisson distribution with mean `mu`.

`getPoisson r mu` gets a poisson random variable with mean `mu`.