pyhctsa.operations.hypothesis_tests.marginal_tests¶
-
pyhctsa.operations.hypothesis_tests.marginal_tests(y, the_test=
'signtest')¶ p-value of a hypothesis test about the distribution of values.
Tests the distribution of the values of the time series, ignoring their temporal order (a shuffled series gives the same p-value); see
independence_tests()for tests of serial dependence. This is the part of hctsa’s formerHT_HypothesisTestthat tests marginal properties.- Parameters:¶
- y : array-like¶
The input time series.
- the_test : {'signtest', 'vartest', 'ztest', 'signrank', 'jbtest', 'logjb'}, optional¶
The test:
’signtest’: sign test of zero median (exact binomial test);
’vartest’: chi-squared test that the variance is 1 (assuming normality);
’ztest’: z-test that the mean is zero (assuming unit variance);
’signrank’: Wilcoxon signed rank test of zero median;
’jbtest’: Jarque-Bera test of normality;
’logjb’: the logarithm of the Jarque-Bera statistic,
JB = n/6 (S^2 + (K - 3)^2/4)with the (biased) sample skewness S and kurtosis K [1]: how far the shape of the distribution is from normal, unbounded (unlike a tabulated p-value). NaN for a constant series or if JB is exactly 0.
Default is
'signtest'.
- Returns:¶
The p-value of the (two-sided) test (small values reject the null hypothesis), or
log(JB)for'logjb'.- Return type:¶
float
References