Johnson \(S_U\) distribution#

class ctx.dist_johnson_su(n1, n2, lambda, **kwargs)#

where ctx is fpm, mpm, ipm, dec, gmp or apm.

These functions return PDF, CDF, and ICDF of the Johnson \(S_U\) distribution with location \(a\), scale \(b > 0\), and the support interval \((-\infty,+\infty)\) :

See also: Wikipedia [1305], Jodrá [402], Hill et al. [390].

dist_johnson_su.pdf(x)#

Returns \(\text{pdf}_X(x)\), the probability density function (pdf) of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[\text{pdf}_X(x) = \frac{b}{\sqrt{x^2+1}} \phi \left( a+b \log\left(x+\sqrt{x^2+1} \right)\right), \quad \text{where } u = (x-\xi)/\lambda, a = \gamma, b = \delta.\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; x = 3;
>>> print ("pdf: ", dist_johnson_su(mu, sigma).pdf(x))
6.3563523462564525615615615614561356E-20

dist_johnson_su.cdf(x)#

Returns \(\text{cdf}_X(x)\), the cumulative distribution function (cdf) of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[\text{cdf}_X(x) = \Phi\left( a+b \log\left(x+\sqrt{x^2+1} \right) \right), \quad \text{where } u = (x-\xi)/\lambda, a = \gamma, b = \delta\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; x = 3;
>>> print ("cdf: ", dist_johnson_su(mu, sigma).pdf(x))
6.3563523462564525615615615614561356E-20

dist_johnson_su.sf(x)#

Returns \(\text{sf}_X(x)\), the survival function function (sf) of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[\text{sf}_X(x) = \Phi\left(-a-b \log\left(x+\sqrt{x^2+1} \right) \right), \quad \text{where } u = (x-\xi)/\lambda, a = \gamma, b = \delta\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; x = 3;
>>> print (" sf: ", dist_johnson_su(mu, sigma).pdf(x))
sf: 6.3563523462564525615615615614561356E-20

dist_johnson_su.qtf(q)#

Returns \(\text{qtf}_X(x)\), the quantile function function (qtf) of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[\text{qtf}_X(q) = \sinh\left( \frac{\Phi^{-1}(q)-a}{b} \right), \quad \text{where } u = (x-\xi)/\lambda, a = \gamma, b = \delta\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; q = 0.3;
>>> print ("qtf: ", dist_johnson_su(mu, sigma).qtf(q))
qtf: 6.3563523462564525615615615614561356E+00

dist_johnson_su.isf(q)#

Returns \(\text{isf}_X(q)\), the inverse survival function function (isf) of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[\text{isf}_X(q) = \sinh\left( \frac{\Phi^{-1}(1-q)-a}{b} \right), \quad \text{where } u = (x-\xi)/\lambda, a = \gamma, b = \delta\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; q = 0.3;
>>> print ("isf: ", dist_johnson_su(mu, sigma).isf(q))
6.3563523462564525615615615614561356E+00

dist_johnson_su.c_x(t)#

Returns \(C_X(t)\), the characteristic function of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[C_X(t) = \int_{0}^{\infty} e^{i tx} \text{pdf}_X(x) \mathrm{d} x\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; t = 0.3;
>>> print ("c_x: ", dist_johnson_su(mu, sigma).c_x(t))
6.3563523462564525615615615614561356E+00

dist_johnson_su.m_x(t)#

Returns \(M_X(t)\), the moment generating function of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[M_X(t) = \int_{0}^{1} e^{tx} \text{pdf}_X(x) \mathrm{d} x\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; t = 0.3;
>>> print ("m_x: ", dist_johnson_su(mu, sigma).c_x(t))
6.3563523462564525615615615614561356E+00

dist_johnson_su.k_x(t, k=0)#

Returns \(K_X(t)\), the cumulant generating function of a random variable \(X\), following an Johnson \(S_U\) distribution:

\[K_X(t) = \log (M_X(t))\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; t = 0.3; k = 6;
>>> print ("c_x: ", dist_johnson_su(mu, sigma).k_x(t, k))
6.3563523462564525615615615614561356E+00

dist_johnson_su.moments(k)#

Returns the first \(j\) central moments, \(\mu_j, j = 1 \ldots k\), of a random variable \(X\), following an Johnson \(S_U\) distribution (See Johnson1949, page 163)

If \(r\) is even:

\[\mu'_r = 2^{-(r-1)} \sum_{s=0}^{\frac{1}{2}r-1} (-1)^s \binom{r}{s} e^{\frac{1}{2}(r-2s)^2 \delta^{-2}} \cosh[(r-2s)(\gamma/\delta)] + (-1)^{\frac{1}{2}r} \frac{1}{2} \binom{r}{\frac{1}{2}r}\]

If \(r\) is odd:

\[\mu'_r = 2^{-(r-1)} \sum_{s=0}^{\frac{1}{2}r-1} (-1)^{s+1} \binom{r}{s} e^{\frac{1}{2}(r-2s)^2 \delta^{-2}} \sinh[(r-2s)(\gamma/\delta)]\]
>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; k = 6;
>>> print ("saddlepoint: ", dist_johnson_su(mu, sigma).moments(k))
6.3563523462564525615615615614561356E+00

dist_johnson_su.cumulants(k)#

Returns the first \(j\) cumulants, \(\kappa_j, j = 1 \ldots k\), of a random variable \(X\), following an Johnson \(S_U\) distribution. The cumulants are calculated from the moments.

>>> from mpdistrib import *
>>> mp.dps = 30
>>> mu = 0; sigma = 1; k = 6;
>>> print ("saddlepoint: ", dist_johnson_su(mu, sigma).cumulants(k))
6.3563523462564525615615615614561356E+00