stat

package
v0.0.0-...-324d411 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

F-distribution, alias Fisher-Snedecor distribution

Index

Constants

This section is empty.

Variables

View Source
var NextUniform func() float64 = rand.Float64

Functions

func Bernoulli

func Bernoulli(ρ float64) func() int64

func Bernoulli_CDF

func Bernoulli_CDF(ρ float64) func(k int64) float64

func Bernoulli_LnPMF

func Bernoulli_LnPMF(ρ float64) func(k int64) float64

func Bernoulli_PMF

func Bernoulli_PMF(ρ float64) func(k int64) float64

func Bernoulli_PMF_At

func Bernoulli_PMF_At(ρ float64, k int64) float64

func Beta

func Beta(α float64, β float64) func() float64

func BetaInv_CDF

func BetaInv_CDF(α, β float64) func(p float64) float64

Inverse of the cumulative beta probability density function for a given probability.

p: Probability associated with the beta distribution α: Parameter of the distribution β: Parameter of the distribution A: Optional lower bound to the interval of x B: Optional upper bound to the interval of x

func BetaInv_CDF_For

func BetaInv_CDF_For(α, β, p float64) float64

func Beta_CDF

func Beta_CDF(α float64, β float64) func(x float64) float64

CDF of Beta-distribution

func Beta_CDF_At

func Beta_CDF_At(α, β, x float64) float64

Value of CDF of Beta distribution(α, β) at x

func Beta_LnPDF

func Beta_LnPDF(α float64, β float64) func(x float64) float64

func Beta_PDF

func Beta_PDF(α float64, β float64) func(x float64) float64

func Beta_PDF_At

func Beta_PDF_At(α, β, x float64) float64

Value of PDF of Beta distribution(α, β) at x

func Binom_p_ConfI

func Binom_p_ConfI(n int64, p, alpha float64) (float64, float64)

func Binomial

func Binomial(ρ float64, n int64) func() int64

func Binomial_CDF

func Binomial_CDF(ρ float64, n int64) func(k int64) float64

Cumulative Distribution Function for the Binomial distribution

func Binomial_CDF_At

func Binomial_CDF_At(ρ float64, n, k int64) float64

func Binomial_CDF_trivial

func Binomial_CDF_trivial(ρ float64, n int64) func(k int64) float64

Cumulative Distribution Function for the Binomial distribution, trivial implementation

func Binomial_LnPMF

func Binomial_LnPMF(ρ float64, n int64) func(i int64) float64

Natural logarithm of Probability Mass Function for the Binomial distribution

func Binomial_PMF

func Binomial_PMF(ρ float64, n int64) func(i int64) float64

Probability Mass Function for the Binomial distribution

func Binomial_PMF_At

func Binomial_PMF_At(ρ float64, n, k int64) float64

func CRP_LnPMF

func CRP_LnPMF(α float64) func(x []int64) float64

func CRP_PMF

func CRP_PMF(α float64) func(x []int64) float64

func Choice

func Choice(θ []float64) func() int64

func Choice_LnPMF

func Choice_LnPMF(θ []float64) func(i int64) float64

func Choice_PMF

func Choice_PMF(θ []float64) func(i int64) float64

func Dirichlet

func Dirichlet(α []float64) func() []float64

func Dirichlet_LnPDF

func Dirichlet_LnPDF(α []float64) func(x []float64) float64

func Dirichlet_PDF

func Dirichlet_PDF(α []float64) func(θ []float64) float64

func Exp

func Exp(λ float64) func() float64

func Exp_LnPDF

func Exp_LnPDF(λ float64) func(x float64) float64

func Exp_PDF

func Exp_PDF(λ float64) func(x float64) float64

func F

func F(d1 int64, d2 int64) func() float64

func F_CDF

func F_CDF(df1, df2 float64) func(x float64) float64

CDF of F-distribution

func F_CDF_At

func F_CDF_At(df1, df2, x float64) float64

Value of CDF of F-distribution at x

func F_InvCDF

func F_InvCDF(df1, df2 float64) func(p float64) float64

Inverse CDF (Quantile) function of F-distribution

func F_InvCDF_For

func F_InvCDF_For(df1, df2, p float64) float64

Value of the inverse CDF of F-distribution for probability p

func F_LnPDF

func F_LnPDF(d1 float64, d2 float64) func(x float64) float64

