Documentation ¶
Index ¶
- func DirichletWinner(alphas []float64, tol float64) []float64
- type BetaPrime
- func (b BetaPrime) CDF(x float64) float64
- func (b BetaPrime) ExKurtosis() float64
- func (b BetaPrime) LogProb(x float64) float64
- func (b BetaPrime) Mean() float64
- func (b BetaPrime) Mode() float64
- func (b BetaPrime) NumParameters() int
- func (b BetaPrime) Prob(x float64) float64
- func (b BetaPrime) Quantile(p float64) float64
- func (b BetaPrime) Rand() float64
- func (b BetaPrime) Skewness() float64
- func (b BetaPrime) StdDev() float64
- func (b BetaPrime) Survival(x float64) float64
- func (b BetaPrime) Variance() float64
- type PoissonBinomial
- func (p PoissonBinomial) CDF(x float64) float64
- func (p PoissonBinomial) ExKurtosis() float64
- func (p PoissonBinomial) LogProb(x float64) float64
- func (p PoissonBinomial) Mean() float64
- func (p PoissonBinomial) NumParameters() int
- func (p PoissonBinomial) Prob(x float64) float64
- func (p PoissonBinomial) Rand() float64
- func (p PoissonBinomial) Skewness() float64
- func (p PoissonBinomial) StdDev() float64
- func (p PoissonBinomial) Survival(x float64) float64
- func (p PoissonBinomial) Variance() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirichletWinner ¶
DirichletWinner computes the probabilities that each output value of the Dirichlet distribution will be the largest. Uses an adaptive quadrature integration technique with the
Types ¶
type BetaPrime ¶ added in v0.2.0
type BetaPrime struct { // Alpha is the left shape parameter of the distribution. Alpha must be greater // than 0. Alpha float64 // Beta is the right shape parameter of the distribution. Beta must be greater // than 0. Beta float64 Src rand.Source }
BetaPrime implements the BetaPrime distribution, a two-parameter continuous distribution with support over the positive real numbers.
The beta prime distribution has density function
x^(α-1) * (1+x)^(-α-β) * Γ(α+β) / (Γ(α)*Γ(β))
For more information, see https://en.wikipedia.org/wiki/Beta_prime_distribution
func (BetaPrime) CDF ¶ added in v0.2.0
CDF computes the value of the cumulative density function at x.
func (BetaPrime) ExKurtosis ¶ added in v0.2.0
ExKurtosis returns the excess kurtosis of the distribution.
ExKurtosis returns NaN if the Beta parameter is less or equal to 4.
func (BetaPrime) LogProb ¶ added in v0.2.0
LogProb computes the natural logarithm of the value of the probability density function at x.
func (BetaPrime) Mean ¶ added in v0.2.0
Mean returns the mean of the probability distribution.
Mean returns NaN if the Beta parameter is less than or equal to 1.
func (BetaPrime) Mode ¶ added in v0.2.0
Mode returns the mode of the distribution.
Mode returns NaN if the Beta parameter is less than or equal to 1.
func (BetaPrime) NumParameters ¶ added in v0.2.0
NumParameters returns the number of parameters in the distribution.
func (BetaPrime) Prob ¶ added in v0.2.0
Prob computes the value of the probability density function at x.
func (BetaPrime) Quantile ¶ added in v0.2.0
Quantile returns the inverse of the cumulative distribution function.
func (BetaPrime) Skewness ¶ added in v0.2.0
Skewness returns the skewness of the distribution.
Skewness returns NaN if the Beta parameter is less than or equal to 3.
func (BetaPrime) StdDev ¶ added in v0.2.0
StdDev returns the standard deviation of the probability distribution.
StdDev returns NaN if the Beta parameter is less than or equal to 2.
type PoissonBinomial ¶
type PoissonBinomial struct {
// contains filtered or unexported fields
}
PoissonBinomial represents a random variable whose value is the sum of independent Bernoulli trials that are not necessarily identically distributed. The value of entries in P must be between 0 and 1. More information at https://en.wikipedia.org/wiki/Poisson_binomial_distribution.
func NewPoissonBinomial ¶
func NewPoissonBinomial(p []float64, src rand.Source) PoissonBinomial
NewPoissonBinomial creates a new Poisson binomial distribution with the given parameters p. NewPoissonBinomial will panic if len(p) == 0, or if any p is < 0 or > 1.
func (PoissonBinomial) CDF ¶
func (p PoissonBinomial) CDF(x float64) float64
CDF computes the value of the cumulative distribution function at x.
func (PoissonBinomial) ExKurtosis ¶
func (p PoissonBinomial) ExKurtosis() float64
ExKurtosis returns the excess kurtosis of the distribution.
func (PoissonBinomial) LogProb ¶
func (p PoissonBinomial) LogProb(x float64) float64
LogProb computes the natural logarithm of the value of the probability density function at x.
func (PoissonBinomial) Mean ¶
func (p PoissonBinomial) Mean() float64
Mean returns the mean of the probability distribution.
func (PoissonBinomial) NumParameters ¶
func (p PoissonBinomial) NumParameters() int
NumParameters returns the number of parameters in the distribution.
func (PoissonBinomial) Prob ¶
func (p PoissonBinomial) Prob(x float64) float64
Prob computes the value of the probability density function at x.
func (PoissonBinomial) Rand ¶
func (p PoissonBinomial) Rand() float64
Rand returns a random sample drawn from the distribution.
func (PoissonBinomial) Skewness ¶
func (p PoissonBinomial) Skewness() float64
Skewness returns the skewness of the distribution.
func (PoissonBinomial) StdDev ¶
func (p PoissonBinomial) StdDev() float64
StdDev returns the standard deviation of the probability distribution.
func (PoissonBinomial) Survival ¶
func (p PoissonBinomial) Survival(x float64) float64
Survival returns the survival function (complementary CDF) at x.
func (PoissonBinomial) Variance ¶
func (p PoissonBinomial) Variance() float64
Variance returns the variance of the probability distribution.