statsmodels.sandbox.stats.runs.Runs.runs_test

Runs.runs_test(correction=True)[source]

basic version of runs test

Parameters
correctionbool

Following the SAS manual, for samplesize below 50, the test statistic is corrected by 0.5. This can be turned off with correction=False, and was included to match R, tseries, which does not use any correction.

pvalue based on normal distribution, with integer correction