# dist

package
Version: v0.0.0-...-eeaf01f Latest Latest

Go to latest
Published: Sep 13, 2021 License: GPL-2.0

## Documentation ¶

### Overview ¶

Package dist implements functions for discrete distributions.

### Constants ¶

This section is empty.

### Variables ¶

This section is empty.

### Functions ¶

#### func CDFBeta ¶

`func CDFBeta(x, pin, qin float64) float64`

CDFBeta returns distribution function of the standard form of the beta distribution, that is, the incomplete beta ratio I_x(p,q).

This is also known as the incomplete beta function ratio I_x(p, q)

#### func DiscreteBeta ¶

`func DiscreteBeta(p, q float64, K int, UseMedian bool, tmp, res []float64) []float64`

DiscreteBeta returns discrete beta distribution.

#### func DiscreteGamma ¶

`func DiscreteGamma(alpha, beta float64, K int, UseMedian bool, tmp, res []float64) []float64`

DiscreteGamma returns discrete gamma distribution.

#### func IncompleteGamma ¶

`func IncompleteGamma(x, alpha float64) (gin float64)`

IncompleteGamma returns the incomplete gamma ratio I(x,alpha) where x is the upper limit of the integration and alpha is the shape parameter.

#### func LnBeta ¶

`func LnBeta(p, q float64) float64`

LnBeta returns log of Beta function.

#### func QuantileBeta ¶

`func QuantileBeta(prob, p, q float64) float64`

QuantileBeta calculates the Quantile of the beta distribution

#### func QuantileChi2 ¶

`func QuantileChi2(prob, v float64) (ch float64)`

QuantileChi2 returns z so that Prob{x<z}=prob where x is Chi2 distributed with df=v

returns -1 if in error. 0.000002<prob<0.999998

RATNEST FORTRAN by Best DJ & Roberts DE (1975) The percentage points of the Chi2 distribution. Applied Statistics 24: 385-388. (AS91)

Converted into C by Ziheng Yang, Oct. 1993.

#### func QuantileGamma ¶

`func QuantileGamma(prob, alpha, beta float64) float64`

QuantileGamma returns quantile for gamma distribution.

#### func QuantileNormal ¶

`func QuantileNormal(prob float64) float64`

QuantileNormal returns quantile for normal distribution.

### Types ¶

This section is empty.