pyhctsa.operations.distribution.custom_skewness¶
-
pyhctsa.operations.distribution.custom_skewness(y, what_skew=
'pearson')¶ Compute custom skewness measures of a time series.
Calculates either the Pearson skewness or the Bowley (quartile) skewness coefficient.
The Pearson skewness is defined as
\[\frac{3(\mu - \tilde{x})}{\sigma},\]where \(\mu\) is the mean, \(\tilde{x}\) is the median, and \(\sigma\) is the standard deviation.
The Bowley skewness is defined as
\[\frac{Q_3 + Q_1 - 2Q_2}{Q_3 - Q_1},\]where \(Q_1\), \(Q_2\), and \(Q_3\) are the first, second (median), and third quartiles, respectively.