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 [1226], MathWorld [829], Johnson et al. [389], Ehrhardt [297] (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 xlcalcnet 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 [1226], MathWorld [829], Johnson et al. [389], Ehrhardt [297] (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 xlcalcnet 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 [1230], Rinne [481], Johnson et al. [389] page 527, Ehrhardt [297] (3.9.34).

\[\text{pmf}_X(k) = \frac{k^{-(r+1)}}{\zeta(r+1)}.\]

The following example shows both forms of the syntax:

>>> from xlcalcnet 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 xlcalcnet 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