Boost: Holtsmark distribution#
The Holtsmark distribution is a stable distribution (see Wikipedia [1330]) with the shape parameters \(\alpha=3/2, \beta=0\). The Holtsmark distribution is linear with respect to the location parameter \(\mu\) and scale parameter \(c\).
The support interval is \((-\infty,+\infty)\).
!!! The following references need to be updated: !!!
See also: https://en.wikipedia.org/wiki/Holtsmark_distribution
- Ctx.holtsmark_pdf(x, m, n)#
where
CtxisMath53orCtxBoost.Returns \(\text{pdf}_X(x)\), the probability density function (pdf) of a random variable \(X\), following an Holtsmark distribution
\[\text{pdf}_X(x) =\frac{1}{2\pi} \int_{-\infty}^{\infty} \exp \left ( i t \mu - |c t|^{3/2} \right ) e^{i x t} \mathrm{d}t,\]The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("FisherFPdf(x, a, b): ", FisherFPdf(x, a, b)) >>> print ("dist_fisher_f(a, b).pdf(x): ", dist_fisher_f(a, b).pdf(x)) 6.3563523462564525615615615614561356E+00
- Ctx.holtsmark_cdf(x, m, n)#
where
CtxisMath53orCtxBoost.Returns \(\text{cdf}_X(x)\), the cumulative distribution function (cdf) of a random variable \(X\), following an Holtsmark distribution.
The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("FisherFCdf(x, a, b): ", FisherFCdf(x, a, b)) >>> print ("dist_fisher_f(a, b).cdf(x): ", dist_fisher_f(a, b).cdf(x)) 6.3563523462564525615615615614561356E+00
- Ctx.holtsmark_qtf(q, m, n)#
where
CtxisMath53orCtxBoost.Returns \(\text{qtf}(q)\), the value of the quantile function (Qtf) of the Holtsmark distribution.
The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; q = 0.6; >>> print ("FisherFQtf(q, a, b): ", FisherFQtf(q, a, b)) >>> print ("dist_fisher_f(a, b).qtf(q): ", dist_fisher_f(a, b).qtf(q)) 6.3563523462564525615615615614561356E+00
- CtxBoost.dist_holtsmark(m, n)#
Returns an
dist_holtsmarkobject, which gives access to the functions descibed below:>>> from mpfebnet import SReal, FReal, XReal, QReal, CReal, OReal >>> a = 0; b = 1; >>> Ctx = SReal >>> dist_fisher_f = Ctx.dist_fisher_f(a, b) >>> print ("Dist.qtf(q=0.5): ", Dist.qtf(q=0.5)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.pdf(x)#
Returns \(\text{pdf}(x)\), the value of the probability density function of the Holtsmark distribution. See Ctx.holtsmark_pdf for formulas and examples.
- dist_holtsmark.cdf(x)#
Returns \(\text{cdf}(x)\), the value of the cumulative distribution function of the Holtsmark distribution. See Ctx.holtsmark_cdf for formulas and examples.
- dist_holtsmark.qtf(q)#
Returns \(\text{qtf}(q)\), the value of the quantile function of the Holtsmark distribution. See Ctx.holtsmark_qtf for formulas and examples.
- dist_holtsmark.sf(x)#
Returns \(\text{sf}(x)\), the value of the survival function (Sf) of the Holtsmark distribution.
\[\begin{split}\text{sf}(x) =\begin{cases} \text{ibeta}(n/2, m/2, n/(n+mx)), & mx > n,\\ \text{ibetac}(m/2, n/2, mx/(n+mx)) & mx \le n. \end{cases}\end{split}\]Here \(\text{ibeta}(\cdot)\) denotes the real normalised incomplete beta function (RealIBeta), and \(\text{ibetac}(\cdot)\) denotes the real normalised complementary incomplete beta function (RealIBetac).
>>> # continued from above >>> print ("Dist.sf(x=0.5): ", Dist.qtf(x=0.5)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.isf(q)#
Returns \(\text{isf}(q)\), the value of the inverse survival function (Isf) of the Holtsmark distribution.
\[\text{isf}(q) = \frac{nx}{m(1-x)}, \quad \text{where } x = \mathrm{ibetac\_inv}(m/2, n/2, q).\]Here \(\mathrm{ibetac\_inv}(\cdot)\) denotes the inverse of the real normalised complementary incomplete beta function (RealIBetacInv).
>>> # continued from above >>> print ("Dist.isf(x=0.5): ", Dist.isf(x=0.5)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.hf(x)#
Returns \(\text{hazard}(x)\), the value of the hazard function (Hf) of the Holtsmark distribution.
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.chf(x)#
Returns \(\text{chf}(x)\), the value of the cumulative hazard function (Chf) of the Holtsmark distribution.
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.mode()#
Returns the mode of the Holtsmark distribution. Since there is not one unique mode,
Nanis returned.>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.median()#
Returns the median of the Holtsmark distribution. Calculated as \(\displaystyle \tfrac{1}{2}(a+b)\).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.mean()#
Returns the mean (expected value) of the Holtsmark distribution. Calculated as \(\displaystyle \tfrac{1}{2}(a+b)\).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.variance()#
Returns the variance of the Holtsmark distribution. Calculated as \(\displaystyle \tfrac{1}{8}(b-a)^2\).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.stdev()#
Returns the standard deviation of the Holtsmark distribution. Calculated as \(\displaystyle \sqrt{ \tfrac{1}{8}(b-a)^2}\).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.skewness()#
Returns the skewness of the Holtsmark distribution. Calculated as \(\displaystyle 0\).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.kurtosis()#
Returns the ‘proper’ kurtosis (normalized fourth moment) of the Holtsmark distribution. Calculated as \(\displaystyle 3/2\).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.kurtosis_excess()#
Returns the kurtosis excess of the Holtsmark distribution. Calculated as \(\displaystyle -3/2\).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.support_lower_endpoint()#
Returns the support of the Holtsmark distribution as a tuple (left, right).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00
- dist_holtsmark.support_upper_endpoint()#
Returns the support of the Holtsmark distribution as a tuple (left, right).
>>> from mpfebnet import * >>> mp.dps = 30 >>> mu = 0; sigma = 1; t = 0.3; >>> print ("c_x: ", chi_squared(mu, sigma).c_x(t)) 6.3563523462564525615615615614561356E+00