pyhctsa.operations.distribution.tail_index¶
-
pyhctsa.operations.distribution.tail_index(y, tail_frac=
0.05)¶ Tail index of the distribution of values: how heavy its tails are.
The tail index is estimated in several ways from the
k = round(tail_frac * N)most extreme values in each tail (taken relative to the median of the data): Hill’s estimator, a moment estimator, and the shape parameter of a generalized Pareto distribution fitted to the exceedances over the (k+1)-th most extreme value (by probability-weighted moments, Hosking and Wallis 1987, which has a closed form). A larger index means a heavier tail (a power-law tail of exponent alpha has index 1/alpha; a Gaussian has an index of about zero). NaN is returned for every output if there are fewer than 10 tail values or if k is at least N/2.- Parameters:¶
- Returns:¶
hillUpper, hillLower: Hill estimator for the upper and lower tail (distances above and below the median); hillAsym: their difference; momentAbs: the moment estimator for the distances from the median; gpdUpper, gpdLower: the generalized Pareto shape parameter for the upper and lower exceedances; gpdAsym: their difference.
- Return type:¶
dict