Boost: Kolmogorov-Smirnov distribution (limiting form)#

Returns the pdf, cdf, qtf or boost class of a random variable \(X\), following the limiting form of the Kolmogorov distribution with parameters \(n > 0\) and the support interval \([0, \infty)\).

!!! The following references need to be updated: !!!

See also Wikipedia [1238], MathWorld [868], BoostMath [57], Ehrhardt [309] (3.9.2).

Ctx.kolmogorov_smirnov_pdf(x, a=0, b=1)#

where Ctx is Math53 or CtxBoost.

Returns the pdf of the limiting form of the Kolmogorov distribution, for \(x \in [0, \infty)\).

The following example shows both forms of the syntax:

>>> from mpfebnet import *
>>> a = 0; b = 1; t = 0.3; x = 0.6;
>>> print ("BetaPdf(x, a, b): ", BetaPdf(x, a, b))
>>> print ("dist_beta(a, b).pdf(x): ", dist_beta(a, b).pdf(x))
6.3563523462564525615615615614561356E+00

Ctx.kolmogorov_smirnov_cdf(x, a=0, b=1)#

where Ctx is Math53 or CtxBoost.

Returns \(\displaystyle \mathrm{KF}(x) = 1-2\sum_{k=1}^{\infty}(-1)^k e^{-2k^2x^2}\), the CDF of the limiting form of the Kolmogorov distribution, for \(x \in [0, \infty)\).

See also Ehrhardt [309] (3.9.14).

The following example shows both forms of the syntax:

>>> from mpfebnet import *
>>> a = 0; b = 1; t = 0.3; x = 0.6;
>>> print ("BetaCdf(x, a, b): ", BetaCdf(x, a, b))
>>> print ("dist_beta(a, b).cdf(x): ", dist_beta(a, b).cdf(x))
6.3563523462564525615615615614561356E+00

Ctx.kolmogorov_smirnov_qtf(q, a=0, b=1)#

where Ctx is Math53 or CtxBoost.

Returns \(\mathrm{KF}^{-1}(x)\), the functional inverse of the CDF of the Kolmogorov distribution (limiting form), ie \(\mathrm{KF}(\mathrm{KF}^{-1}(x)) = x\).

See also Ehrhardt [309] (3.9.14).

The following example shows both forms of the syntax:

>>> from mpfebnet import *
>>> a = 0; b = 1; t = 0.3; q = 0.6;
>>> print ("BetaQtf(q, a, b): ", BetaQtf(q, a, b))
>>> print ("dist_beta(a, b).qtf(q): ", dist_beta(a, b).qtf(q))
6.3563523462564525615615615614561356E+00

CtxBoost.dist_kolmogorov_smirnov(a=0, b=1)#

Returns an dist_kolmogorov_smirnov object, which gives access to the functions descibed below:

>>> from mpfebnet import SReal, FReal, XReal, QReal, CReal, OReal
>>> a = 0; b = 1;
>>> Ctx = SReal
>>> dist_beta = Ctx.dist_beta(a, b)
>>> print ("Dist.qtf(q=0.5): ", Dist.qtf(q=0.5))
6.3563523462564525615615615614561356E+00
dist_kolmogorov_smirnov.pdf(x)#

Returns \(\text{pdf}(x)\), the value of the probability density function of the Kolmogorov distribution (limiting form). See Ctx.kolmogorov_smirnov_pdf for formulas and examples.

dist_kolmogorov_smirnov.cdf(x)#

Returns \(\text{cdf}(x)\), the value of the cumulative distribution function of the Kolmogorov distribution (limiting form). See Ctx.kolmogorov_smirnov_cdf for formulas and examples.

dist_kolmogorov_smirnov.qtf(q)#

Returns \(\text{qtf}(q)\), the value of the quantile function of the Kolmogorov distribution (limiting form). See Ctx.kolmogorov_smirnov_qtf for formulas and examples.

dist_kolmogorov_smirnov.sf(x)#

Returns \(\text{sf}(x)\), the value of the survival function (Sf) of the Kolmogorov distribution (limiting form).

>>> # continued from above
>>> print ("Dist.sf(x=0.5): ", Dist.qtf(x=0.5))
6.3563523462564525615615615614561356E+00
dist_kolmogorov_smirnov.isf(q)#

Returns \(\text{isf}(q)\), the value of the inverse survival function (Isf) of the Kolmogorov distribution (limiting form).

>>> # continued from above
>>> print ("Dist.isf(x=0.5): ", Dist.isf(x=0.5))
6.3563523462564525615615615614561356E+00

dist_kolmogorov_smirnov.hf(x)#

Returns \(\text{hazard}(x)\), the value of the hazard function (Hf) of the Kolmogorov distribution (limiting form).

>>> 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_kolmogorov_smirnov.chf(x)#

Returns \(\text{chf}(x)\), the value of the cumulative hazard function (Chf) of the Kolmogorov distribution (limiting form).

>>> 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_kolmogorov_smirnov.mode()#

Returns the mode of the Kolmogorov distribution (limiting form). Since there is not one unique mode, Nan is 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_kolmogorov_smirnov.median()#

Returns the median of the Kolmogorov distribution (limiting form). 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_kolmogorov_smirnov.mean()#

Returns the mean (expected value) of the Kolmogorov distribution (limiting form). 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_kolmogorov_smirnov.variance()#

Returns the variance of the Kolmogorov distribution (limiting form). 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_kolmogorov_smirnov.stdev()#

Returns the standard deviation of the Kolmogorov distribution (limiting form). 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_kolmogorov_smirnov.skewness()#

Returns the skewness of the Kolmogorov distribution (limiting form). 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_kolmogorov_smirnov.kurtosis()#

Returns the ‘proper’ kurtosis (normalized fourth moment) of the Kolmogorov distribution (limiting form). 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_kolmogorov_smirnov.kurtosis_excess()#

Returns the kurtosis excess of the Kolmogorov distribution (limiting form). 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_kolmogorov_smirnov.support_lower_endpoint()#

Returns the support of the Kolmogorov distribution (limiting form) 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_kolmogorov_smirnov.support_upper_endpoint()#

Returns the support of the Kolmogorov distribution (limiting form) 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_kolmogorov_smirnov.range_lower_endpoint()#

Returns the valid range of the Kolmogorov distribution (limiting form) 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_kolmogorov_smirnov.range_upper_endpoint()#

Returns the valid range of the Kolmogorov distribution (limiting form) 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