Skip to main content

genhyperbolic_logpdf

Function genhyperbolic_logpdf 

Source
pub fn genhyperbolic_logpdf(x: f64, p: f64, a: f64, b: f64) -> f64
Expand description

Logarithm of the generalized hyperbolic probability density function

Corresponds to xsf::genhyperbolic_logpdf, and to the logpdf of scipy.stats.genhyperbolic with loc=0 and scale=1.

§Definition

$$ f(x; p, a, b) = {(a^2 - b^2)^{p/2} \over \sqrt{2\pi} a^{p-1/2} K_p\left(\sqrt{a^2 - b^2}\right)} e^{b x} {K_{p-1/2}\left(a \sqrt{1 + x^2}\right) \over \left(\sqrt{1 + x^2}\right)^{1/2-p}} $$

for $|b| < a$, where $K_p$ is the modified Bessel function of the second kind.

§See also