Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cdf ¶
Cdf returns a wrapper function of gonum/integrate/quad.Fixed. The returned function approximates cumulative probabilities of the probability density function.
f is the target pdf. Some pdf parameter settings where pdfs return Inf are NOT allowed (fail to approximate cumulative probabilities).
lb is lower bound of the variables given by the function. -Inf is accepted.
func Quantile ¶
Quantile approxiamtes the value of x that satisfies F(X <= x) = p.
cdf is a cumulative distribution function F(x).
p is the probability.
a, b are the lower & upper bounds of the search space (a < b).
eps controls the presicion of the approximation. The smaller gives higher presicion and longer computation. eps can be 1e-15 at minimum for formal CDF (eps smaller than 1e-15 will causes panic) Precision is not ensured depending on types of cdf. Especially, larger eps (such as 1e-10) is recommended for numerical CDF.
Types ¶
This section is empty.