Gamma Type

Gamma distribution Sampling implementation based on: "A Simple Method for Generating Gamma Variables" - Marsaglia & Tsang ACM Transactions on Mathematical Software, Vol. 26, No. 3, September 2000, Pages 363-372. alpha = shape (k) beta = scale || 1 / rate (θ)

Static members

Static member Description

Gamma.CDF(alpha) (beta) (x)

Full Usage: Gamma.CDF(alpha) (beta) (x)

Parameters:
    alpha : float -
    beta : float -
    x : float -

Returns: float

Computes the cumulative distribution function.

alpha : float

beta : float

x : float

Returns: float

Example

Gamma.CheckParam(alpha) (beta)

Full Usage: Gamma.CheckParam(alpha) (beta)

Parameters:
    alpha : float
    beta : float

alpha : float
beta : float

Gamma.Estimate(observations, ?maxIter, ?tolerance)

Full Usage: Gamma.Estimate(observations, ?maxIter, ?tolerance)

Parameters:
    observations : float[]
    ?maxIter : int
    ?tolerance : float

Returns: ContinuousDistribution<float, float>

Estimates a new Gamma distribution from a given set of observations.

observations : float[]
?maxIter : int
?tolerance : float
Returns: ContinuousDistribution<float, float>

Gamma.Fit(observations, ?maxIter, ?tolerance)

Full Usage: Gamma.Fit(observations, ?maxIter, ?tolerance)

Parameters:
    observations : float[]
    ?maxIter : int
    ?tolerance : float

Returns: float * float

Fits the underlying distribution to a given set of observations.

observations : float[]
?maxIter : int
?tolerance : float
Returns: float * float

Gamma.FromMean(alpha) (mean)

Full Usage: Gamma.FromMean(alpha) (mean)

Parameters:
    alpha : float -
    mean : float -

Returns: ContinuousDistribution<float, float>

Initializes a Gamma distribution
alpha = shape (k)
beta = scale || 1 / rate (θ)

alpha : float

mean : float

Returns: ContinuousDistribution<float, float>

Example

Gamma.FromRate(shape) (rate)

Full Usage: Gamma.FromRate(shape) (rate)

Parameters:
    shape : float -
    rate : float -

Returns: ContinuousDistribution<float, float>

Initializes a Gamma distribution
alpha = shape (k)
beta = scale || 1 / rate (θ)

shape : float

rate : float

Returns: ContinuousDistribution<float, float>

Example

Gamma.Init(alpha) (beta)

Full Usage: Gamma.Init(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: ContinuousDistribution<float, float>

Initializes a Gamma distribution
alpha = shape (k)
beta = scale || 1 / rate (θ)

alpha : float

beta : float

Returns: ContinuousDistribution<float, float>

Example

Gamma.InvCDF(alpha) (beta) (x)

Full Usage: Gamma.InvCDF(alpha) (beta) (x)

Parameters:
    alpha : float -
    beta : float -
    x : 'a -

Returns: 'b

Computes the inverse cumulative distribution function (quantile function).

alpha : float

beta : float

x : 'a

Returns: 'b

Example

Gamma.Mean(alpha) (beta)

Full Usage: Gamma.Mean(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: float

Computes the mean.

alpha : float

beta : float

Returns: float

Example

Gamma.Mode(alpha) (beta)

Full Usage: Gamma.Mode(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: float

Computes the mode.

alpha : float

beta : float

Returns: float

Example

Gamma.PDF(alpha) (beta) (x)

Full Usage: Gamma.PDF(alpha) (beta) (x)

Parameters:
    alpha : float -
    beta : float -
    x : float -

Returns: float

Computes the probability density function.

alpha : float

beta : float

x : float

Returns: float

Example

Gamma.PDFLn(alpha) (beta) (x)

Full Usage: Gamma.PDFLn(alpha) (beta) (x)

Parameters:
    alpha : float -
    beta : float -
    x : float -

Returns: float

Computes the log probability density function.

alpha : float

beta : float

x : float

Returns: float

Example

Gamma.Sample(alpha) (beta)

Full Usage: Gamma.Sample(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: float

Produces a random sample using the current random number generator (from GetSampleGenerator()).

alpha : float

beta : float

Returns: float

Example

Gamma.SampleUnchecked(alpha) (beta)

Full Usage: Gamma.SampleUnchecked(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: float

Produces a random sample using the current random number generator (from GetSampleGenerator()).

alpha : float

beta : float

Returns: float

Example

Gamma.StandardDeviation(alpha) (beta)

Full Usage: Gamma.StandardDeviation(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: float

Computes the standard deviation.

alpha : float

beta : float

Returns: float

Example

Gamma.Support(alpha) (beta)

Full Usage: Gamma.Support(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: Interval<float>

Returns the support of the gamma distribution: [0, Positive Infinity).

alpha : float

beta : float

Returns: Interval<float>

Example

Gamma.ToString(alpha) (beta)

Full Usage: Gamma.ToString(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: string

A string representation of the distribution.

alpha : float

beta : float

Returns: string

Example

Gamma.Variance(alpha) (beta)

Full Usage: Gamma.Variance(alpha) (beta)

Parameters:
    alpha : float -
    beta : float -

Returns: float

Computes the variance.

alpha : float

beta : float

Returns: float

Example