Miscellaneous functions#
Log-series distribution, pmf#
- Math53.logseries_pmf(k, mu)#
Returns \(\text{pmf}(x)\), the value of the probability mass function (Pmf) of the log-series distribution with mean \(mu\) and the support interval \((0,+\infty)\), and \(0 \le q \le 1\).
See also Wikipedia [1324], MathWorld [901], Johnson et al. [411], Ehrhardt [309] (3.9.17).
\[\text{pmf}(x) = \frac{-1}{\ln(1-p)} \frac{p^k}{k}.\]The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("LogseriesPdf(x, a, b): ", LogseriesPdf(x, a, b)) >>> print ("dist_logseries(a, b).pdf(x): ", dist_logseries(a, b).pdf(x)) 6.3563523462564525615615615614561356E+00
Log-series distribution, cdf#
- Math53.logseries_cdf(k, mu)#
Returns \(\text{cdf}(x)\), the value of the cumulative distribution function (Cdf) of the log-series distribution with mean \(mu\) and the support interval \((0,+\infty)\), and \(0 \le q \le 1\).
See also Wikipedia [1324], MathWorld [901], Johnson et al. [411], Ehrhardt [309] (3.9.17).
\[\text{cdf}(x) = 1 + \frac{B(p; k+1, 0)}{\ln(1-p)}.\]The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("LogseriesCdf(x, a, b): ", LogseriesCdf(x, a, b)) >>> print ("dist_logseries(a, b).cdf(x): ", dist_logseries(a, b).cdf(x)) 6.3563523462564525615615615614561356E+00
Zeta distribution, pmf#
- Math53.zeta_pmf(k, r)#
Returns \(\text{pmf}(x)\), the value of the probability mass function (Pmf) of the zeta distribution with parameter \(r\), and \(0 \le q \le 1\).
See also Wikipedia [1334], Rinne [505], Johnson et al. [411] page 527, Ehrhardt [309] (3.9.34).
\[\text{pmf}_X(k) = \frac{k^{-(r+1)}}{\zeta(r+1)}.\]The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("ZetaPdf(x, a, b): ", ZetaPdf(x, a, b)) >>> print ("dist_zeta(a, b).pdf(x): ", dist_zeta(a, b).pdf(x)) 6.3563523462564525615615615614561356E+00
Zeta distribution, cdf#
- Math53.zeta_cdf(k, r)#
Returns \(\text{cdf}(x)\), the value of the cumulative distribution function (Cdf) of the zeta distribution:
\[\text{cdf}(x) = \frac{H_k^{r+1}}{\zeta(r+1)} = 1 - \frac{\zeta(r+1, k+1)}{\zeta(r+1)}.\]The following example shows both forms of the syntax:
>>> from mpfebnet import * >>> a = 0; b = 1; t = 0.3; x = 0.6; >>> print ("ZetaCdf(x, a, b): ", ZetaCdf(x, a, b)) >>> print ("dist_zeta(a, b).cdf(x): ", dist_zeta(a, b).cdf(x)) 6.3563523462564525615615615614561356E+00
Voigt function U#
- math53.voigt_u(z)#
Returns the Voigt function U. See also Wikipedia [1443], NIST [462].
The Voigt functions[1] U, V, and H (sometimes called the line broadening function) are defined by
\[U(x,t)+iV(x,t)={\sqrt {\frac {\pi }{4t}}}e^{z^{2}}\operatorname {erfc} (z)={\sqrt {\frac {\pi }{4t}}}w(iz),\]\[H(a,u)={\frac {U(u/a,1/4a^{2})}{a{\sqrt {\pi }}}},\]where
\[z=(1-ix)/2{\sqrt {t}},\]erfc is the complementary error function, and w(z) is the Faddeeva function.
An example in Python
>>> from xlcalcnet import XComplex >>> XComplex.VoigtU(0.5) XComplex('5.2359877559829887307E-1') >>> XComplex.VoigtU('0.1') XComplex('5.3518479027559984754E-1')
An example in Visual Basic
>>> from xlcalcnet import Gpc >>> Gpc.VoigtU(0.5) Gpc('5.2359877559829887307E-1') >>> Gpc.VoigtU('0.1') Gpc('5.3518479027559984754E-1')
Voigt function V#
- math53.voigt_v(x, t)#
Returns the Voigt function V. See also Wikipedia [1443], NIST [462].
An example in Python
>>> from xlcalcnet import XComplex >>> XComplex.VoigtV(0.5) XComplex('5.2359877559829887307E-1') >>> XComplex.VoigtV('0.1') XComplex('5.3518479027559984754E-1')
An example in Visual Basic
>>> from xlcalcnet import Gpc >>> Gpc.VoigtV(0.5) Gpc('5.2359877559829887307E-1') >>> Gpc.VoigtV('0.1') Gpc('5.3518479027559984754E-1')
Voigt function H#
- math53.voigt_h(x, t)#
Returns the Voigt function H. See also Wikipedia [1443], NIST [462].
An example in Python
>>> from xlcalcnet import XComplex >>> XComplex.VoigtH(0.5) XComplex('5.2359877559829887307E-1') >>> XComplex.VoigtH('0.1') XComplex('5.3518479027559984754E-1')
An example in Visual Basic
>>> from xlcalcnet import Gpc >>> Gpc.VoigtH(0.5) Gpc('5.2359877559829887307E-1') >>> Gpc.VoigtH('0.1') Gpc('5.3518479027559984754E-1')
Voigt Profile distribution, pdf#
- math53.voigt_profile_pdf(q, a, b)#
Returns \(\text{pdf}(x)\), the probability density function of a random variable \(X\), following a Voigt Profile distribution with shape \(a > 0\), scale \(b > 0\), and the support interval \((0, +\infty)\). See also Wikipedia [1312].
\[\text{pdf}(x) = V(x; \sigma, \gamma) = \frac{\Re[w(z)]}{\sigma \sqrt{2 \pi}}, \quad \text{where } z = \frac{x + i\gamma}{\sigma \sqrt{\pi}}.\]An example in Python
>>> from xlcalcnet import XComplex >>> XComplex.VoigtProfilePdf(0.5) XComplex('5.2359877559829887307E-1') >>> XComplex.VoigtProfilePdf('0.1') XComplex('5.3518479027559984754E-1')
An example in Visual Basic
>>> from xlcalcnet import Gpc >>> Gpc.VoigtProfilePdf(0.5) Gpc('5.2359877559829887307E-1') >>> Gpc.VoigtProfilePdf('0.1') Gpc('5.3518479027559984754E-1')