Next: , Previous: Higher moments (skewness and kurtosis), Up: Statistics


20.4 Autocorrelation

— Function: double gsl_stats_lag1_autocorrelation (const double data[], const size_t stride, const size_t n)

This function computes the lag-1 autocorrelation of the dataset data.

          a_1 = {\sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i-1} - \Hat\mu)
                 \over
                 \sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i} - \Hat\mu)}
— Function: double gsl_stats_lag1_autocorrelation_m (const double data[], const size_t stride, const size_t n, const double mean)

This function computes the lag-1 autocorrelation of the dataset data using the given value of the mean mean.