Boost: Saspoint5 distribution#
The SaS point5 distribution is a stable distribution (see Wikipedia [1330]) with the shape parameters \(\alpha=1/2, \beta=0\). The Saspoint5 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/Stable_distribution#Other_analytic_cases
- Ctx.saspoint5_pdf(x, a=0, b=1)#
where
CtxisMath53orCtxBoost.Returns \(\text{pdf}_X(x)\), the probability density function (pdf) of a random variable \(X\), following an Saspoint5 distribution. Let \(S(x)\) and \(C(x)\) denote the Fresnel integrals. Then:
\[\text{pdf}_X(x) ={\frac {1}{\sqrt {2\pi |x|^{3}}}}\left(\sin \left({\tfrac {1}{4|x|}}\right)\left[{\frac {1}{2}}-S\left({\tfrac {1}{\sqrt {2\pi |x|}}}\right)\right]+\cos \left({\tfrac {1}{4|x|}}\right)\left[{\frac {1}{2}}-C\left({\tfrac {1}{\sqrt {2\pi |x|}}}\right)\right]\right).\]The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("StudentTPdf(x, a, b): ", StudentTPdf(x, a, b)) >>> print ("dist_student_t(a, b).pdf(x): ", dist_student_t(a, b).pdf(x)) 6.3563523462564525615615615614561356E+00
- Ctx.saspoint5_cdf(x, a=0, b=1)#
where
CtxisMath53orCtxBoost.Returns \(\text{cdf}_X(x)\), the cumulative distribution function (cdf) of a random variable \(X\), following an Saspoint5 distribution.
The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("StudentTCdf(x, a, b): ", StudentTCdf(x, a, b)) >>> print ("dist_student_t(a, b).cdf(x): ", dist_student_t(a, b).cdf(x)) 6.3563523462564525615615615614561356E+00
- Ctx.saspoint5_qtf(q, a=0, b=1)#
where
CtxisMath53orCtxBoost.Returns \(\text{qtf}(q)\), the value of the quantile function (Qtf) of the Saspoint5 distribution:
The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; q = 0.6; >>> print ("StudentTQtf(q, a, b): ", StudentTQtf(q, a, b)) >>> print ("dist_student_t(a, b).qtf(q): ", dist_student_t(a, b).qtf(q)) 6.3563523462564525615615615614561356E+00
- CtxBoost.dist_saspoint5(a=0, b=1)#
Returns an
dist_saspoint5object, which gives access to the functions descibed below:>>> from mpfebnet import SReal, FReal, XReal, QReal, CReal, OReal >>> a = 0; b = 1; >>> Ctx = SReal >>> dist_student_t = Ctx.dist_student_t(a, b) >>> print ("Dist.qtf(q=0.5): ", Dist.qtf(q=0.5)) 6.3563523462564525615615615614561356E+00
- dist_saspoint5.pdf(x)#
Returns \(\text{pdf}(x)\), the value of the probability density function of the Saspoint5 distribution. See Ctx.saspoint5_pdf for formulas and examples.
- dist_saspoint5.cdf(x)#
Returns \(\text{cdf}(x)\), the value of the cumulative distribution function of the Saspoint5 distribution. See Ctx.saspoint5_cdf for formulas and examples.
- dist_saspoint5.qtf(q)#
Returns \(\text{qtf}(q)\), the value of the quantile function of the Saspoint5 distribution. See Ctx.saspoint5_qtf for formulas and examples.
- dist_saspoint5.sf(x)#
Returns \(\text{sf}(x)\), the value of the survival function (Sf) of the Saspoint5 distribution.
\[\text{sf}(x) = \text{cdf}_X(-x)\]>>> # continued from above >>> print ("Dist.sf(x=0.5): ", Dist.qtf(x=0.5)) 6.3563523462564525615615615614561356E+00
- dist_saspoint5.isf(q)#
Returns \(\text{isf}(q)\), the value of the inverse survival function (Isf) of the Saspoint5 distribution.
\[\text{isf}(q) = -\text{qtf}(q).\]>>> # continued from above >>> print ("Dist.isf(x=0.5): ", Dist.isf(x=0.5)) 6.3563523462564525615615615614561356E+00
- dist_saspoint5.hf(x)#
Returns \(\text{hazard}(x)\), the value of the hazard function (Hf) of the Saspoint5 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_saspoint5.chf(x)#
Returns \(\text{chf}(x)\), the value of the cumulative hazard function (Chf) of the Saspoint5 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_saspoint5.mode()#
Returns the mode of the Saspoint5 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_saspoint5.median()#
Returns the median of the Saspoint5 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_saspoint5.mean()#
Returns the mean (expected value) of the Saspoint5 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_saspoint5.variance()#
Returns the variance of the Saspoint5 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_saspoint5.stdev()#
Returns the standard deviation of the Saspoint5 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_saspoint5.skewness()#
Returns the skewness of the Saspoint5 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_saspoint5.kurtosis()#
Returns the ‘proper’ kurtosis (normalized fourth moment) of the Saspoint5 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_saspoint5.kurtosis_excess()#
Returns the kurtosis excess of the Saspoint5 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_saspoint5.support_lower_endpoint()#
Returns the support of the Saspoint5 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_saspoint5.support_upper_endpoint()#
Returns the support of the Saspoint5 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