func F_PDF

func F_PDF(d1 float64, d2 float64) func(x float64) float64

func Gamma

func Gamma(α float64, λ float64) func() float64

func Gamma_CDF

func Gamma_CDF(k float64, θ float64) func(x float64) float64

Cumulative distribution function, analytic solution, did not pass some tests!

func Gamma_CDF_At

func Gamma_CDF_At(k, θ, x float64) float64

Value of the cumulative distribution function at x

func Gamma_CDFint

func Gamma_CDFint(k int64, θ float64) func(x float64) float64

Cumulative distribution function, for integer k only

func Gamma_InvCDF

func Gamma_InvCDF(k float64, θ float64) func(x float64) float64

Inverse CDF (Quantile) function

func Gamma_InvCDF_For

func Gamma_InvCDF_For(k, θ, p float64) float64

Value of the inverse CDF for probability p

func Gamma_LnPDF

func Gamma_LnPDF(α float64, λ float64) func(x float64) float64

Natural logarithm of the probability density function

func Gamma_PDF

func Gamma_PDF(k float64, θ float64) func(x float64) float64

Probability density function

func Gamma_PDF_At

func Gamma_PDF_At(k, θ, x float64) float64

Value of the probability density function at x

func Geometric

func Geometric(ρ float64) func() int64

func Geometric_LnPMF

func Geometric_LnPMF(ρ float64) func(i int64) float64

func Geometric_PMF

func Geometric_PMF(ρ float64) func(i int64) float64

func InvGamma_CDF

func InvGamma_CDF(a, b float64) func(x float64) float64

Inverse Gamma distribution: cumulative distribution function

func InvGamma_CDF_At

func InvGamma_CDF_At(a, b, x float64) float64

Inverse Gamma distribution: value of the cumulative distribution function at x

func InvGamma_LnPDF

func InvGamma_LnPDF(a, b float64) func(x float64) float64

Inverse Gamma distribution: natural logarithm of the probability density function

func InvGamma_PDF

func InvGamma_PDF(a, b float64) func(x float64) float64

Inverse Gamma distribution: probability density function

func InvGamma_PDF_At

func InvGamma_PDF_At(a, b float64) func(x float64) float64

Inverse Gamma distribution: probability density function at x

func LnPoisson_CDF_a

func LnPoisson_CDF_a(λ float64) func(k int64) float64

func LnRange_PMF

func LnRange_PMF(n int64) func(i int64) float64

func LogChoice

func LogChoice(lws []float64) func() int64

func Multinomial

func Multinomial(θ []float64, n int64) func() []int64

func Multinomial_LnPMF

func Multinomial_LnPMF(θ []float64, n int64) func(x []int64) float64

func Multinomial_PMF

func Multinomial_PMF(θ []float64, n int64) func(x []int64) float64

func NegativeBinomial

func NegativeBinomial(ρ float64, r int64) func() int64

func NegativeBinomial_CDF

func NegativeBinomial_CDF(ρ float64, r int64) func(k int64) float64

func NegativeBinomial_CDF_At

func NegativeBinomial_CDF_At(ρ float64, r, k int64) float64

func NegativeBinomial_LnPMF

func NegativeBinomial_LnPMF(ρ float64, r int64) func(i int64) float64

func NegativeBinomial_PMF

func NegativeBinomial_PMF(ρ float64, r int64) func(k int64) float64

func NegativeBinomial_PMF_At

func NegativeBinomial_PMF_At(ρ float64, r, k int64) float64

func NextBernoulli

func NextBernoulli(ρ float64) int64

func NextBeta

func NextBeta(α float64, β float64) float64

func NextBinomial

func NextBinomial(ρ float64, n int64) (result int64)

func NextChoice

func NextChoice(θ []float64) int64

func NextDirichlet

func NextDirichlet(α []float64) []float64

func NextExp

func NextExp(λ float64) float64

func NextF

func NextF(d1 int64, d2 int64) float64

func NextGamma

func NextGamma(α float64, λ float64) float64

Random value drawn from the distribution

func NextGeometric

func NextGeometric(ρ float64) int64

NextGeometric(ρ) => # of NextBernoulli(ρ) failures before one success

func NextLogChoice

func NextLogChoice(lws []float64) int64

func NextMultinomial

