pyhctsa.operations.hypothesis_tests.hypothesis_test

pyhctsa.operations.hypothesis_tests.hypothesis_test(x, the_test='signtest')

Perform statistical hypothesis testing on a time series.

Applies a specified statistical test and returns its p-value. Tests are chosen to evaluate different null hypotheses about the time series properties.

Parameters:
x : ArrayLike

Input time series

the_test : str, optional

Type of hypothesis test to perform:

  • ’signtest’: Tests if median equals zero

  • ’runstest’: Tests for randomness in sequence

  • ’ztest’: Tests if mean equals zero (assumes unit variance)

  • ’signrank’: Wilcoxon signed rank test for zero median

  • ’jbtest’: Jarque-Bera test for normality

  • ’lbq’: Ljung-Box Q-test for autocorrelation

Default is ‘signtest’.

Returns:

P-value from the statistical test. A small p-value (< 0.05) typically indicates rejection of the null hypothesis.

Return type:

float