SciPy

scipy.stats.kstat

scipy.stats.kstat(data, n=2)[source]

Return the nth k-statistic (1<=n<=4 so far).

The nth k-statistic is the unique symmetric unbiased estimator of the nth cumulant kappa_n.

Parameters:

data : array_like

Input array.

n : int, {1, 2, 3, 4}, optional

Default is equal to 2.

Returns:

kstat : float

The nth k-statistic.

See also

kstatvar
Returns an unbiased estimator of the variance of the k-statistic.

Notes

The cumulants are related to central moments but are specifically defined using a power series expansion of the logarithm of the characteristic function (which is the Fourier transform of the PDF). In particular let phi(t) be the characteristic function, then:

ln phi(t) = > kappa_n (it)^n / n!    (sum from n=0 to inf)

The first few cumulants (kappa_n) in terms of central moments (mu_n) are:

kappa_1 = mu_1
kappa_2 = mu_2
kappa_3 = mu_3
kappa_4 = mu_4 - 3*mu_2**2
kappa_5 = mu_5 - 10*mu_2 * mu_3

References

http://mathworld.wolfram.com/k-Statistic.html

http://mathworld.wolfram.com/Cumulant.html

Previous topic

scipy.stats.skewtest

Next topic

scipy.stats.kstatvar