func NextMultinomial(θ []float64, n int64) []int64

func NextNegativeBinomial

func NextNegativeBinomial(ρ float64, r int64) int64

NegativeBinomial(ρ, r) => number of NextBernoulli(ρ) failures before r successes

func NextNormal

func NextNormal(μ float64, σ float64) float64

func NextPoisson

func NextPoisson(λ float64) int64

func NextRange

func NextRange(n int64) int64

func NextStudentsT

func NextStudentsT(ν float64) float64

StudentsT(ν) => N(0, 1)*sqrt(ν/NextGamma(ν/2, 2))

func NextXsquare

func NextXsquare(n int64) (x float64)

Xsquare(n) => sum of n N(0,1)^2

func Normal

func Normal(μ, σ float64) func() float64

func NormalInv_CDF_For

func NormalInv_CDF_For(p, sigma float64) float64

Inverse CDF of Normal distribution for probability p //// ??? only *sigma? from GSL

func Normal_CDF

func Normal_CDF(μ, σ float64) func(x float64) float64

Cumulative Distribution Function for the Normal distribution

func Normal_LnPDF

func Normal_LnPDF(μ float64, σ float64) func(x float64) float64

func Normal_PDF

func Normal_PDF(μ float64, σ float64) func(x float64) float64

func Poisson

func Poisson(λ float64) func() int64

func Poisson_CDF

func Poisson_CDF(λ float64) func(k int64) float64

func Poisson_CDF_At

func Poisson_CDF_At(λ float64, k int64) float64

func Poisson_CDF_a

func Poisson_CDF_a(λ float64) func(k int64) float64

func Poisson_LnPMF

func Poisson_LnPMF(λ float64) func(k int64) float64
func Poisson_LnPMF(λ float64) (foo func(i int64) float64) {
	pmf := Poisson_PMF(λ)
	return func(i int64) (p float64) {
		return log(pmf(i))
		//p = -λ +log(λ)*float64(i)
		//x := log(Γ(float64(i)+1))
		//_ = x
		//p -= LnΓ(float64(i)+1)
		//return p
	}
}

func Poisson_PMF

func Poisson_PMF(λ float64) func(k int64) float64

func Poisson_PMF_At

func Poisson_PMF_At(λ float64, k int64) float64

func Range

func Range(n int64) func() int64

func Range_PMF

func Range_PMF(n int64) func(i int64) float64

func RejectionSample

func RejectionSample(targetDensity func(float64) float64, sourceDensity func(float64) float64, source func() float64, K float64) float64

func Shuffle

func Shuffle(x []interface{})

func ShuffleFloat64

func ShuffleFloat64(x []float64)

func ShuffleInt64

func ShuffleInt64(x []int64)

func StudentsT

func StudentsT(ν float64) func() float64

func StudentsT_LnPDF

func StudentsT_LnPDF(ν float64) func(x float64) float64

func StudentsT_PDF

func StudentsT_PDF(ν float64) func(x float64) float64

func Uniform

func Uniform() func() float64

func Uniform_LnPDF

func Uniform_LnPDF() func(x float64) float64

func Uniform_PDF

func Uniform_PDF() func(x float64) float64

func Xsquare

func Xsquare(n int64) func() float64

func Xsquare_CDF

func Xsquare_CDF(n int64) func(p float64) float64

Cumulative density function of the Chi-Squared distribution

func Xsquare_InvCDF

func Xsquare_InvCDF(n int64) func(p float64) float64

Inverse CDF (Quantile) function of the Chi-Squared distribution

func Xsquare_LnPDF

func Xsquare_LnPDF(n int64) func(x float64) float64

func Xsquare_PDF

func Xsquare_PDF(n int64) func(x float64) float64

func Z_CDF

func Z_CDF() func(float64) float64

Cumulative Distribution Function for the Standard Normal distribution

func Z_CDF_At

func Z_CDF_At(x float64) float64

Cumulative Probability of the Standard Normal distribution at x

func Z_InvCDF_For

func Z_InvCDF_For(p float64) float64

Inverse CDF of Standard Normal distribution for probability p

func Z_PDF

func Z_PDF() func(float64) float64

Probability Density Function for the Standard Normal distribution

func Z_PDF_At

func Z_PDF_At(x float64) float64

Probability Density of the Standard Normal distribution at x

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL