Cumulants#
See also Wikipedia [1214]
Calculating the cumulants from the pmf vector#
- cumulants_from_pmfvector(self, x, nl, order, show=False)#
where
ctxisipm,dec,mpm, orgmp.Calculates the cumulants \(\kappa_r\) from the pmf vector.
Calculating the cumulants from the factorial moments#
- ctx.cumulants_from_factorialmoments(self, mfac)#
where
ctxisipm,dec,mpm, orgmp.Calculates the cumulants \(\kappa_r\) from the factorial moments.
Calculating the cumulants from the raw moments#
Calculating the cumulants from the central moments#
- ctx.cumulants_from_centralmoments(cumulants, central)#
where
ctxisipm,dec,mpm, orgmp.Calculates the cumulants \(\kappa_r\) from the central moments \(\mu_r\) :
\[\kappa_r = \mu_r - \sum_{j=2}^{r-1} \binom{r-1}{j-1} \mu_{r-j} \kappa_j, \quad r>1, \quad \kappa_1=\mu_1.\]>>> from mpfunlab import dec, mpr, ivr, ivc >>> ivr.dps = 25; ivr.pretty = True >>> ivr.exp([-inf,0]) [0.0, 1.0] >>> ivr.exp([0,1]) [1.0, 2.71828182845904523536028749558]
Calculating the cumulants from the cumulant-generating function#
- ctx.cumulants_from_cdf(k, cgf)#
where
ctxisipm,dec,mpm, orgmp.The cumulants \(\kappa _{n}\) are obtained from a power series expansion of the cumulant generating function:
\[K(t)=\sum _{n=1}^{\infty }\kappa _{n}{\frac {t^{n}}{n!}}=\mu t+\sigma ^{2}{\frac {t^{2}}{2}}+\cdots .\]This expansion is a Maclaurin series, so the n-th cumulant can be obtained by differentiating the above expansion n times and evaluating the result at zero:
\[\kappa _{n}=K^{(n)}(0).\]