pyhctsa.operations.correlation.theiler_q

pyhctsa.operations.correlation.theiler_q(y)

Theiler’s Q statistic, a third-moment statistic of sums of adjacent samples.

\[Q = \frac{\langle (x_t + x_{t+1})^3 \rangle}{\langle x_t^2 \rangle^{3/2}},\]

where the numerator averages over the \(N - 1\) adjacent pairs and the denominator over all \(N\) samples. The mean is not removed (z-score the series first for a location-free statistic). Statistic as used in D. Kaplan’s code (hctsa DK_theilerQ), where it is credited to J. Theiler.

Parameters:
y : array-like

The input time series.

Returns:

Theiler’s Q statistic (NaN if the series has zero energy or fewer than two samples, where it is undefined).

Return type:

float